WoopsiUI::Button Class Reference

#include <button.h>

Inheritance diagram for WoopsiUI::Button:
WoopsiUI::Label WoopsiUI::Gadget WoopsiUI::CheckBox WoopsiUI::CycleButton WoopsiUI::DecorationGlyphButton WoopsiUI::RadioButton WoopsiUI::WoopsiKey WoopsiUI::WindowBorderButton

List of all members.

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)

Detailed Description

Clickable button gadget. Displays text within the button.


Constructor & Destructor Documentation

WoopsiUI::Button::Button ( s16  x,
s16  y,
u16  width,
u16  height,
const char *  text,
FontBase font = NULL 
)

Constructor for buttons that display a string.

Parameters:
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.
WoopsiUI::Button::Button ( s16  x,
s16  y,
u16  width,
u16  height,
char  letter,
FontBase font = NULL 
)

Constructor for buttons that display a single char.

Parameters:
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.


Member Function Documentation

virtual bool WoopsiUI::Button::click ( s16  x,
s16  y 
) [virtual]

Click this gadget at the supplied co-ordinates.

Parameters:
x X co-ordinate of the click.
y Y co-ordinate of the click.
Returns:
True if the click was successful.

Reimplemented from WoopsiUI::Gadget.

Reimplemented in WoopsiUI::CheckBox, and WoopsiUI::RadioButton.

virtual void WoopsiUI::Button::draw ( Rect  clipRect  )  [virtual]

Draw the region of the textbox within the clipping rect. Should not be called directly.

Parameters:
clipRect The clipping rect to limit drawing to.

Reimplemented from WoopsiUI::Label.

Reimplemented in WoopsiUI::CheckBox, WoopsiUI::CycleButton, WoopsiUI::DecorationGlyphButton, WoopsiUI::RadioButton, and WoopsiUI::WindowBorderButton.

virtual bool WoopsiUI::Button::release ( s16  x,
s16  y 
) [virtual]

Release this gadget at the supplied co-ordinates

Parameters:
x X co-ordinate of the release.
y Y co-ordinate of the release.
Returns:
True if the release was successful.

Reimplemented from WoopsiUI::Gadget.

Reimplemented in WoopsiUI::CycleButton.


The documentation for this class was generated from the following file:

Generated on Sun Nov 15 11:35:36 2009 for Woopsi by  doxygen 1.6.1