OpenCOVER
|
#include <coSlider.h>
Public Member Functions | |
coSlider (coSliderActor *actor, bool showValue=true) | |
virtual | ~coSlider () |
virtual int | hit (vruiHit *hit) |
virtual void | miss () |
void | joystickUp () |
increment slidervalue More... | |
void | joystickDown () |
decrementslidervalue More... | |
void | resetLastPressAction () |
no last press action More... | |
void | setValue (float val, bool generateEvent=false) |
float | getValue () const |
void | setMin (float mi) |
float | getMin () const |
void | setMax (float ma) |
float | getMax () const |
void | setNumTicks (float nt) |
float | getNumTicks () const |
void | setPrecision (int nt) |
int | getPrecision () const |
void | setInteger (bool on) |
bool | isInteger () const |
float | getDialSize () const |
void | setPos (float x, float y, float z=0.0f) |
virtual void | setHighlighted (bool highlighted) |
virtual void | setSize (float x, float y, float z) |
virtual void | setSize (float size) |
virtual float | getWidth () const |
Returns element width. More... | |
virtual float | getHeight () const |
Returns element height. More... | |
virtual float | getXpos () const |
Returns element x position. More... | |
virtual float | getYpos () const |
Returns element y position. More... | |
virtual float | getZpos () const |
virtual void | setActive (bool a) |
virtual bool | getActive () |
bool | getShowValue () const |
virtual const char * | getClassName () const |
get the Element's classname More... | |
virtual bool | isOfClassName (const char *) const |
check if the Element or any ancestor is this classname More... | |
Public Member Functions inherited from vrui::coAction | |
coAction () | |
Constructor. More... | |
virtual | ~coAction () |
Destructor. More... | |
void | setFrame (unsigned int frame) |
INTERNAL set the framecounter (used to produce the miss call) More... | |
unsigned int | getFrame () const |
INTERNAL get the framecounter (used to produce the miss call) More... | |
void | setNode (vruiNode *) |
INTERNAL set the node this action belongs to. More... | |
void | addChild (coAction *) |
INTERNAL add a child action. More... | |
virtual int | hitAll (vruiHit *hit) |
INTERNAL same as miss/hit, but do it for all children as well. More... | |
virtual void | missAll () |
INTERNAL same as miss/hit, but do it for all children as well. More... | |
Public Member Functions inherited from vrui::coUIElement | |
coUIElement () | |
virtual | ~coUIElement () |
virtual void | createGeometry () |
virtual void | setParent (coUIContainer *) |
virtual coUIContainer * | getParent () |
virtual void | setEnabled (bool enabled) |
virtual void | setVisible (bool visible) |
virtual bool | isEnabled () const |
virtual bool | isHighlighted () const |
virtual bool | isVisible () const |
virtual float | getDepth () const |
virtual void | childResized (bool shrink=true) |
virtual void | resizeToParent (float, float, float, bool shrink=true) |
virtual void | shrinkToMin () |
Set element location in space. More... | |
virtual float | getResizePref () |
virtual void | setUserData (coUIUserData *) |
virtual coUIUserData * | getUserData () const |
virtual vruiTransformNode * | getDCS () |
virtual vruiUIElementProvider * | getUIElementProvider () const |
virtual void | setAttachment (int) |
sets the attachment border More... | |
virtual int | getAttachment () const |
returns the attachment border More... | |
void | setUniqueName (const char *) |
const char * | getUniqueName () const |
Public Member Functions inherited from vrui::coUpdateable | |
coUpdateable () | |
Constructor. More... | |
virtual | ~coUpdateable () |
Destructor. More... | |
Static Public Member Functions | |
static void | adjustSlider (float &mini, float &maxi, float &, float &step, int &digits) |
Protected Member Functions | |
void | clamp () const |
virtual bool | update () |
Protected Member Functions inherited from vrui::coUIElement | |
virtual void | resizeGeometry () |
virtual const vruiMatrix * | getTransformMatrix () |
Protected Attributes | |
bool | integer |
true = slider processes only integer values More... | |
bool | showValue |
true = the slider value is displayed More... | |
coCombinedButtonInteraction * | interactionA |
interaction for wheel More... | |
coCombinedButtonInteraction * | interactionWheel [2] |
bool | unregister |
true if the interaction should be unregistered More... | |
float | dialSize |
size of slider dial More... | |
coSliderActor * | myActor |
action listener for slider events More... | |
float | myX |
slider element x position in object space [mm] More... | |
float | myY |
slider element y position in object space [mm] More... | |
float | myZ |
slider element z position in object space [mm] More... | |
float | myWidth |
slider width [mm] More... | |
float | myHeight |
slider height [mm] More... | |
float | myDepth |
slider depth [mm] More... | |
float | minVal |
minimum slider value More... | |
float | maxVal |
maximum slider value More... | |
float | value |
current slider value More... | |
float | numTicks |
number of tickmarks on slider dial More... | |
int | precision |
precision of slider value display: number of decimals More... | |
bool | valueChanged |
indicates a value change since last readout More... | |
bool | active_ |
flag if slider is active More... | |
long | lastPressAction |
Protected Attributes inherited from vrui::coAction | |
std::string | actionName |
Protected Attributes inherited from vrui::coUIElement | |
float | xScaleFactor |
UI element x axis scale factor. More... | |
float | yScaleFactor |
UI element y axis scale factor. More... | |
float | zScaleFactor |
UI element z axis scale factor. More... | |
bool | enabled |
true if UI element is enabled, false if UI element cannot be used More... | |
bool | highlighted |
true if highlighted More... | |
bool | visible |
true if UI element is visible, false if not visible but still present in scene tree More... | |
vruiUIElementProvider * | uiElementProvider |
Additional Inherited Members | |
Public Types inherited from vrui::coAction | |
enum | Result { ACTION_DONE = 0x00, ACTION_CALL_ON_MISS = 0x01, ACTION_UNDEF = 0x02 } |
Public Types inherited from vrui::coUIElement | |
enum | Material { RED = 0, GREEN, BLUE, YELLOW, GREY, WHITE, BLACK, DARK_YELLOW, WHITE_NL, ITEM_BACKGROUND_NORMAL, ITEM_BACKGROUND_HIGHLIGHTED, ITEM_BACKGROUND_DISABLED, HANDLE_BACKGROUND_NORMAL, HANDLE_BACKGROUND_HIGHLIGHTED, HANDLE_BACKGROUND_DISABLED, NUM_MATERIALS } |
Color definitions, to be used whenever a material is needed. More... | |
enum | { LEFT = 0, TOP, RIGHT, BOTTOM, REPLACE } |
Public Attributes inherited from vrui::coUIElement | |
enum vrui::coUIElement:: { ... } | Attachments |
This class provides a basic 3D slider, which is based on a texture mapped tickmark field and a round slider position indicator.
vrui::coSlider::coSlider | ( | coSliderActor * | actor, |
bool | showValue = true |
||
) |
|
virtual |
|
static |
|
protected |
|
inlinevirtual |
|
virtual |
get the Element's classname
Reimplemented from vrui::coUIElement.
float vrui::coSlider::getDialSize | ( | ) | const |
|
inlinevirtual |
Returns element height.
Implements vrui::coUIElement.
float vrui::coSlider::getMax | ( | ) | const |
float vrui::coSlider::getMin | ( | ) | const |
float vrui::coSlider::getNumTicks | ( | ) | const |
int vrui::coSlider::getPrecision | ( | ) | const |
bool vrui::coSlider::getShowValue | ( | ) | const |
float vrui::coSlider::getValue | ( | ) | const |
|
inlinevirtual |
Returns element width.
Implements vrui::coUIElement.
|
inlinevirtual |
Returns element x position.
Implements vrui::coUIElement.
|
inlinevirtual |
Returns element y position.
Implements vrui::coUIElement.
|
inlinevirtual |
Reimplemented from vrui::coUIElement.
|
virtual |
hit is called whenever the node, or any node underneath the node with this action is intersected return ACTION_CALL_ON_MISS if you want miss to be called otherwise return ACTION_DONE
Implements vrui::coAction.
bool vrui::coSlider::isInteger | ( | ) | const |
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented from vrui::coUIElement.
void vrui::coSlider::joystickDown | ( | ) |
decrementslidervalue
void vrui::coSlider::joystickUp | ( | ) |
increment slidervalue
|
virtual |
miss is called once after a hit, if the node is not intersected anymore
Reimplemented from vrui::coAction.
void vrui::coSlider::resetLastPressAction | ( | ) |
no last press action
|
virtual |
|
virtual |
Reimplemented from vrui::coUIElement.
void vrui::coSlider::setInteger | ( | bool | on | ) |
void vrui::coSlider::setMax | ( | float | ma | ) |
void vrui::coSlider::setMin | ( | float | mi | ) |
void vrui::coSlider::setNumTicks | ( | float | nt | ) |
|
virtual |
Implements vrui::coUIElement.
void vrui::coSlider::setPrecision | ( | int | nt | ) |
|
virtual |
Reimplemented from vrui::coUIElement.
|
virtual |
Reimplemented from vrui::coUIElement.
void vrui::coSlider::setValue | ( | float | val, |
bool | generateEvent = false |
||
) |
|
protectedvirtual |
this method is called once per frame as long as it returns true. as soon as it returns false, it is removed from the update manager and not called again. the update method is called prior to preFrame();
Implements vrui::coUpdateable.
|
protected |
flag if slider is active
|
protected |
size of slider dial
|
protected |
true = slider processes only integer values
|
protected |
interaction for wheel
interaction for first button
|
protected |
|
protected |
|
protected |
maximum slider value
|
protected |
minimum slider value
|
protected |
action listener for slider events
|
protected |
slider depth [mm]
|
protected |
slider height [mm]
|
protected |
slider width [mm]
|
protected |
slider element x position in object space [mm]
|
protected |
slider element y position in object space [mm]
|
protected |
slider element z position in object space [mm]
|
protected |
number of tickmarks on slider dial
|
protected |
precision of slider value display: number of decimals
|
protected |
true = the slider value is displayed
|
protected |
true if the interaction should be unregistered
|
mutableprotected |
current slider value
|
protected |
indicates a value change since last readout