MityDSP::tcGuiButton Class Reference
#include <ggui/gui_button.h>
List of all members.
Detailed Description
The tcGuiButton class is a widget class for a basic skinnable pushbutton.
- See also:
- tcGuiButton Page
Constructor & Destructor Documentation
tcGuiButton::tcGuiButton |
( |
const char * |
name, |
|
|
tcBench * |
bench, |
|
|
int |
idd | |
|
) |
| | |
Constructor
- Parameters:
-
| name | Object ID name from the XML file. |
| bench | Controlling tcBench class for the object. |
| idd | The windows control ID that we assigned to this control. |
tcGuiButton::~tcGuiButton |
( |
|
) |
|
Member Function Documentation
bool tcGuiButton::ParseXML |
( |
TiXmlElement * |
apElement |
) |
[virtual] |
void tcGuiButton::create |
( |
|
) |
[virtual] |
This function creates the button.
- Note:
- This function is called after all of the XML file settings are read.
Reimplemented from MityDSP::tcGuiObject.
void MityDSP::tcGuiButton::set_text_x_pos |
( |
int |
x |
) |
[inline, virtual] |
void MityDSP::tcGuiButton::set_text_y_pos |
( |
int |
y |
) |
[inline, virtual] |
void tcGuiButton::set_state |
( |
int |
state |
) |
|
This function will set the 3-image set of the button image to the value specified. This routine will invalidate the button.
- Parameters:
-
| state | zero-based offset to image section to draw |
int MityDSP::tcGuiButton::get_state |
( |
|
) |
[inline] |
void tcGuiButton::set_enabled |
( |
bool |
enabled |
) |
|
This function will set the button to either enabled or disabled state. When enabled, a button acts and draws normally. When disabled, the button draws "grayed out" and ignores user clicks. This routine will invalidate the button.
- Parameters:
-
| enabled | flag to indicate enabled or disabled |
bool MityDSP::tcGuiButton::is_enabled |
( |
|
) |
[inline] |
bool tcGuiButton::lbutton_down |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
This function is the left button down event handler.
- Parameters:
-
| x | x coordinate of button event |
| y | y coordinate of button event |
- Returns:
- true if button event was handled
Reimplemented from MityDSP::tcGuiObject.
void tcGuiButton::lbutton_up |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
This function is the left button up event handler.
- Parameters:
-
| x | x coordinate of button event |
| y | y coordinate of button event |
Reimplemented from MityDSP::tcGuiObject.
void tcGuiButton::mouse_move |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
flags | |
|
) |
| | [virtual] |
This function is the mouse move event handler.
- Parameters:
-
| x | x coordinate of mouse event |
| y | y coordinate of mouse event |
| flags | not used |
Reimplemented from MityDSP::tcGuiObject.
This function draws the control.
- Parameters:
-
| pd | reference windows device context to draw in. |
Reimplemented from MityDSP::tcGuiObject.
Stuff callback functions from GUI thread for button click events.
- Parameters:
-
| button_push_cb | callback for button clicked events |
| button_event_cb | callback for button clicked events, difference callback footprint |
- Note:
- old callbacks are overwritten with this call.