OpenCOVER
|
#include <coRotButton.h>
Public Member Functions | |
coRotButton (coButtonGeometry *geometry, coRotButtonActor *actor) | |
virtual | ~coRotButton () |
void | setState (bool state, bool generateEvent=false) |
bool | getState () const |
void | updateSwitch () |
bool | isPressed () const |
virtual int | hit (vruiHit *hit) |
virtual void | miss () |
virtual void | onPress () |
virtual void | onRelease () |
void | setPos (float x, float y, float z=0.0f) |
virtual void | setSize (float x, float y, float z) |
virtual void | setSize (float size) |
virtual void | setRotation (float rotation) |
virtual void | setActive (bool a) |
functions activates or deactivates the item More... | |
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 | createGeometry () |
virtual void | resizeGeometry () |
virtual vruiTransformNode * | getDCS () |
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 | setParent (coUIContainer *) |
virtual coUIContainer * | getParent () |
virtual void | setEnabled (bool enabled) |
virtual void | setHighlighted (bool highlighted) |
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 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 |
Protected Attributes | |
bool | selectionState |
true if button is selected by the user More... | |
bool | pressState |
true if the button is currently pressed More... | |
bool | wasReleased |
coButtonGeometry * | myGeometry |
information about visual appearance More... | |
coRotButtonActor * | myActor |
action listener, triggered on button press More... | |
float | myX |
button x position More... | |
float | myY |
button y position More... | |
float | myZ |
button z position More... | |
vruiTransformNode * | myDCS |
vruiTransformNode * | rotationDCS |
float | rotation |
rotation in degrees off ??? orientation More... | |
bool | active_ |
flag if button is active More... | |
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 |
Protected Member Functions inherited from vrui::coUIElement | |
virtual const vruiMatrix * | getTransformMatrix () |
Basic button class providing a selectable rectangular area. This class is derived from coAction for input device events, and it is derived from coUIElement to inherit the basic UI element functionality. Additionally it offers the chance to rotate the content.
vrui::coRotButton::coRotButton | ( | coButtonGeometry * | geometry, |
coRotButtonActor * | actor | ||
) |
|
virtual |
|
virtual |
Reimplemented from vrui::coUIElement.
|
virtual |
get the Element's classname
Reimplemented from vrui::coUIElement.
Reimplemented in vrui::coRotToggleButton, and vrui::coRotPushButton.
|
virtual |
Reimplemented from vrui::coUIElement.
|
inlinevirtual |
Returns element height.
Implements vrui::coUIElement.
bool vrui::coRotButton::getState | ( | ) | 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.
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented from vrui::coUIElement.
Reimplemented in vrui::coRotToggleButton, and vrui::coRotPushButton.
bool vrui::coRotButton::isPressed | ( | ) | const |
|
virtual |
miss is called once after a hit, if the node is not intersected anymore
Reimplemented from vrui::coAction.
Reimplemented in vrui::coRotPushButton.
|
virtual |
Reimplemented in vrui::coRotToggleButton, and vrui::coRotPushButton.
|
virtual |
Reimplemented in vrui::coRotPushButton.
|
virtual |
Reimplemented from vrui::coUIElement.
|
virtual |
functions activates or deactivates the item
|
virtual |
Implements vrui::coUIElement.
|
virtual |
|
virtual |
Reimplemented from vrui::coUIElement.
|
virtual |
Reimplemented from vrui::coUIElement.
void vrui::coRotButton::setState | ( | bool | state, |
bool | generateEvent = false |
||
) |
void vrui::coRotButton::updateSwitch | ( | ) |
|
protected |
flag if button is active
|
protected |
action listener, triggered on button press
|
protected |
|
protected |
information about visual appearance
|
protected |
button x position
|
protected |
button y position
|
protected |
button z position
|
protected |
true if the button is currently pressed
|
protected |
rotation in degrees off ??? orientation
|
protected |
|
protected |
true if button is selected by the user
|
protected |