OpenCOVER
|
#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, NUM_MATERIALS } |
Color definitions, to be used whenever a material is needed. More... | |
enum | { LEFT = 0, TOP, RIGHT, BOTTOM, REPLACE } |
Public Member Functions | |
coUIElement () | |
virtual | ~coUIElement () |
virtual void | createGeometry () |
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 | getWidth () const =0 |
Returns element width. More... | |
virtual float | getHeight () const =0 |
Returns element height. More... | |
virtual float | getDepth () const |
virtual float | getXpos () const =0 |
Returns element x position. More... | |
virtual float | getYpos () const =0 |
Returns element y position. More... | |
virtual float | getZpos () 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 void | setPos (float, float, float)=0 |
virtual void | setSize (float, float, float) |
virtual void | setSize (float) |
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 |
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 Attributes | |
enum vrui::coUIElement:: { ... } | Attachments |
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 |
|
virtual |
|
virtual |
Reimplemented in vrui::coButton, vrui::coRotButton, vrui::coRowMenuHandle, and vrui::coPopupHandle.
|
inlinevirtual |
returns the attachment border
Reimplemented in vrui::coRowContainer.
|
virtual |
get the Element's classname
Reimplemented in vrui::coSlopePoti, vrui::coTextureRectBackground, vrui::coTexturedBackground, vrui::coValuePoti, vrui::coRotToggleButton, vrui::coToggleButton, vrui::coRotPushButton, vrui::coPushButton, vrui::coSlider, vrui::coLabel, vrui::coFrame, vrui::coRotButton, vrui::coRowContainer, vrui::coButton, vrui::coPanel, vrui::coRowMenuHandle, vrui::coToolboxMenuHandle, vrui::coPopupHandle, vrui::coBackground, vrui::coUIContainer, vrui::coProgressBar, vrui::coColoredBackground, and vrui::coMenuContainer.
|
virtual |
Reimplemented in vrui::coRotButton, vrui::coButton, vrui::coPanel, and vrui::coRowContainer.
|
virtual |
Reimplemented in vrui::coLabel, vrui::coRowContainer, vrui::coFrame, and vrui::coBackground.
|
pure virtual |
Returns element height.
Implemented in vrui::coValuePoti, vrui::coSlider, vrui::coRotButton, vrui::coButton, vrui::coPanel, vrui::coLabel, vrui::coRowContainer, vrui::coFrame, and vrui::coBackground.
|
virtual |
|
inlinevirtual |
|
protectedvirtual |
|
inlinevirtual |
const char* vrui::coUIElement::getUniqueName | ( | ) | const |
|
virtual |
|
pure virtual |
Returns element width.
Implemented in vrui::coValuePoti, vrui::coSlider, vrui::coRotButton, vrui::coButton, vrui::coPanel, vrui::coLabel, vrui::coRowContainer, vrui::coFrame, and vrui::coBackground.
|
pure virtual |
Returns element x position.
Implemented in vrui::coValuePoti, vrui::coSlider, vrui::coRotButton, vrui::coLabel, vrui::coRowContainer, vrui::coButton, vrui::coPanel, vrui::coFrame, and vrui::coBackground.
|
pure virtual |
Returns element y position.
Implemented in vrui::coValuePoti, vrui::coSlider, vrui::coRotButton, vrui::coLabel, vrui::coRowContainer, vrui::coButton, vrui::coPanel, vrui::coFrame, and vrui::coBackground.
|
virtual |
Reimplemented in vrui::coSlider, vrui::coRotButton, vrui::coLabel, vrui::coRowContainer, vrui::coButton, vrui::coPanel, vrui::coFrame, and vrui::coBackground.
|
virtual |
|
virtual |
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented in vrui::coSlopePoti, vrui::coTextureRectBackground, vrui::coTexturedBackground, vrui::coValuePoti, vrui::coRotToggleButton, vrui::coToggleButton, vrui::coRotPushButton, vrui::coPushButton, vrui::coSlider, vrui::coLabel, vrui::coFrame, vrui::coRotButton, vrui::coRowContainer, vrui::coButton, vrui::coPanel, vrui::coRowMenuHandle, vrui::coToolboxMenuHandle, vrui::coPopupHandle, vrui::coBackground, vrui::coUIContainer, vrui::coProgressBar, vrui::coColoredBackground, and vrui::coMenuContainer.
|
virtual |
|
protectedvirtual |
Reimplemented in vrui::coLabel, vrui::coButton, vrui::coRotButton, vrui::coUIContainer, and vrui::coBackground.
|
virtual |
|
inlinevirtual |
sets the attachment border
Reimplemented in vrui::coRowContainer.
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
Implemented in vrui::coValuePoti, vrui::coFrame, vrui::coSlider, vrui::coRotButton, vrui::coPanel, vrui::coButton, vrui::coLabel, vrui::coRowContainer, and vrui::coBackground.
|
virtual |
Reimplemented in vrui::coValuePoti, vrui::coFrame, vrui::coSlider, vrui::coButton, vrui::coRotButton, vrui::coLabel, and vrui::coBackground.
|
virtual |
Reimplemented in vrui::coValuePoti, vrui::coFrame, vrui::coSlider, vrui::coButton, vrui::coRotButton, vrui::coLabel, and vrui::coBackground.
void vrui::coUIElement::setUniqueName | ( | const char * | ) |
|
virtual |
|
virtual |
|
virtual |
Set element location in space.
Reimplemented in vrui::coTexturedBackground, vrui::coFrame, vrui::coRowMenuHandle, vrui::coBackground, vrui::coPopupHandle, vrui::coUIContainer, and vrui::coRowContainer.
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.