#include <button.h>
Public Member Functions | |
| Button (s16 x, s16 y, u16 width, u16 height, const char *text, FontBase *font=NULL) | |
| Button (s16 x, s16 y, u16 width, u16 height, char letter, FontBase *font=NULL) | |
| virtual void | draw (Rect clipRect) |
| virtual bool | click (s16 x, s16 y) |
| virtual bool | release (s16 x, s16 y) |
Protected Member Functions | |
| virtual | ~Button () |
| Button (const Button &button) | |
Clickable button gadget. Displays text within the button.
| Button::Button | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| const char * | text, | |||
| FontBase * | font = NULL | |||
| ) |
Constructor for buttons that display a string.
| x | The x co-ordinate of the button, relative to its parent. | |
| y | The y co-ordinate of the button, relative to its parent. | |
| width | The width of the button. | |
| height | The height of the button. | |
| text | The text for the button to display. | |
| font | The font that the button should use. |
| Button::Button | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| char | letter, | |||
| FontBase * | font = NULL | |||
| ) |
Constructor for buttons that display a single char.
| x | The x co-ordinate of the button, relative to its parent. | |
| y | The y co-ordinate of the button, relative to its parent. | |
| width | The width of the button. | |
| height | The height of the button. | |
| letter | The character for the button to display. | |
| font | The font that the button should use. |
| virtual WoopsiUI::Button::~Button | ( | ) | [inline, protected, virtual] |
Destructor.
| WoopsiUI::Button::Button | ( | const Button & | button | ) | [inline, protected] |
Copy constructor is protected to prevent usage.
| bool Button::click | ( | s16 | x, | |
| s16 | y | |||
| ) | [virtual] |
Click this gadget at the supplied co-ordinates.
| x | X co-ordinate of the click. | |
| y | Y co-ordinate of the click. |
Reimplemented from WoopsiUI::Gadget.
Reimplemented in WoopsiUI::CheckBox, and WoopsiUI::RadioButton.
| void Button::draw | ( | Rect | clipRect | ) | [virtual] |
Draw the region of the textbox within the clipping rect. Should not be called directly.
| clipRect | The clipping rect to limit drawing to. |
Reimplemented from WoopsiUI::Label.
Reimplemented in WoopsiUI::CheckBox, WoopsiUI::CycleButton, WoopsiUI::DecorationGlyphButton, WoopsiUI::RadioButton, WoopsiUI::SkinnedScreenDepthButton, WoopsiUI::SkinnedScreenFlipButton, WoopsiUI::SkinnedWindowCloseButton, WoopsiUI::SkinnedWindowDepthButton, and WoopsiUI::WindowBorderButton.
| bool Button::release | ( | s16 | x, | |
| s16 | y | |||
| ) | [virtual] |
Release this gadget at the supplied co-ordinates
| x | X co-ordinate of the release. | |
| y | Y co-ordinate of the release. |
Reimplemented from WoopsiUI::Gadget.
Reimplemented in WoopsiUI::CycleButton.
1.6.1