all repos — openbox @ dd6f90684899e8e26e653af4b2e7e7eab1abf798

openbox fork - make it a bit more like ryudo

src/buttonwidget.hh (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef   __buttonwidget_hh
#define   __buttonwidget_hh

#include "widgetbase.hh"
#include "otk/widget.hh"

namespace ob {

class ButtonWidget : public otk::Widget, public WidgetBase
{
private:
  void setTextures();
  bool _pressed;
  unsigned int _button;
  
public:
  ButtonWidget(otk::Widget *parent, WidgetBase::WidgetType type);
  virtual ~ButtonWidget();

  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 // __buttonwidget_hh