]> Dogcows Code - chaz/openbox/blobdiff - src/buttonwidget.hh
update children first
[chaz/openbox] / src / buttonwidget.hh
index bb23dd90ea399ae75f76c4554b4839d1648c8768..0d546f73fc8fc67763fc690e9bf6b0b68a43dcb9 100644 (file)
@@ -1,25 +1,43 @@
 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifndef   __obbuttonwidget_hh
-#define   __obbuttonwidget_hh
+#ifndef   __buttonwidget_hh
+#define   __buttonwidget_hh
 
-#include "otk/button.hh"
-#include "widget.hh"
+#include "widgetbase.hh"
+#include "otk/widget.hh"
 
 namespace ob {
 
-class OBButtonWidget : public otk::OtkButton, public OBWidget
+class Client;
+
+class ButtonWidget : public otk::Widget, public WidgetBase
 {
 private:
+  void setTextures();
+  Client *_client;
+  bool _pressed;
+  unsigned int _button;
+  bool _state;
   
 public:
-  OBButtonWidget(otk::OtkWidget *parent, OBWidget::WidgetType type);
-  virtual ~OBButtonWidget();
+  ButtonWidget(otk::Widget *parent, WidgetBase::WidgetType type,
+               Client *client);
+  virtual ~ButtonWidget();
 
-  virtual void setStyle(otk::Style *style);
+  virtual void setStyle(otk::RenderStyle *style);
 
   virtual void adjust();
+
+  virtual void update();
+  
+  virtual void renderForeground();
+  
+  virtual void focus();
+  virtual void unfocus();
+
+  virtual void buttonPressHandler(const XButtonEvent &e);
+  virtual void buttonReleaseHandler(const XButtonEvent &e);
 };
 
 }
 
-#endif // __obbuttonwidget_hh
+#endif // __buttonwidget_hh
This page took 0.023015 seconds and 4 git commands to generate.