OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vrui::coSlider Class Reference

#include <coSlider.h>

Inheritance diagram for vrui::coSlider:
Inheritance graph
[legend]
Collaboration diagram for vrui::coSlider:
Collaboration graph
[legend]

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 coUIContainergetParent ()
 
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 coUIUserDatagetUserData () const
 
virtual vruiTransformNodegetDCS ()
 
virtual vruiUIElementProvidergetUIElementProvider () 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 vruiMatrixgetTransformMatrix ()
 

Protected Attributes

bool integer
 true = slider processes only integer values More...
 
bool showValue
 true = the slider value is displayed More...
 
coCombinedButtonInteractioninteractionA
 interaction for wheel More...
 
coCombinedButtonInteractioninteractionWheel
 
bool unregister
 true if the interaction should be unregistered More...
 
float dialSize
 size of slider dial More...
 
coSliderActormyActor
 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...
 
vruiUIElementProvideruiElementProvider
 

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
 

Detailed Description

This class provides a basic 3D slider, which is based on a texture mapped tickmark field and a round slider position indicator.

Constructor & Destructor Documentation

vrui::coSlider::coSlider ( coSliderActor actor,
bool  showValue = true 
)
virtual vrui::coSlider::~coSlider ( )
virtual

Member Function Documentation

static void vrui::coSlider::adjustSlider ( float &  mini,
float &  maxi,
float &  ,
float &  step,
int &  digits 
)
static
void vrui::coSlider::clamp ( ) const
protected
virtual bool vrui::coSlider::getActive ( )
inlinevirtual
virtual const char* vrui::coSlider::getClassName ( ) const
virtual

get the Element's classname

Reimplemented from vrui::coUIElement.

float vrui::coSlider::getDialSize ( ) const
virtual float vrui::coSlider::getHeight ( ) 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
virtual float vrui::coSlider::getWidth ( ) const
inlinevirtual

Returns element width.

Implements vrui::coUIElement.

virtual float vrui::coSlider::getXpos ( ) const
inlinevirtual

Returns element x position.

Implements vrui::coUIElement.

virtual float vrui::coSlider::getYpos ( ) const
inlinevirtual

Returns element y position.

Implements vrui::coUIElement.

virtual float vrui::coSlider::getZpos ( ) const
inlinevirtual

Reimplemented from vrui::coUIElement.

virtual int vrui::coSlider::hit ( vruiHit hit)
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 bool vrui::coSlider::isOfClassName ( const char *  ) 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 void vrui::coSlider::miss ( )
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 void vrui::coSlider::setActive ( bool  a)
virtual
virtual void vrui::coSlider::setHighlighted ( bool  highlighted)
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)
void vrui::coSlider::setPos ( float  x,
float  y,
float  z = 0.0f 
)
virtual

Implements vrui::coUIElement.

void vrui::coSlider::setPrecision ( int  nt)
virtual void vrui::coSlider::setSize ( float  x,
float  y,
float  z 
)
virtual

Reimplemented from vrui::coUIElement.

virtual void vrui::coSlider::setSize ( float  size)
virtual

Reimplemented from vrui::coUIElement.

void vrui::coSlider::setValue ( float  val,
bool  generateEvent = false 
)
virtual bool vrui::coSlider::update ( )
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.

Member Data Documentation

bool vrui::coSlider::active_
protected

flag if slider is active

float vrui::coSlider::dialSize
protected

size of slider dial

bool vrui::coSlider::integer
protected

true = slider processes only integer values

coCombinedButtonInteraction* vrui::coSlider::interactionA
protected

interaction for wheel

interaction for first button

coCombinedButtonInteraction* vrui::coSlider::interactionWheel
protected
long vrui::coSlider::lastPressAction
protected
float vrui::coSlider::maxVal
protected

maximum slider value

float vrui::coSlider::minVal
protected

minimum slider value

coSliderActor* vrui::coSlider::myActor
protected

action listener for slider events

float vrui::coSlider::myDepth
protected

slider depth [mm]

float vrui::coSlider::myHeight
protected

slider height [mm]

float vrui::coSlider::myWidth
protected

slider width [mm]

float vrui::coSlider::myX
protected

slider element x position in object space [mm]

float vrui::coSlider::myY
protected

slider element y position in object space [mm]

float vrui::coSlider::myZ
protected

slider element z position in object space [mm]

float vrui::coSlider::numTicks
protected

number of tickmarks on slider dial

int vrui::coSlider::precision
protected

precision of slider value display: number of decimals

bool vrui::coSlider::showValue
protected

true = the slider value is displayed

bool vrui::coSlider::unregister
protected

true if the interaction should be unregistered

float vrui::coSlider::value
mutableprotected

current slider value

bool vrui::coSlider::valueChanged
protected

indicates a value change since last readout


The documentation for this class was generated from the following file: