OpenCOVER
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
vrui::coUIElement Class Referenceabstract

#include <coUIElement.h>

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

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
}
 

Public Member Functions

 coUIElement ()
 
virtual ~coUIElement ()
 
virtual void createGeometry ()
 
virtual void setParent (coUIContainer *)
 
virtual coUIContainergetParent ()
 
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 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
 
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 vruiMatrixgetMatrixFromPositionHprScale (float x, float y, float z, float h, float p, float r, float scale)
 

Public Attributes

enum vrui::coUIElement:: { ... }  Attachments
 

Protected Member Functions

virtual void resizeGeometry ()
 
virtual const vruiMatrixgetTransformMatrix ()
 

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

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

attachment order is counterclockwise like this and describes the side/border which the item is attached to!

Enumerator
LEFT 
TOP 
RIGHT 
BOTTOM 
REPLACE 

◆ Material

Color definitions, to be used whenever a material is needed.

Enumerator
RED 
GREEN 
BLUE 
YELLOW 
GREY 
WHITE 
BLACK 
DARK_YELLOW 
WHITE_NL 

self illuminated white (NL = no lighting)

ITEM_BACKGROUND_NORMAL 
ITEM_BACKGROUND_HIGHLIGHTED 
ITEM_BACKGROUND_DISABLED 
HANDLE_BACKGROUND_NORMAL 
HANDLE_BACKGROUND_HIGHLIGHTED 
HANDLE_BACKGROUND_DISABLED 
BACKGROUND 
NUM_MATERIALS 

this entry must always be the last one in the list

Constructor & Destructor Documentation

◆ coUIElement()

vrui::coUIElement::coUIElement ( )

◆ ~coUIElement()

virtual vrui::coUIElement::~coUIElement ( )
virtual

Member Function Documentation

◆ childResized()

virtual void vrui::coUIElement::childResized ( bool  shrink = true)
virtual

◆ createGeometry()

virtual void vrui::coUIElement::createGeometry ( )
virtual

◆ getAttachment()

virtual int vrui::coUIElement::getAttachment ( ) const
inlinevirtual

returns the attachment border

Reimplemented in vrui::coRowContainer.

◆ getClassName()

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

◆ getDCS()

virtual vruiTransformNode * vrui::coUIElement::getDCS ( )
virtual

◆ getDepth()

virtual float vrui::coUIElement::getDepth ( ) const
virtual

◆ getHeight()

virtual float vrui::coUIElement::getHeight ( ) const
pure virtual

◆ getMatrixFromPositionHprScale()

static vruiMatrix * vrui::coUIElement::getMatrixFromPositionHprScale ( float  x,
float  y,
float  z,
float  h,
float  p,
float  r,
float  scale 
)
static

◆ getParent()

virtual coUIContainer * vrui::coUIElement::getParent ( )
virtual

◆ getResizePref()

virtual float vrui::coUIElement::getResizePref ( )
inlinevirtual

◆ getTransformMatrix()

virtual const vruiMatrix * vrui::coUIElement::getTransformMatrix ( )
protectedvirtual

◆ getUIElementProvider()

virtual vruiUIElementProvider * vrui::coUIElement::getUIElementProvider ( ) const
inlinevirtual

◆ getUniqueName()

const char * vrui::coUIElement::getUniqueName ( ) const

◆ getUserData()

virtual coUIUserData * vrui::coUIElement::getUserData ( ) const
virtual

◆ getWidth()

virtual float vrui::coUIElement::getWidth ( ) const
pure virtual

◆ getXpos()

virtual float vrui::coUIElement::getXpos ( ) const
pure virtual

◆ getYpos()

virtual float vrui::coUIElement::getYpos ( ) const
pure virtual

◆ getZpos()

virtual float vrui::coUIElement::getZpos ( ) const
virtual

◆ isEnabled()

virtual bool vrui::coUIElement::isEnabled ( ) const
virtual

◆ isHighlighted()

virtual bool vrui::coUIElement::isHighlighted ( ) const
virtual

◆ isOfClassName()

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

◆ isVisible()

virtual bool vrui::coUIElement::isVisible ( ) const
virtual

◆ resizeGeometry()

virtual void vrui::coUIElement::resizeGeometry ( )
protectedvirtual

◆ resizeToParent()

virtual void vrui::coUIElement::resizeToParent ( float  ,
float  ,
float  ,
bool  shrink = true 
)
virtual

◆ setAttachment()

virtual void vrui::coUIElement::setAttachment ( int  )
inlinevirtual

sets the attachment border

Reimplemented in vrui::coRowContainer.

◆ setEnabled()

virtual void vrui::coUIElement::setEnabled ( bool  enabled)
virtual

◆ setHighlighted()

virtual void vrui::coUIElement::setHighlighted ( bool  highlighted)
virtual

◆ setParent()

virtual void vrui::coUIElement::setParent ( coUIContainer )
virtual

◆ setPos()

virtual void vrui::coUIElement::setPos ( float  ,
float  ,
float   
)
pure virtual

◆ setSize() [1/2]

virtual void vrui::coUIElement::setSize ( float  )
virtual

◆ setSize() [2/2]

virtual void vrui::coUIElement::setSize ( float  ,
float  ,
float   
)
virtual

◆ setUniqueName()

void vrui::coUIElement::setUniqueName ( const char *  )

◆ setUserData()

virtual void vrui::coUIElement::setUserData ( coUIUserData )
virtual

◆ setVisible()

virtual void vrui::coUIElement::setVisible ( bool  visible)
virtual

◆ shrinkToMin()

virtual void vrui::coUIElement::shrinkToMin ( )
virtual

Member Data Documentation

◆ 

enum { ... } vrui::coUIElement::Attachments

attachment order is counterclockwise like this and describes the side/border which the item is attached to!

◆ enabled

bool vrui::coUIElement::enabled
protected

true if UI element is enabled, false if UI element cannot be used

◆ highlighted

bool vrui::coUIElement::highlighted
protected

true if highlighted

◆ uiElementProvider

vruiUIElementProvider* vrui::coUIElement::uiElementProvider
protected

◆ visible

bool vrui::coUIElement::visible
protected

true if UI element is visible, false if not visible but still present in scene tree

◆ xScaleFactor

float vrui::coUIElement::xScaleFactor
protected

UI element x axis scale factor.

◆ yScaleFactor

float vrui::coUIElement::yScaleFactor
protected

UI element y axis scale factor.

◆ zScaleFactor

float vrui::coUIElement::zScaleFactor
protected

UI element z axis scale factor.


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