OpenCOVER
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vrui::coBackground Class Reference

#include <coBackground.h>

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

Public Member Functions

 coBackground ()
 
virtual ~coBackground ()
 
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
 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 void setPos (float x, float y, float z=0)
 
virtual void setWidth (float width)
 
virtual void setHeight (float height)
 
virtual void setDepth (float depth)
 
virtual void setMinWidth (float minWidth)
 
virtual void setMinHeight (float minHeight)
 
virtual void setMinDepth (float minDepth)
 
virtual void setZOffset (float offset)
 
virtual void setSize (float size)
 
virtual void setSize (float nw, float nh, float nd)
 
virtual void setEnabled (bool enabled)
 
virtual void setHighlighted (bool highlighted)
 
virtual void resizeToParent (float, float, float, bool shrink=true)
 
virtual void shrinkToMin ()
 Set element location in space. 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 ()
 
virtual ~coUIContainer ()
 
virtual void setEnabled (bool enabled)
 
virtual void setHighlighted (bool highlighted)
 
virtual void resizeToParent (float x, float y, float z, bool shrink=true)
 
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 ()
 
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...
 

Protected Member Functions

virtual void resizeGeometry ()
 
void realign ()
 centers the child More...
 
virtual void resizeGeometry ()
 
- Protected Member Functions inherited from vrui::coUIElement
virtual void resizeGeometry ()
 
virtual const vruiMatrixgetTransformMatrix ()
 

Protected Attributes

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
 

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
}
 
- Static Public Member Functions inherited from vrui::coUIElement
static vruiMatrixgetMatrixFromPositionHprScale (float x, float y, float z, float h, float p, float r, float scale)
 
- 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
 

Detailed Description

This class provides background for GUI elements. A background should contain only one child, use another container to layout multiple chlidren inside the frame.

Constructor & Destructor Documentation

◆ coBackground()

vrui::coBackground::coBackground ( )

◆ ~coBackground()

virtual vrui::coBackground::~coBackground ( )
virtual

Member Function Documentation

◆ addElement()

virtual void vrui::coBackground::addElement ( coUIElement element)
virtual

Appends a child to this container.

Reimplemented from vrui::coUIContainer.

◆ getClassName()

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

get the Element's classname

Reimplemented from vrui::coUIContainer.

Reimplemented in vrui::coColoredBackground, vrui::coTexturedBackground, and vrui::coTextureRectBackground.

◆ getDepth()

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

Reimplemented from vrui::coUIElement.

◆ getHeight()

virtual float vrui::coBackground::getHeight ( ) const
virtual

Returns element height.

Implements vrui::coUIElement.

◆ getWidth()

virtual float vrui::coBackground::getWidth ( ) const
virtual

Returns element width.

Implements vrui::coUIElement.

◆ getXpos()

virtual float vrui::coBackground::getXpos ( ) const
virtual

Returns element x position.

Implements vrui::coUIElement.

◆ getYpos()

virtual float vrui::coBackground::getYpos ( ) const
virtual

Returns element y position.

Implements vrui::coUIElement.

◆ getZpos()

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

Reimplemented from vrui::coUIElement.

◆ isOfClassName()

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

check if the Element or any ancestor is this classname

Reimplemented from vrui::coUIContainer.

Reimplemented in vrui::coColoredBackground, vrui::coTexturedBackground, and vrui::coTextureRectBackground.

◆ realign()

void vrui::coBackground::realign ( )
protected

centers the child

◆ removeElement()

virtual void vrui::coBackground::removeElement ( coUIElement element)
virtual

Removes a child from this container.

Reimplemented from vrui::coUIContainer.

◆ resizeGeometry()

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

Reimplemented from vrui::coUIContainer.

◆ resizeToParent()

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

Reimplemented from vrui::coUIContainer.

◆ setDepth()

virtual void vrui::coBackground::setDepth ( float  depth)
virtual

◆ setEnabled()

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

◆ setHeight()

virtual void vrui::coBackground::setHeight ( float  height)
virtual

◆ setHighlighted()

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

◆ setMinDepth()

virtual void vrui::coBackground::setMinDepth ( float  minDepth)
virtual

◆ setMinHeight()

virtual void vrui::coBackground::setMinHeight ( float  minHeight)
virtual

◆ setMinWidth()

virtual void vrui::coBackground::setMinWidth ( float  minWidth)
virtual

◆ setPos()

virtual void vrui::coBackground::setPos ( float  x,
float  y,
float  z = 0 
)
virtual

Implements vrui::coUIElement.

◆ setSize() [1/2]

virtual void vrui::coBackground::setSize ( float  nw,
float  nh,
float  nd 
)
virtual

Reimplemented from vrui::coUIElement.

◆ setSize() [2/2]

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

Reimplemented from vrui::coUIElement.

◆ setWidth()

virtual void vrui::coBackground::setWidth ( float  width)
virtual

◆ setZOffset()

virtual void vrui::coBackground::setZOffset ( float  offset)
virtual

◆ shrinkToMin()

virtual void vrui::coBackground::shrinkToMin ( )
virtual

Set element location in space.

Reimplemented from vrui::coUIContainer.

Reimplemented in vrui::coTexturedBackground.

Member Data Documentation

◆ minDepth

float vrui::coBackground::minDepth
protected

Background minimal depth.

◆ minHeight

float vrui::coBackground::minHeight
protected

Background minimal height.

◆ minWidth

float vrui::coBackground::minWidth
protected

Background minimal width.

◆ myDepth

float vrui::coBackground::myDepth
protected

Background depth.

◆ myHeight

float vrui::coBackground::myHeight
protected

Background height.

◆ myWidth

float vrui::coBackground::myWidth
protected

Background width.

◆ myX

float vrui::coBackground::myX
protected

Background position X.

◆ myY

float vrui::coBackground::myY
protected

Background position Y.

◆ myZ

float vrui::coBackground::myZ
protected

Background position Z.

◆ myZOffset

float vrui::coBackground::myZOffset
protected

Z offset of child.


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