MityDSP::tcGuiKnob Class Reference
#include <ggui/gui_knob.h>
List of all members.
Detailed Description
The tcGuiKnob class is a derived tcGuiObject class that implements a skinnable spinning knob (e.g., an analog dial that goes to 11) control.
- See also:
- tcGuiKnob Page
Constructor & Destructor Documentation
tcGuiKnob::tcGuiKnob |
( |
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. |
tcGuiKnob::~tcGuiKnob |
( |
|
) |
[virtual] |
Member Function Documentation
bool tcGuiKnob::ParseXML |
( |
TiXmlElement * |
apElement |
) |
[virtual] |
void tcGuiKnob::create |
( |
|
) |
[virtual] |
This function creates the knob control.
- Note:
- This function is called after all of the XML file settings are read.
Reimplemented from MityDSP::tcGuiObject.
void tcGuiKnob::set_position |
( |
int |
pos |
) |
|
This function moves the X & Y sliders to the specified position.
- Note:
- It does NOT invoke an action, it is intended to be called from the script VM.
- Parameters:
-
bool tcGuiKnob::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 tcGuiKnob::lbutton_up |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
This function is the button up event handler. It is needed by the listbox to release the scrollbar sliding state if the scrollbar is currently activated.
- Parameters:
-
| x | screen x position of event. |
| y | screen y position of event. |
Reimplemented from MityDSP::tcGuiObject.
void tcGuiKnob::mouse_move |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
flags | |
|
) |
| | [virtual] |
This function moves the XY slider positions when the mouse is dragged through the XY control. After scaling the new line positions to slider positions, an action may be called if the slider positions have changed.
- Parameters:
-
| x | Delta of the X line position. |
| y | Delta of the Y line position. - GUI_SHIFT_KEY if shift button held down
- GUI_CNTRL_KEY if CNTRL button held down
|
Reimplemented from MityDSP::tcGuiObject.
This function draws the knob.
- Parameters:
-
| pd | reference to painting device context to render into. |
Reimplemented from MityDSP::tcGuiObject.
void MityDSP::tcGuiKnob::set_knob_callbacks |
( |
KNOB_POSITION_CB |
knob_position_cb |
) |
[inline] |
virtual int MityDSP::tcGuiKnob::get_min_range |
( |
|
) |
[inline, virtual] |
virtual int MityDSP::tcGuiKnob::get_max_range |
( |
|
) |
[inline, virtual] |
virtual int MityDSP::tcGuiKnob::get_position |
( |
|
) |
[inline, virtual] |
void MityDSP::tcGuiKnob::set_min_range |
( |
int |
range |
) |
[inline] |
void MityDSP::tcGuiKnob::set_max_range |
( |
int |
range |
) |
[inline] |
void tcGuiKnob::mouse_delta |
( |
int |
delta |
) |
[protected] |
Update the position of the knob based on the amount of mouse movement.
- Parameters:
-
| delta | amount of mouse movement in pixels |
- Note:
- this routine will invalidate the widget if necessary
Member Data Documentation
true if the knob is clicked
current knob position, used for indexing image sections
callback for knob position changes.