MityDSP Documentation Index

MityDSP::tcGuiButton Class Reference

#include <ggui/gui_button.h>

Inheritance diagram for MityDSP::tcGuiButton:
MityDSP::tcGuiObject

List of all members.

Public Member Functions

 tcGuiButton (const char *name, tcBench *bench, int idd)
 ~tcGuiButton ()
virtual bool ParseXML (TiXmlElement *ahDom)
void create ()
void set_text_x_pos (int x)
void set_text_y_pos (int y)
void set_state (int state)
int get_state ()
void set_enabled (bool enabled)
bool is_enabled ()
bool lbutton_down (int x, int y)
void lbutton_up (int x, int y)
void mouse_move (int x, int y, int flags)
void draw (tcGuiDspDisplay &pd)
void set_button_callbacks (BUTTON_PUSH_CB button_push_cb, BUTTON_EVENT_CB button_event_cb=NULL)

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 (  ) 

Destructor


Member Function Documentation

bool tcGuiButton::ParseXML ( TiXmlElement *  apElement  )  [virtual]

Parse common XML elements from the DOM.

Reimplemented from MityDSP::tcGuiObject.

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]

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiButton::set_text_y_pos ( int  y  )  [inline, virtual]

Reimplemented from MityDSP::tcGuiObject.

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.

void tcGuiButton::draw ( tcGuiDspDisplay pd  )  [virtual]

This function draws the control.

Parameters:
pd reference windows device context to draw in.

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiButton::set_button_callbacks ( BUTTON_PUSH_CB  button_push_cb,
BUTTON_EVENT_CB  button_event_cb = NULL 
) [inline]

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.

  
Generated on Wed Mar 17 18:24:43 2010 for MityDSP Skinnable Graphics User Interface (GGUI) by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.