#include <ggui/gui_spinbox.h>
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) |
| tcGuiObject (const char *name, tcBench *bench, int idd, uint32 type) |
virtual | ~tcGuiObject () |
const char * | name () |
const GSTRING * | gname () |
uint32 | type () |
int | idd () |
const char * | get_text () |
bool | is_visible () |
int | get_x_pos () |
int | get_y_pos () |
int | get_height () |
int | get_width () |
void | get_rect (tcRect &rect) |
int | get_type () |
virtual tcGuiObject * | get_parent_obj () |
virtual void | show (bool show=true) |
virtual void | hide () |
virtual void | set_text (const char *text) |
virtual void | set_x_pos (int x) |
virtual void | set_y_pos (int y) |
virtual void | set_height (int h) |
virtual void | set_width (int w) |
void | set_image (tcGuiImage *image) |
void | set_text_font (tcDspFont *font) |
void | set_text_font (const char *font_name) |
void | set_text_align (int align) |
void | set_text_color (tsRgb color) |
void | set_text_vertical (bool vert) |
void | set_text_wrap (bool wrap) |
void | set_fg_color (tsRgb color) |
void | set_bg_color (tsRgb color) |
void | set_user_id (int id) |
virtual void | set_animate (bool animate) |
void | set_user_ptr (void *ptr) |
int | get_user_id () |
tsRgb | get_fg_color () |
tsRgb | get_bg_color () |
tsRgb | get_text_color () |
virtual bool | is_point_in (int x, int y) |
virtual bool | is_rect_overlapped (tcRect &rect) |
virtual bool | does_l_mouse () |
void | invalidate (tcRect *bckgrnd_redraw=NULL) |
Additional Inherited Members |
enum | teAlignment {
eeAlignLeft = 0x0000,
eeAlignHCenter = 0x0001,
eeAlignRight = 0x0002,
eeAlignHMask = 0x0003,
eeAlignTop = 0x0000,
eeAlignVCenter = 0x0010,
eeAlignBottom = 0x0020,
eeAlignVMask = 0x0030,
eeAlignCenter = eeAlignHCenter|eeAlignVCenter,
eeAlignTopLeft = eeAlignTop|eeAlignLeft
} |
virtual void | calculate_text_rect (int alignment) |
virtual void | draw_text (tcGuiDspDisplay &pd, int alignment, int dip=0, float opacity=1.0F) |
bool | m_created |
| true when XML file parsing is complete and object has been initialized
|
bool | m_visible |
| true when object is potentially visible on the full screen
|
tcBench * | m_bench |
| pointer to the tcGuiBench (widget manager) object
|
bool | m_animate |
| true if this widget will perform animation
|
GSTRING | m_name |
| name of the widget
|
int | m_idd |
| unique ID number of the widget
|
int | m_x_pos |
| screen x position of the widget
|
int | m_y_pos |
| screen y position of the widget
|
int | m_height |
| widget height
|
int | m_width |
| widget widget
|
tcRect | m_obj_rect |
| bounding rectangle of widget (screen coordinates) (may not include all text)
|
tcRect | m_text_rect |
| bounding rectangle text for widget (screen coordinates)
|
int | m_lcapture_x |
int | m_lcapture_y |
int | m_rcapture_x |
int | m_rcapture_y |
tsRgb | m_fg_color |
| foregroun color to use when rendering tcGuiObject
|
tsRgb | m_bg_color |
| background color to use when rendering tcGuiObject
|
tsRgb | m_text_color |
| color to use when rendering tcGuiObject text
|
tcDspFont * | m_font |
| font to use when rendering tcGuiObject text
|
GSTRING | m_text |
| base tcGuiObject class text data
|
int | m_text_x_pos |
| reference screen x position of object text
|
int | m_text_y_pos |
| reference screen y position of object text
|
int | m_text_align |
| alignment flags used for text rendering
|
bool | m_text_vertical |
bool | m_text_wrap |
| true if this text string should be wrapped to available space when drawn
|
int | m_user_id |
void * | m_user_ptr |
tcGuiImage * | m_image |
| pointer to optional background image
|
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 |
( |
| ) |
|
Member Function Documentation
bool tcGuiSpinBox::ParseXML |
( |
TiXmlElement * |
apElement | ) |
|
|
virtual |
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 | ) |
|
|
inlinevirtual |
void MityDSP::tcGuiSpinBox::set_text_y_pos |
( |
int |
y | ) |
|
|
inlinevirtual |
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:
-
- 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:
-
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 |
This function draws the spinbox
- Parameters:
-
pd | reference to painting device context to render into. |
Reimplemented from MityDSP::tcGuiObject.