X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbuttonwidget.hh;h=16a21184255099e5a2cfdd591aa4fe28d73d8aae;hb=6871cff3face4486055444a6c6218a552ddad461;hp=bb23dd90ea399ae75f76c4554b4839d1648c8768;hpb=83727b8e6404f7e00e7369c39da8779dfb85ae09;p=chaz%2Fopenbox diff --git a/src/buttonwidget.hh b/src/buttonwidget.hh index bb23dd90..16a21184 100644 --- a/src/buttonwidget.hh +++ b/src/buttonwidget.hh @@ -1,25 +1,36 @@ // -*- 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 ButtonWidget : public otk::Widget, public WidgetBase { private: + void setTextures(); + bool _pressed; + unsigned int _button; public: - OBButtonWidget(otk::OtkWidget *parent, OBWidget::WidgetType type); - virtual ~OBButtonWidget(); + ButtonWidget(otk::Widget *parent, WidgetBase::WidgetType type); + virtual ~ButtonWidget(); virtual void setStyle(otk::Style *style); virtual void adjust(); + + virtual void update(); + + virtual void focus(); + virtual void unfocus(); + + virtual void buttonPressHandler(const XButtonEvent &e); + virtual void buttonReleaseHandler(const XButtonEvent &e); }; } -#endif // __obbuttonwidget_hh +#endif // __buttonwidget_hh