Overview | All Modules | Tutorial | User's Guide | Programming Guide |
Previous | COVISE Online Documentation | Next |
Basic VRUI GUI element. More...
#include <coUIElement.h>
Public Types | |
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 , BACKGROUND , NUM_MATERIALS } |
Color definitions, to be used whenever a material is needed. More... | |
enum | { LEFT = 0 , TOP , RIGHT , BOTTOM , REPLACE } |
attachment order is counterclockwise like this and describes the side/border which the item is attached to! More... | |
Public Member Functions | |
coUIElement () | |
virtual | ~coUIElement () |
Destructor. More... | |
virtual void | createGeometry () |
virtual void | setParent (coUIContainer *) |
Set parent container. More... | |
virtual coUIContainer * | getParent () |
Get parent container. More... | |
virtual void | setEnabled (bool enabled) |
Set activation state. More... | |
virtual void | setHighlighted (bool highlighted) |
Set highlight state. More... | |
virtual void | setVisible (bool visible) |
Set element visibility. More... | |
virtual bool | isEnabled () const |
Get activation state. More... | |
virtual bool | isHighlighted () const |
Get highlight state. More... | |
virtual bool | isVisible () const |
Get visibility state. More... | |
virtual float | getWidth () const =0 |
Returns element width. More... | |
virtual float | getHeight () const =0 |
Returns element height. More... | |
virtual float | getDepth () const |
Get z axis object size. More... | |
virtual float | getXpos () const =0 |
Returns element x position. More... | |
virtual float | getYpos () const =0 |
Returns element y position. More... | |
virtual float | getZpos () const |
Get z position. More... | |
virtual void | childResized (bool shrink=true) |
This method is called by children whenever they change their size Implementations of this method should call the childResized() of their parent container. More... | |
virtual void | resizeToParent (float, float, float, bool shrink=true) |
This method is called by containers after they resized to allow children to adjust their geometry to the new parents' size Children must not call childResized() of their parent here, as this could lead to an infinite loop. More... | |
virtual void | shrinkToMin () |
Set element location in space. More... | |
virtual void | setPos (float, float, float)=0 |
virtual void | setSize (float, float, float) |
Set UI element size. More... | |
virtual void | setSize (float) |
Set UI element size, use equal values for all dimensions. More... | |
virtual float | getResizePref () |
virtual void | setUserData (coUIUserData *) |
Set the current userdata object. More... | |
virtual coUIUserData * | getUserData () const |
Returns the current userdata object. More... | |
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 |
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... | |
Static Public Member Functions | |
static vruiMatrix * | getMatrixFromPositionHprScale (float x, float y, float z, float h, float p, float r, float scale) |
Constructor. More... | |
Public Attributes | |
enum vrui::coUIElement:: { ... } | Attachments |
attachment order is counterclockwise like this and describes the side/border which the item is attached to! More... | |
Protected Member Functions | |
virtual void | resizeGeometry () |
virtual const vruiMatrix * | getTransformMatrix () |
Protected Attributes | |
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 |
Basic VRUI GUI element.
This class provides functionality for all VRUI elements like position, size, font, visibility, availability, parent, etc.
At least this class should be subclassed for any new GUI element types.
All inheritable functions are defined virtual so that they can be overwritten by subclasses.
anonymous enum |
Color definitions, to be used whenever a material is needed.
vrui::coUIElement::coUIElement | ( | ) |
|
virtual |
Destructor.
|
virtual |
This method is called by children whenever they change their size Implementations of this method should call the childResized() of their parent container.
This method calls shrinkToMin if shrink is true (the default) and resizeToParent to trigger a resize on all children if this is the topmost element in the tree
|
virtual |
Reimplemented in vrui::coButton, vrui::coPopupHandle, vrui::coRotButton, and vrui::coRowMenuHandle.
|
inlinevirtual |
returns the attachment border
Reimplemented in vrui::coRowContainer.
|
virtual |
get the Element's classname
Reimplemented in vrui::coBackground, vrui::coButton, vrui::coPushButton, vrui::coToggleButton, vrui::coColoredBackground, vrui::coFrame, vrui::coLabel, vrui::coMenuContainer, vrui::coPanel, vrui::coPopupHandle, vrui::coProgressBar, vrui::coRotButton, vrui::coRotPushButton, vrui::coRotToggleButton, vrui::coRowContainer, vrui::coRowMenuHandle, vrui::coSlider, vrui::coTexturedBackground, vrui::coTextureRectBackground, vrui::coToolboxMenuHandle, vrui::coUIContainer, vrui::coValuePoti, and vrui::coSlopePoti.
|
virtual |
Reimplemented in vrui::coButton, vrui::coPanel, vrui::coRotButton, and vrui::coRowContainer.
|
virtual |
Get z axis object size.
Reimplemented in vrui::coBackground, vrui::coFrame, vrui::coLabel, and vrui::coRowContainer.
|
pure virtual |
Returns element height.
Implemented in vrui::coBackground, vrui::coButton, vrui::coFrame, vrui::coLabel, vrui::coPanel, vrui::coRotButton, vrui::coRowContainer, vrui::coSlider, and vrui::coValuePoti.
|
static |
Constructor.
|
virtual |
Get parent container.
|
inlinevirtual |
|
protectedvirtual |
|
inlinevirtual |
const char * vrui::coUIElement::getUniqueName | ( | ) | const |
|
virtual |
Returns the current userdata object.
|
pure virtual |
Returns element width.
Implemented in vrui::coBackground, vrui::coButton, vrui::coFrame, vrui::coLabel, vrui::coPanel, vrui::coRotButton, vrui::coRowContainer, vrui::coSlider, and vrui::coValuePoti.
|
pure virtual |
Returns element x position.
Implemented in vrui::coBackground, vrui::coButton, vrui::coFrame, vrui::coLabel, vrui::coPanel, vrui::coRotButton, vrui::coRowContainer, vrui::coSlider, and vrui::coValuePoti.
|
pure virtual |
Returns element y position.
Implemented in vrui::coBackground, vrui::coButton, vrui::coFrame, vrui::coLabel, vrui::coPanel, vrui::coRotButton, vrui::coRowContainer, vrui::coSlider, and vrui::coValuePoti.
|
virtual |
Get z position.
Reimplemented in vrui::coBackground, vrui::coButton, vrui::coFrame, vrui::coLabel, vrui::coPanel, vrui::coRotButton, vrui::coRowContainer, and vrui::coSlider.
|
virtual |
Get activation state.
|
virtual |
Get highlight state.
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented in vrui::coBackground, vrui::coButton, vrui::coPushButton, vrui::coToggleButton, vrui::coColoredBackground, vrui::coFrame, vrui::coLabel, vrui::coMenuContainer, vrui::coPanel, vrui::coPopupHandle, vrui::coProgressBar, vrui::coRotButton, vrui::coRotPushButton, vrui::coRotToggleButton, vrui::coRowContainer, vrui::coRowMenuHandle, vrui::coSlider, vrui::coTexturedBackground, vrui::coTextureRectBackground, vrui::coToolboxMenuHandle, vrui::coUIContainer, vrui::coValuePoti, and vrui::coSlopePoti.
|
virtual |
Get visibility state.
|
protectedvirtual |
Reimplemented in vrui::coBackground, vrui::coButton, vrui::coLabel, vrui::coRotButton, and vrui::coUIContainer.
|
virtual |
This method is called by containers after they resized to allow children to adjust their geometry to the new parents' size Children must not call childResized() of their parent here, as this could lead to an infinite loop.
Derived elements do not have to implement this method.
newWidth,newHeight,newDepth | desired size |
Reimplemented in vrui::coProgressBar, vrui::coUIContainer, vrui::coBackground, vrui::coFrame, vrui::coMenuContainer, vrui::coPopupHandle, vrui::coRowContainer, and vrui::coRowMenuHandle.
|
inlinevirtual |
sets the attachment border
Reimplemented in vrui::coRowContainer.
|
virtual |
Set activation state.
en | true = element enabled |
Reimplemented in vrui::coTexturedBackground, vrui::coTextureRectBackground, vrui::coBackground, vrui::coColoredBackground, vrui::coUIContainer, and vrui::coValuePoti.
|
virtual |
Set highlight state.
hl | true = element highlighted |
Reimplemented in vrui::coBackground, vrui::coColoredBackground, vrui::coLabel, vrui::coSlider, vrui::coUIContainer, vrui::coTexturedBackground, and vrui::coTextureRectBackground.
|
virtual |
Set parent container.
c | parent container |
|
pure virtual |
Implemented in vrui::coBackground, vrui::coButton, vrui::coFrame, vrui::coLabel, vrui::coPanel, vrui::coRotButton, vrui::coRowContainer, vrui::coSlider, and vrui::coValuePoti.
|
virtual |
Set UI element size, use equal values for all dimensions.
s | size = scaling factor (1 is default) |
Reimplemented in vrui::coFrame, vrui::coBackground, vrui::coLabel, vrui::coRotButton, vrui::coSlider, vrui::coValuePoti, and vrui::coButton.
|
virtual |
Set UI element size.
Use different values for all dimensions.
xs,ys,zs | size = scaling factor for respective dimension (1 is default) |
Reimplemented in vrui::coBackground, vrui::coFrame, vrui::coValuePoti, vrui::coRotButton, vrui::coSlider, vrui::coLabel, and vrui::coButton.
void vrui::coUIElement::setUniqueName | ( | const char * | newname | ) |
|
virtual |
Set the current userdata object.
user | new userdata object |
|
virtual |
Set element visibility.
newState | true = element visible |
|
virtual |
Set element location in space.
This method is called to shrink the element to its smallest size.
Usually this is done before resizing containers.
Reimplemented in vrui::coBackground, vrui::coFrame, vrui::coPopupHandle, vrui::coRowContainer, vrui::coRowMenuHandle, vrui::coTexturedBackground, and vrui::coUIContainer.
enum { ... } vrui::coUIElement::Attachments |
attachment order is counterclockwise like this and describes the side/border which the item is attached to!
|
protected |
true if UI element is enabled, false if UI element cannot be used
|
protected |
true if highlighted
|
protected |
|
protected |
true if UI element is visible, false if not visible but still present in scene tree
|
protected |
UI element x axis scale factor.
|
protected |
UI element y axis scale factor.
|
protected |
UI element z axis scale factor.
Previous | Next |
Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner |
Copyright © 1993-2009 HLRS, 2004-2009 RRZK, 2005-2009 Visenso |
COVISE Version 6.5 Academic
|