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

#include <coLabel.h>

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

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, NUM_MATERIALS
}
 Color definitions, to be used whenever a material is needed. More...
 
enum  {
  LEFT = 0, TOP, RIGHT, BOTTOM,
  REPLACE
}
 

Public Member Functions

 coLabel (const std::string &labelText="")
 
virtual ~coLabel ()
 
void resize ()
 
virtual void setPos (float x, float y, float z=0.0f)
 
virtual void setFontSize (float size)
 
virtual void setString (const std::string &text)
 
virtual void setSize (float size)
 
virtual void setSize (float xs, float ys, float zs)
 
virtual float getWidth () const
 Returns element width. More...
 
virtual float getHeight () const
 Returns element height. More...
 
virtual float getDepth () const
 
virtual float getXpos () const
 Returns element x position. More...
 
virtual float getYpos () const
 Returns element y position. More...
 
virtual float getZpos () const
 
virtual float getFontSize () const
 
virtual Justify getJustify () const
 
virtual DirectionsType getDirection () const
 
virtual const char * getString () const
 
virtual void setHighlighted (bool highlighted)
 
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 ()
 
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 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
 

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...
 
vruiUIElementProvideruiElementProvider
 

Additional Inherited Members

- Public Attributes inherited from vrui::coUIElement
enum vrui::coUIElement:: { ... }  Attachments
 
- Protected Member Functions inherited from vrui::coUIElement
virtual const vruiMatrixgetTransformMatrix ()
 

Detailed Description

Label element. A label consists of a text string and a background texture.

Member Enumeration Documentation

valid orientations for text string

Enumerator
HORIZONTAL 
VERTICAL 
Enumerator
LEFT 
CENTER 
RIGHT 

Constructor & Destructor Documentation

vrui::coLabel::coLabel ( const std::string &  labelText = "")
virtual vrui::coLabel::~coLabel ( )
virtual

Member Function Documentation

virtual const char* vrui::coLabel::getClassName ( ) const
virtual

get the Element's classname

Reimplemented from vrui::coUIElement.

virtual float vrui::coLabel::getDepth ( ) const
inlinevirtual

Reimplemented from vrui::coUIElement.

virtual DirectionsType vrui::coLabel::getDirection ( ) const
inlinevirtual
virtual float vrui::coLabel::getFontSize ( ) const
inlinevirtual
virtual float vrui::coLabel::getHeight ( ) const
inlinevirtual

Returns element height.

Implements vrui::coUIElement.

virtual Justify vrui::coLabel::getJustify ( ) const
inlinevirtual
virtual const char* vrui::coLabel::getString ( ) const
inlinevirtual
virtual float vrui::coLabel::getWidth ( ) const
inlinevirtual

Returns element width.

Implements vrui::coUIElement.

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

Returns element x position.

Implements vrui::coUIElement.

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

Returns element y position.

Implements vrui::coUIElement.

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

Reimplemented from vrui::coUIElement.

virtual bool vrui::coLabel::isOfClassName ( const char *  ) const
virtual

check if the Element or any ancestor is this classname

Reimplemented from vrui::coUIElement.

void vrui::coLabel::resize ( )
virtual void vrui::coLabel::resizeGeometry ( )
virtual

Reimplemented from vrui::coUIElement.

virtual void vrui::coLabel::setFontSize ( float  size)
virtual
virtual void vrui::coLabel::setHighlighted ( bool  highlighted)
virtual

Reimplemented from vrui::coUIElement.

virtual void vrui::coLabel::setPos ( float  x,
float  y,
float  z = 0.0f 
)
virtual

Implements vrui::coUIElement.

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

Reimplemented from vrui::coUIElement.

virtual void vrui::coLabel::setSize ( float  xs,
float  ys,
float  zs 
)
virtual

Reimplemented from vrui::coUIElement.

virtual void vrui::coLabel::setString ( const std::string &  text)
virtual

Member Data Documentation

DirectionsType vrui::coLabel::direction
protected

direction into which the text string is written on the label

float vrui::coLabel::fontSize
protected

label text size in mm

Justify vrui::coLabel::justify
protected

string justification, using Performer format. Default is left alignment.

std::string vrui::coLabel::labelString
protected

text string which is displayed on the label

float vrui::coLabel::myDepth
protected

label size in y direction [mm]

float vrui::coLabel::myHeight
protected

label size in z direction [mm]

float vrui::coLabel::myWidth
protected

label size in x direction [mm]

float vrui::coLabel::myX
protected

x position of label in object space [mm]

float vrui::coLabel::myY
protected

y position of label in object space [mm]

float vrui::coLabel::myZ
protected

z position of label in object space [mm]


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