]> Dogcows Code - chaz/openbox/blobdiff - otk/button.hh
move the focus_order lists into the kernel
[chaz/openbox] / otk / button.hh
index dd3c78b95644af7c75eda053ce1d7d2f6e15fcbc..a3805aa069f459e1dc904075ce9a0feaeef8b0e4 100644 (file)
@@ -2,49 +2,31 @@
 #ifndef __button_hh
 #define __button_hh
 
-#include "focuslabel.hh"
+#include "label.hh"
 
 namespace otk {
 
-class Button : public FocusLabel {
+class Button : public Label {
 
 public:
-
   Button(Widget *parent);
-  ~Button();
-
-  inline const RenderTexture *getPressedFocusTexture(void) const
-  { return _pressed_focus_tx; }
-  void setPressedFocusTexture(RenderTexture *texture)
-  { _pressed_focus_tx = texture; }
+  virtual ~Button();
 
-  inline const RenderTexture *getPressedUnfocusTexture(void) const
-  { return _pressed_unfocus_tx; }
-  void setPressedUnfocusTexture(RenderTexture *texture)
-  { _pressed_unfocus_tx = texture; }
+  virtual inline bool isPressed() const { return _pressed; }
 
-  void setTexture(RenderTexture *texture);
-  void setUnfocusTexture(RenderTexture *texture);
+  virtual void press(unsigned int mouse_button);
+  virtual void release(unsigned int mouse_button);
 
-  inline bool isPressed(void) const { return _pressed; }
-  void press(unsigned int mouse_button);
-  void release(unsigned int mouse_button);
+  virtual void buttonPressHandler(const XButtonEvent &e);
+  virtual void buttonReleaseHandler(const XButtonEvent &e);
 
-  void buttonPressHandler(const XButtonEvent &e);
-  void buttonReleaseHandler(const XButtonEvent &e);
+  virtual void clickHandler(unsigned int button) {(void)button;}
 
-  virtual void setStyle(Style *style);
-  
+  virtual void styleChanged(const RenderStyle &style);
 private:
-
   bool _pressed;
   unsigned int _mouse_button;
-
-  RenderTexture *_pressed_focus_tx;
-  RenderTexture *_pressed_unfocus_tx;
-
-  RenderTexture *_unpr_focus_tx;
-  RenderTexture *_unpr_unfocus_tx;
 };
 
 }
This page took 0.023511 seconds and 4 git commands to generate.