MityDSP Documentation Index

MityDSP::tcGuiSpinBox Class Reference

#include <ggui/gui_spinbox.h>

Inheritance diagram for MityDSP::tcGuiSpinBox:
MityDSP::tcGuiObject

List of all members.

Public Member Functions

 tcGuiSpinBox (const char *name, tcBench *bench, int idd)
 ~tcGuiSpinBox ()
virtual bool ParseXML (TiXmlElement *ahDom)
void create ()
void set_text_x_pos (int x)
void set_text_y_pos (int y)
void set_userfill (bool userfill)
void set_reverse_roll (bool reverse)
void set_auto_roll (bool autoroll)
void set_strings (const char *str)
void set_selection (int selection, bool callback=false)
int get_selection ()
const char * get_selection_text ()
void clear_str_list ()
void add_str_to_list (const char *str)
void set_user_text (const char *str)
bool lbutton_down (int x, int y)
void lbutton_up (int x, int y)
void mouse_move (int x, int y, int flags)
void animate ()
void draw (tcGuiDspDisplay &pd)
void set_spinbox_callbacks (SPINBOX_SELECT_CB select_cb)

Detailed Description

The tcGuiSpinBox class is a derived tcGuiObject class that implements a skinnable spinbox widget for the GGUI graphics library.

See also:
tcGuiSpinBox Page

Constructor & Destructor Documentation

tcGuiSpinBox::tcGuiSpinBox ( 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.
tcGuiSpinBox::~tcGuiSpinBox (  ) 

Destructor


Member Function Documentation

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

Parse common XML elements from the DOM.

Reimplemented from MityDSP::tcGuiObject.

void tcGuiSpinBox::create (  )  [virtual]

This function creates the image control.

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

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiSpinBox::set_text_x_pos ( int  x  )  [inline, virtual]

Reimplemented from MityDSP::tcGuiObject.

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

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiSpinBox::set_userfill ( bool  userfill  )  [inline]
void MityDSP::tcGuiSpinBox::set_reverse_roll ( bool  reverse  )  [inline]
void MityDSP::tcGuiSpinBox::set_auto_roll ( bool  autoroll  )  [inline]
void tcGuiSpinBox::set_strings ( const char *  str  ) 

Add a string to the string list as well as copy it to the current user string field. This method is called during xml parsing prior to knowing what mode the widget should be operating in.

Parameters:
str string to copy.
Note:
the str parameter is deep copied for the string list, but is only shallow copied (by pointer value only) for the user string, and should not be deallocated.
void tcGuiSpinBox::set_selection ( int  selection,
bool  callback = false 
)

Set the selection shown in the spinbox.

Parameters:
selection index to select
callback if false the normal event callback will be skipped.
int MityDSP::tcGuiSpinBox::get_selection (  )  [inline]
const char * tcGuiSpinBox::get_selection_text (  ) 

Get the currently displayed text

Returns:
pointer to text field displayed.
void MityDSP::tcGuiSpinBox::clear_str_list (  )  [inline]
void MityDSP::tcGuiSpinBox::add_str_to_list ( const char *  str  )  [inline]
void tcGuiSpinBox::set_user_text ( const char *  str  ) 

Set the user defined text for the spinbox

Parameters:
str text string to set
bool tcGuiSpinBox::lbutton_down ( int  x,
int  y 
) [virtual]

This function is the button click event handler.

Parameters:
x screen x position of event.
y screen y position of event.

Reimplemented from MityDSP::tcGuiObject.

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

This function is the button up event handler.

Parameters:
x screen x position of event.
y screen y position of event.

Reimplemented from MityDSP::tcGuiObject.

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

This function will handle mouse motion events.

Parameters:
x screen x position of event.
y screen y position of event.
flags unused

Reimplemented from MityDSP::tcGuiObject.

void tcGuiSpinBox::animate (  )  [virtual]

Update the spinbox if mouse is held down.

Reimplemented from MityDSP::tcGuiObject.

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

This function draws the spinbox

Parameters:
pd reference to painting device context to render into.

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiSpinBox::set_spinbox_callbacks ( SPINBOX_SELECT_CB  select_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.