UI::Button Class Reference

Class that represents a GUI button. More...

#include <uimanager.h>

List of all members.

Public Member Functions

 Button (const ustring &text, const Point &p, Callback slot, const ustring &sfx=STR_NULL)
 Constructor.
ustring getText () const
 Get the text in the button.
ustring getSFX () const
 Get the sound effect associated with this button.
Point getPoint () const
 Get the top-left corner where this button is drawn.
Callback getSlot () const
 Get the function callback for this button.

Private Attributes

ustring m_Text
ustring m_SFX
Point m_Point
Callback m_Slot


Detailed Description

Class that represents a GUI button.

For simplicity, each GUI button has to be allocated by providing this class with the proper values. The UI::Manager then handles converting the values to correctly assign the Animation struct members.


Constructor & Destructor Documentation

UI::Button::Button ( const ustring &  text,
const Point p,
Callback  slot,
const ustring &  sfx = STR_NULL 
) [inline]

Constructor.

Parameters:
text The text of the button
p The top-left corner where this button should be drawn
slot The function to call when clicked, or NULL to take no action
sfx Optional sound effect to play on click


Member Function Documentation

ustring UI::Button::getText (  )  const [inline]

Get the text in the button.

Returns:
The button label text

ustring UI::Button::getSFX (  )  const [inline]

Get the sound effect associated with this button.

Returns:
The associated sound effect, or "null" if none

Point UI::Button::getPoint (  )  const [inline]

Get the top-left corner where this button is drawn.

Returns:
The top-left point

Callback UI::Button::getSlot (  )  const [inline]

Get the function callback for this button.

Returns:
The callback function


The documentation for this class was generated from the following file:
Generated on Fri Feb 22 22:29:24 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3