openbox/otk/button.hh

33 lines
639 B
C++
Raw Normal View History

// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __button_hh
#define __button_hh
#include "label.hh"
2002-11-11 03:47:12 +00:00
namespace otk {
class Button : public Label {
2002-11-11 03:47:12 +00:00
public:
Button(Widget *parent);
virtual ~Button();
2002-11-14 11:41:50 +00:00
virtual inline bool isPressed() const { return _pressed; }
2002-11-14 11:41:50 +00:00
virtual void press(unsigned int mouse_button);
virtual void release(unsigned int mouse_button);
2002-11-11 03:47:12 +00:00
virtual void buttonPressHandler(const XButtonEvent &e);
virtual void buttonReleaseHandler(const XButtonEvent &e);
2002-11-14 11:41:50 +00:00
virtual void styleChanged(const RenderStyle &style);
2002-11-11 03:47:12 +00:00
private:
bool _pressed;
2002-11-16 13:21:24 +00:00
unsigned int _mouse_button;
2002-11-11 03:47:12 +00:00
};
}
#endif