openbox/otk/button.hh
Dana Jansens 99cd843fc6 Brand spankin new widgets for otk (Label and Button).
Add a new Size class.
Rect, Point, and Size are immutable classes.
Size uses *UNSIGNED* ints. This is causing me headaches * a bajillion right now, so we'll see about that.
2003-02-08 07:33:48 +00:00

36 lines
755 B
C++

// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __button_hh
#define __button_hh
#include "label.hh"
namespace otk {
class Button : public Label {
public:
Button(Widget *parent);
virtual ~Button();
virtual inline bool isDefault() const { return _default; }
virtual void setDefault(bool d);
virtual inline bool isPressed() const { return _pressed; }
virtual void press(unsigned int mouse_button);
virtual void release(unsigned int mouse_button);
virtual void buttonPressHandler(const XButtonEvent &e);
virtual void buttonReleaseHandler(const XButtonEvent &e);
virtual void styleChanged(const RenderStyle &style);
private:
bool _default;
bool _pressed;
unsigned int _mouse_button;
};
}
#endif