GClasses
|
A button with an image on it. The left half of the image is the unpressed image and the right half is the pressed image. More...
#include <GWidgets.h>
Public Member Functions | |
GWidgetImageButton (GWidgetGroup *pParent, int x, int y, GImage *pImage) | |
virtual | ~GWidgetImageButton () |
virtual WidgetType | type () |
virtual void | draw (GImage *pCanvas, int x, int y) |
Draws this widget on pCanvas at (x,y) | |
bool | isPressed () |
Returns true if the button is currently pressed. | |
Protected Member Functions | |
virtual void | grab (int button, int x, int y) |
virtual void | release (int button) |
virtual void | onMouseMove (int dx, int dy) |
Protected Attributes | |
GImage | m_image |
bool | m_pressed |
bool | m_holding |
int | m_pressedX |
int | m_pressedY |
A button with an image on it. The left half of the image is the unpressed image and the right half is the pressed image.
GClasses::GWidgetImageButton::GWidgetImageButton | ( | GWidgetGroup * | pParent, |
int | x, | ||
int | y, | ||
GImage * | pImage | ||
) |
virtual GClasses::GWidgetImageButton::~GWidgetImageButton | ( | ) | [virtual] |
virtual void GClasses::GWidgetImageButton::draw | ( | GImage * | pCanvas, |
int | x, | ||
int | y | ||
) | [virtual] |
Draws this widget on pCanvas at (x,y)
Implements GClasses::GWidget.
virtual void GClasses::GWidgetImageButton::grab | ( | int | button, |
int | x, | ||
int | y | ||
) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
bool GClasses::GWidgetImageButton::isPressed | ( | ) | [inline] |
Returns true if the button is currently pressed.
virtual void GClasses::GWidgetImageButton::onMouseMove | ( | int | dx, |
int | dy | ||
) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetImageButton::release | ( | int | button | ) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual WidgetType GClasses::GWidgetImageButton::type | ( | ) | [inline, virtual] |
Implements GClasses::GWidget.
bool GClasses::GWidgetImageButton::m_holding [protected] |
GImage GClasses::GWidgetImageButton::m_image [protected] |
bool GClasses::GWidgetImageButton::m_pressed [protected] |
int GClasses::GWidgetImageButton::m_pressedX [protected] |
int GClasses::GWidgetImageButton::m_pressedY [protected] |