Overview | All Modules | Tutorial | User's Guide | Programming Guide |
Previous | COVISE Online Documentation | Next |
Label element. More...
#include <coLabel.h>
Public Types | |
enum | DirectionsType { HORIZONTAL = 0 , VERTICAL } |
valid orientations for text string More... | |
enum | Justify { LEFT = 0 , CENTER , RIGHT } |
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 , 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 | |
coLabel (const std::string &labelText="") | |
Constructor. More... | |
virtual | ~coLabel () |
Destructor. More... | |
void | resize () |
Resize label to string size. More... | |
virtual void | setPos (float x, float y, float z=0.0f) |
Set label position. More... | |
virtual void | setFontSize (float size) |
Set label font size. More... | |
virtual void | setJustify (Justify justify) |
Set label justification. More... | |
virtual void | setString (const std::string &text) |
Set label string. More... | |
virtual void | setSize (float size) |
Set label size using one size for all dimensions. More... | |
virtual void | setSize (float xs, float ys, float zs) |
Set label size using different sizes for all dimensions. More... | |
virtual float | getWidth () const |
Returns element width. More... | |
virtual float | getHeight () const |
Returns element height. More... | |
virtual float | getDepth () const |
Get z axis object size. More... | |
virtual float | getXpos () const |
Returns element x position. More... | |
virtual float | getYpos () const |
Returns element y position. More... | |
virtual float | getZpos () const |
Get z position. More... | |
virtual float | getFontSize () const |
virtual Justify | getJustify () const |
virtual DirectionsType | getDirection () const |
virtual const char * | getString () const |
virtual void | setHighlighted (bool highlighted) |
Set highlight state. More... | |
virtual void | resizeGeometry () |
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::coUIElement | |
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... | |
Protected Attributes | |
float | myX |
x position of label in object space [mm] More... | |
float | myY |
y position of label in object space [mm] More... | |
float | myZ |
z position of label in object space [mm] More... | |
float | myHeight |
label size in z direction [mm] More... | |
float | myWidth |
label size in x direction [mm] More... | |
float | myDepth |
label size in y direction [mm] More... | |
std::string | labelString |
text string which is displayed on the label More... | |
Justify | justify |
string justification, using Performer format. Default is left alignment. More... | |
float | fontSize |
label text size in mm More... | |
DirectionsType | direction |
direction into which the text string is written on the label More... | |
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 | |
Static Public Member Functions inherited from vrui::coUIElement | |
static vruiMatrix * | getMatrixFromPositionHprScale (float x, float y, float z, float h, float p, float r, float scale) |
Constructor. More... | |
Public Attributes inherited from vrui::coUIElement | |
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 inherited from vrui::coUIElement | |
virtual void | resizeGeometry () |
virtual const vruiMatrix * | getTransformMatrix () |
Label element.
A label consists of a text string and a background texture.
vrui::coLabel::coLabel | ( | const std::string & | labelText = "" | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
get the Element's classname
Reimplemented from vrui::coUIElement.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Returns element height.
Implements vrui::coUIElement.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Returns element width.
Implements vrui::coUIElement.
|
inlinevirtual |
Returns element x position.
Implements vrui::coUIElement.
|
inlinevirtual |
Returns element y position.
Implements vrui::coUIElement.
|
inlinevirtual |
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented from vrui::coUIElement.
void vrui::coLabel::resize | ( | ) |
Resize label to string size.
|
virtual |
Reimplemented from vrui::coUIElement.
|
virtual |
Set label font size.
s | label text font size [mm] |
|
virtual |
|
virtual |
Set label justification.
j | label text justification |
|
virtual |
|
virtual |
Set label size using one size for all dimensions.
s | size in mm |
Reimplemented from vrui::coUIElement.
|
virtual |
Set label size using different sizes for all dimensions.
xs,ys,zs | x/y/z size in mm |
Reimplemented from vrui::coUIElement.
|
virtual |
Set label string.
s | zero terminated label string |
|
protected |
direction into which the text string is written on the label
|
protected |
label text size in mm
|
protected |
string justification, using Performer format. Default is left alignment.
|
protected |
text string which is displayed on the label
|
protected |
label size in y direction [mm]
|
protected |
label size in z direction [mm]
|
protected |
label size in x direction [mm]
|
protected |
x position of label in object space [mm]
|
protected |
y position of label in object space [mm]
|
protected |
z position of label in object space [mm]
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
|