X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fbutton.hh;h=09fc0d6b6494aa28bf9c36e8b1379b2f88e3a7ad;hb=1e46a39dc305fe92b0c0eca1e60e76fded3e5214;hp=fd2e5e4494f8fb91f75d3777d04b84ebe5236821;hpb=8f8acc24933830d4f5784616b9b0c5896bde0b93;p=chaz%2Fopenbox diff --git a/otk/button.hh b/otk/button.hh index fd2e5e44..09fc0d6b 100644 --- a/otk/button.hh +++ b/otk/button.hh @@ -2,49 +2,29 @@ #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 Texture *getPressedFocusTexture(void) const - { return _pressed_focus_tx; } - void setPressedFocusTexture(Texture *texture) - { _pressed_focus_tx = texture; } - - inline const Texture *getPressedUnfocusTexture(void) const - { return _pressed_unfocus_tx; } - void setPressedUnfocusTexture(Texture *texture) - { _pressed_unfocus_tx = texture; } + virtual ~Button(); - void setTexture(Texture *texture); - void setUnfocusTexture(Texture *texture); + virtual inline bool isPressed() const { return _pressed; } - inline bool isPressed(void) const { return _pressed; } - void press(unsigned int mouse_button); - void release(unsigned int mouse_button); + virtual void press(unsigned int mouse_button); + virtual void release(unsigned int mouse_button); - void buttonPressHandler(const XButtonEvent &e); - void buttonReleaseHandler(const XButtonEvent &e); + virtual void buttonPressHandler(const XButtonEvent &e); + virtual void buttonReleaseHandler(const XButtonEvent &e); - virtual void setStyle(Style *style); - + virtual void styleChanged(const RenderStyle &style); + private: - bool _pressed; unsigned int _mouse_button; - - Texture *_pressed_focus_tx; - Texture *_pressed_unfocus_tx; - - Texture *_unpr_focus_tx; - Texture *_unpr_unfocus_tx; }; }