Overview | All Modules | Tutorial | User's Guide | Programming Guide
Previous

COVISE Online Documentation

Next

Public Member Functions | List of all members
vrui::coColoredBackground Class Reference

#include <coColoredBackground.h>

Inheritance diagram for vrui::coColoredBackground:
vrui::coBackground vrui::coUIContainer vrui::coUIElement

Public Member Functions

 coColoredBackground (coUIElement::Material backgroundMaterial, coUIElement::Material highlightMaterial, coUIElement::Material disableMaterial)
 Constructor. More...
 
virtual ~coColoredBackground ()
 Destructor. More...
 
virtual void setEnabled (bool enabled)
 Set activation state of this background and all its children. More...
 
virtual void setHighlighted (bool highlighted)
 Set highlight state of this container and all its children. More...
 
coUIElement::Material getBackgroundMaterial () const
 
coUIElement::Material getHighlightMaterial () const
 
coUIElement::Material getDisableMaterial () 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 Member Functions inherited from vrui::coBackground
 coBackground ()
 Constructor. More...
 
virtual ~coBackground ()
 Destructor. More...
 
virtual void addElement (coUIElement *element)
 Appends a child to this container. More...
 
virtual void removeElement (coUIElement *element)
 Removes a child from this container. More...
 
virtual float getWidth () const
 There is no sense to make virtual functions inline... 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 void setPos (float x, float y, float z=0)
 
virtual void setWidth (float width)
 set the width of the background element explicitely More...
 
virtual void setHeight (float height)
 set the height of the background element explicitely More...
 
virtual void setDepth (float depth)
 set the depth of the background element explicitely More...
 
virtual void setMinWidth (float minWidth)
 set the minimum width of the background element More...
 
virtual void setMinHeight (float minHeight)
 set the minimum height of the background element More...
 
virtual void setMinDepth (float minDepth)
 set the minimum depth of the background element More...
 
virtual void setZOffset (float offset)
 Change the Z offset of the child, default is 5mm. More...
 
virtual void setSize (float size)
 Set UI element size, use equal values for all dimensions. More...
 
virtual void setSize (float nw, float nh, float nd)
 Set UI element size. More...
 
virtual void setEnabled (bool enabled)
 Set activation state of this container and all its children. More...
 
virtual void setHighlighted (bool highlighted)
 Set highlight state of this container and all its children. 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 ()
 Shrinks itself! This includes shrinking all children. More...
 
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::coUIContainer
 coUIContainer ()
 Constructor. More...
 
virtual ~coUIContainer ()
 Destructor. More...
 
virtual void setEnabled (bool enabled)
 Set activation state of this container and all its children. More...
 
virtual void setHighlighted (bool highlighted)
 Set highlight state of this container and all its children. More...
 
virtual void resizeToParent (float x, float y, float z, 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 addElement (coUIElement *element)
 Appends a child to this container. More...
 
virtual void removeElement (coUIElement *element)
 Removes a child from this container. More...
 
virtual void removeLastElement ()
 Removes a child from this container. More...
 
virtual void showElement (coUIElement *element)
 Adds the specified element to the scenegraph. More...
 
void setXAlignment (int a)
 set the alignment in X direction of the children More...
 
void setYAlignment (int a)
 set the alignment in Y direction of the children More...
 
void setZAlignment (int a)
 set the alignment in Z direction of the children More...
 
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...
 
float getMaxH () const
 maximum size in H direction More...
 
float getMaxW () const
 maximum size in W direction More...
 
float getMaxD () const
 maximum size in D direction More...
 
float getSumH () const
 sum of sizes in H direction More...
 
float getSumW () const
 sum of sizes in W direction More...
 
float getSumD () const
 sum of sizes in D direction More...
 
int getSize ()
 
- Public Member Functions inherited from vrui::coUIElement
 coUIElement ()
 
virtual ~coUIElement ()
 Destructor. More...
 
virtual void createGeometry ()
 
virtual void setParent (coUIContainer *)
 Set parent container. More...
 
virtual coUIContainergetParent ()
 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 coUIUserDatagetUserData () const
 Returns the current userdata object. More...
 
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...
 

Additional Inherited Members

- Public Types inherited from vrui::coUIContainer
enum  { CENTER = 0 , MIN , MAX , BOTH }
 Alignment specification for children. More...
 
- 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...
 
- Static Public Member Functions inherited from vrui::coUIElement
static vruiMatrixgetMatrixFromPositionHprScale (float x, float y, float z, float h, float p, float r, float scale)
 Constructor. More...
 
- Public Attributes inherited from vrui::coUIContainer
enum vrui::coUIContainer:: { ... }  alignments
 Alignment specification for children. 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::coBackground
virtual void resizeGeometry ()
 this method is called whenever the geometry of the background has to be recomputed More...
 
void realign ()
 centers the child More...
 
virtual void resizeGeometry ()
 
- Protected Member Functions inherited from vrui::coUIElement
virtual void resizeGeometry ()
 
virtual const vruiMatrixgetTransformMatrix ()
 
- Protected Attributes inherited from vrui::coBackground
float myX
 Background position X. More...
 
float myY
 Background position Y. More...
 
float myZ
 Background position Z. More...
 
float myWidth
 Background width. More...
 
float myHeight
 Background height. More...
 
float myDepth
 Background depth. More...
 
float minWidth
 Background minimal width. More...
 
float minHeight
 Background minimal height. More...
 
float minDepth
 Background minimal depth. More...
 
float myZOffset
 Z offset of child. More...
 
- Protected Attributes inherited from vrui::coUIContainer
int xAlignment
 alignment on children in X direction More...
 
int yAlignment
 alignment on children in Y direction More...
 
int zAlignment
 alignment on children in Z direction More...
 
std::list< coUIElement * > elements
 List of children elements. More...
 
float prefWidth
 try to get That high/wide if possible More...
 
float prefHeight
 
- 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
 

Constructor & Destructor Documentation

◆ coColoredBackground()

vrui::coColoredBackground::coColoredBackground ( coUIElement::Material  backgroundMaterial,
coUIElement::Material  highlightMaterial,
coUIElement::Material  disableMaterial 
)

Constructor.

Parameters
backgroundMaterialnormal color
highlightMaterialhighlighted color
disableMaterialdisabled color
See also
coUIElement for color definition

◆ ~coColoredBackground()

vrui::coColoredBackground::~coColoredBackground ( )
virtual

Destructor.

Member Function Documentation

◆ getBackgroundMaterial()

coUIElement::Material vrui::coColoredBackground::getBackgroundMaterial ( ) const

◆ getClassName()

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

get the Element's classname

Reimplemented from vrui::coBackground.

◆ getDisableMaterial()

coUIElement::Material vrui::coColoredBackground::getDisableMaterial ( ) const

◆ getHighlightMaterial()

coUIElement::Material vrui::coColoredBackground::getHighlightMaterial ( ) const

◆ isOfClassName()

bool vrui::coColoredBackground::isOfClassName ( const char *  classname) const
virtual

check if the Element or any ancestor is this classname

Reimplemented from vrui::coBackground.

◆ setEnabled()

void vrui::coColoredBackground::setEnabled ( bool  en)
virtual

Set activation state of this background and all its children.

if this background is disabled, the color is always the disabled color, regardless of the highlighted state

Parameters
entrue = elements enabled

Reimplemented from vrui::coBackground.

◆ setHighlighted()

void vrui::coColoredBackground::setHighlighted ( bool  hl)
virtual

Set highlight state of this container and all its children.

Parameters
hltrue = element highlighted

Reimplemented from vrui::coBackground.


The documentation for this class was generated from the following files:
PreviousNext

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