2002-12-18 11:35:26 +00:00
|
|
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
|
|
|
#ifndef __obbuttonwidget_hh
|
|
|
|
#define __obbuttonwidget_hh
|
|
|
|
|
2002-12-25 22:02:34 +00:00
|
|
|
#include "otk/widget.hh"
|
2002-12-18 11:35:26 +00:00
|
|
|
#include "widget.hh"
|
|
|
|
|
|
|
|
namespace ob {
|
|
|
|
|
2002-12-25 22:02:34 +00:00
|
|
|
class OBButtonWidget : public otk::OtkWidget, public OBWidget
|
2002-12-18 11:35:26 +00:00
|
|
|
{
|
|
|
|
private:
|
2002-12-25 22:02:34 +00:00
|
|
|
void setTextures();
|
|
|
|
bool _pressed;
|
|
|
|
unsigned int _button;
|
2002-12-18 11:35:26 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
OBButtonWidget(otk::OtkWidget *parent, OBWidget::WidgetType type);
|
|
|
|
virtual ~OBButtonWidget();
|
|
|
|
|
|
|
|
virtual void setStyle(otk::Style *style);
|
|
|
|
|
|
|
|
virtual void adjust();
|
2002-12-25 22:02:34 +00:00
|
|
|
|
2002-12-27 10:07:57 +00:00
|
|
|
virtual void update();
|
|
|
|
|
2002-12-25 22:02:34 +00:00
|
|
|
virtual void focus();
|
|
|
|
virtual void unfocus();
|
|
|
|
|
|
|
|
virtual void buttonPressHandler(const XButtonEvent &e);
|
|
|
|
virtual void buttonReleaseHandler(const XButtonEvent &e);
|
2002-12-18 11:35:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __obbuttonwidget_hh
|