MityDSP::tcGuiSlider Class Reference
#include <ggui/gui_slider.h>
List of all members.
Detailed Description
The tcGuiSlider class is a widget class for a sliding control.
- See also:
- tcGuiSlider Page
Constructor & Destructor Documentation
tcGuiSlider::tcGuiSlider |
( |
const char * |
name, |
|
|
tcBench * |
bench, |
|
|
int |
idd | |
|
) |
| | |
Constructor
- Parameters:
-
| name | Object ID name from the XML file. |
| bench | Controlling tcBench class for this widget. |
| idd | The windows control ID that we assigned to this control. |
tcGuiSlider::~tcGuiSlider |
( |
|
) |
|
Destructor
- Parameters:
-
| name | Object ID name from the XML file. |
| bench | Controlling tcBench class for this widget. |
| idd | The windows control ID that we assigned to this control. |
Member Function Documentation
bool tcGuiSlider::ParseXML |
( |
TiXmlElement * |
apElement |
) |
[virtual] |
void MityDSP::tcGuiSlider::set_direction |
( |
int |
dir |
) |
[inline] |
void MityDSP::tcGuiSlider::set_slider_pos |
( |
int |
pos |
) |
[inline] |
void MityDSP::tcGuiSlider::set_thumb_image |
( |
tcGuiImage * |
image |
) |
[inline] |
void tcGuiSlider::create |
( |
|
) |
[virtual] |
This function creates the slider.
- Note:
- This function is called after all of the XML file settings are read.
Reimplemented from MityDSP::tcGuiObject.
void tcGuiSlider::set_position |
( |
int |
pos |
) |
|
This function moves the slider to the specified position.
- Note:
- It does NOT invoke an action, it is intended to be called from the script VM.
- Parameters:
-
bool tcGuiSlider::lbutton_down |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
Slider 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 tcGuiSlider::lbutton_up |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
Slider 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 tcGuiSlider::mouse_move |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
flags | |
|
) |
| | [virtual] |
This function moves the slider positions when the mouse is dragged through the control. After scaling the new mouse positions to slider positions, an action may be called if the slider positions have changed.
- 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.
This function draws the slider and its label.
- Parameters:
-
| pd | reference to painting device context to draw in. |
Reimplemented from MityDSP::tcGuiObject.
void MityDSP::tcGuiSlider::set_slider_callbacks |
( |
SLIDER_POSITION_CB |
slider_position_cb |
) |
[inline] |
virtual int MityDSP::tcGuiSlider::get_min_range |
( |
|
) |
[inline, virtual] |
virtual int MityDSP::tcGuiSlider::get_max_range |
( |
|
) |
[inline, virtual] |
virtual int MityDSP::tcGuiSlider::get_position |
( |
|
) |
[inline, virtual] |
void MityDSP::tcGuiSlider::set_min_range |
( |
int |
range |
) |
[inline] |
void MityDSP::tcGuiSlider::set_max_range |
( |
int |
range |
) |
[inline] |
int tcGuiSlider::slide_to_draw_pos |
( |
int |
slide_pos |
) |
[protected] |
Determine pixel offset within widget to draw the "thumb" portion of the slider control.
- Parameters:
-
| slide_pos | position of slider (m_min_range <= slide_pos <= m_max_range) |
- Returns:
- y pixel offset if m_direction is SLIDER_VERT else x pixel offset
int tcGuiSlider::draw_to_slide_pos |
( |
int |
draw_pos |
) |
[protected] |
Determine logical slide position of widget given a thumb drawing position
- Parameters:
-
| y | pixel offset if m_direction is SLIDER_VERT else x pixel offset |
- Returns:
- slide_pos position of slider (m_min_range <= slide_pos <= m_max_range)
void tcGuiSlider::mouse_delta |
( |
int |
delta, |
|
|
int |
flags | |
|
) |
| | [protected] |
I really don't know what this does.
- Parameters:
-
| delta | a change |
| flags | - GUI_SHIFT_KEY if shift button held down
- GUI_CNTRL_KEY if CNTRL button held down
|
Member Data Documentation
Minimum position (not used by all objects).
Maximum position (not used by all objects).
Current position (not used by all objects).
image represending sliding portion/knob of widget
width of the sliding portion/knob of the widget
height of the sliding portion/know of the widget
true if the thumb support highlighting
true if the slider clicked
callback for active slider