MityDSP Documentation Index

MityDSP::tcGuiCheckBox Class Reference

#include <ggui/gui_checkbox.h>

Inheritance diagram for MityDSP::tcGuiCheckBox:
MityDSP::tcGuiObject

List of all members.

Public Member Functions

 tcGuiCheckBox (const char *name, tcBench *bench, int idd)
 ~tcGuiCheckBox ()
virtual bool ParseXML (TiXmlElement *ahDom)
void create ()
bool is_checked ()
void set_check (bool check)
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_checkbox_callbacks (CHECKBOX_CB checkbox_cb)

Detailed Description

The tcGuiCheckBox class is derived tcGuiObject class implementing a common checkbox style widget.

See also:
tcGuiCheckBox Page

Constructor & Destructor Documentation

tcGuiCheckBox::tcGuiCheckBox ( const char *  name,
tcBench bench,
int  idd 
)

Constructor

Parameters:
name Object ID name from the XML file.
bench The Controlling tcBench object for this widget.
name The windows control ID that we assigned to this control.
tcGuiCheckBox::~tcGuiCheckBox (  ) 

Destructor


Member Function Documentation

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

Parse common XML elements from the DOM.

Reimplemented from MityDSP::tcGuiObject.

void tcGuiCheckBox::create (  )  [virtual]

This function creates the checkbox control.

Note:
This function is called after all of the XML file settings are read.

Reimplemented from MityDSP::tcGuiObject.

bool MityDSP::tcGuiCheckBox::is_checked (  )  [inline]
void tcGuiCheckBox::set_check ( bool  check  ) 

This function sets the check box to a checked state.

Note:
This function differs from the xml_set_check() function in that it will modify the actual windows control. This is called after check box creation, usually from within the script virtual machine.
Parameters:
check true to set the check, false to uncheck it.
void tcGuiCheckBox::set_enabled ( bool  enabled  ) 

This function will set the checkbox to either enabled or disabled state. When enabled, a checkbox acts and draws normally. When disabled, the checkbox draws "grayed out" and ignores user clicks. This routine will invalidate the button.

Parameters:
enabled flag to indicate enabled or disabled
bool MityDSP::tcGuiCheckBox::is_enabled (  )  [inline]
bool tcGuiCheckBox::lbutton_down ( int  x,
int  y 
) [virtual]

Checkbox left button down handler.

Parameters:
x x screen coordinate of mouse event
y x screen coordinate of mouse event
Returns:
true if button event was handled

Reimplemented from MityDSP::tcGuiObject.

void tcGuiCheckBox::lbutton_up ( int  x,
int  y 
) [virtual]

Checkbox left button up handler.

Parameters:
x x screen coordinate of mouse event
y x screen coordinate of mouse event
Returns:
true if button event was handled

Reimplemented from MityDSP::tcGuiObject.

void tcGuiCheckBox::mouse_move ( int  x,
int  y,
int  flags 
) [virtual]

This function handles mouse move events and highlights the checkbox if the mouse is over the box.

Parameters:
x x screen coordinate of mouse event
y x screen coordinate of mouse event
flags - GUI_SHIFT_KEY if shift button held down

  • GUI_CNTRL_KEY if CNTRL button held down

Reimplemented from MityDSP::tcGuiObject.

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

This function draws the checkbox and its label.

Parameters:
pd reference to painting device context to draw in.

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiCheckBox::set_checkbox_callbacks ( CHECKBOX_CB  checkbox_cb  )  [inline]

  
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.