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

Container class that aligns its children in a row. More...

#include <coRowContainer.h>

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

Public Types

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

Public Member Functions

 coRowContainer (Orientation orientation=HORIZONTAL)
 
virtual ~coRowContainer ()
 
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 insertElement (coUIElement *element, int pos)
 
virtual void resizeToParent (float, float, float, bool shrink=true)
 
virtual void shrinkToMin ()
 Set element location in space. More...
 
void hide (coUIElement *element)
 
void show (coUIElement *element)
 
void setPos (float x, float y, float z=0.0f)
 
void setOrientation (Orientation orientation)
 
int getOrientation () const
 
void setAlignment (int alignment)
 
void setHgap (float g)
 
void setVgap (float g)
 
void setDgap (float g)
 
vruiTransformNodegetDCS ()
 
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 getVgap () const
 
virtual float getHgap () const
 
virtual float getDgap () const
 
virtual void setAttachment (int attachment)
 sets the attachment border More...
 
virtual int getAttachment () const
 returns the attachment border 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 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...
 
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 setVisible (bool visible)
 
virtual bool isEnabled () const
 
virtual bool isHighlighted () const
 
virtual bool isVisible () const
 
virtual void childResized (bool shrink=true)
 
virtual void setSize (float, float, float)
 
virtual void setSize (float)
 
virtual float getResizePref ()
 
virtual void setUserData (coUIUserData *)
 
virtual coUIUserDatagetUserData () const
 
virtual vruiUIElementProvidergetUIElementProvider () const
 
void setUniqueName (const char *)
 
const char * getUniqueName () const
 

Protected Member Functions

float getExtW () const
 get my current extension in given direction More...
 
float getExtH () const
 
- Protected Member Functions inherited from vrui::coUIContainer
virtual void resizeGeometry ()
 
- Protected Member Functions inherited from vrui::coUIElement
virtual const vruiMatrixgetTransformMatrix ()
 

Protected Attributes

vruiTransformNodemyDCS
 transformation node to position this container More...
 
float myX
 position and size More...
 
float myY
 
float myZ
 
float myHeight
 
float myWidth
 
float myDepth
 
Orientation orientation
 layout orientation More...
 
int alignment
 alignment of the children More...
 
float Hgap
 Horizontal-, vertical- and depth-gap, default is 5mm for H and Vgap, 0 for Dgap. More...
 
float Vgap
 
float Dgap
 
int attachment
 
- 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 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

Container class that aligns its children in a row.

Member Enumeration Documentation

orientation of this container

Enumerator
HORIZONTAL 
VERTICAL 

Constructor & Destructor Documentation

vrui::coRowContainer::coRowContainer ( Orientation  orientation = HORIZONTAL)
virtual vrui::coRowContainer::~coRowContainer ( )
virtual

Member Function Documentation

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

Appends a child to this container.

Reimplemented from vrui::coUIContainer.

virtual int vrui::coRowContainer::getAttachment ( ) const
virtual

returns the attachment border

Reimplemented from vrui::coUIElement.

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

get the Element's classname

Reimplemented from vrui::coUIContainer.

Reimplemented in vrui::coRowMenuHandle, vrui::coToolboxMenuHandle, vrui::coPopupHandle, and vrui::coMenuContainer.

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

Reimplemented from vrui::coUIElement.

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

Reimplemented from vrui::coUIElement.

virtual float vrui::coRowContainer::getDgap ( ) const
virtual
float vrui::coRowContainer::getExtH ( ) const
protected
float vrui::coRowContainer::getExtW ( ) const
protected

get my current extension in given direction

virtual float vrui::coRowContainer::getHeight ( ) const
inlinevirtual

Returns element height.

Implements vrui::coUIElement.

virtual float vrui::coRowContainer::getHgap ( ) const
virtual
int vrui::coRowContainer::getOrientation ( ) const
virtual float vrui::coRowContainer::getVgap ( ) const
virtual
virtual float vrui::coRowContainer::getWidth ( ) const
inlinevirtual

Returns element width.

Implements vrui::coUIElement.

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

Returns element x position.

Implements vrui::coUIElement.

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

Returns element y position.

Implements vrui::coUIElement.

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

Reimplemented from vrui::coUIElement.

void vrui::coRowContainer::hide ( coUIElement element)
virtual void vrui::coRowContainer::insertElement ( coUIElement element,
int  pos 
)
virtual
virtual bool vrui::coRowContainer::isOfClassName ( const char *  ) const
virtual

check if the Element or any ancestor is this classname

Reimplemented from vrui::coUIContainer.

Reimplemented in vrui::coRowMenuHandle, vrui::coToolboxMenuHandle, vrui::coPopupHandle, and vrui::coMenuContainer.

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

Removes a child from this container.

Reimplemented from vrui::coUIContainer.

virtual void vrui::coRowContainer::resizeToParent ( float  ,
float  ,
float  ,
bool  shrink = true 
)
virtual
void vrui::coRowContainer::setAlignment ( int  alignment)
virtual void vrui::coRowContainer::setAttachment ( int  )
virtual

sets the attachment border

Reimplemented from vrui::coUIElement.

void vrui::coRowContainer::setDgap ( float  g)
void vrui::coRowContainer::setHgap ( float  g)
void vrui::coRowContainer::setOrientation ( Orientation  orientation)
void vrui::coRowContainer::setPos ( float  x,
float  y,
float  z = 0.0f 
)
virtual

Implements vrui::coUIElement.

void vrui::coRowContainer::setVgap ( float  g)
void vrui::coRowContainer::show ( coUIElement element)
virtual void vrui::coRowContainer::shrinkToMin ( )
virtual

Set element location in space.

Reimplemented from vrui::coUIContainer.

Reimplemented in vrui::coRowMenuHandle, and vrui::coPopupHandle.

Member Data Documentation

int vrui::coRowContainer::alignment
protected

alignment of the children

int vrui::coRowContainer::attachment
protected
float vrui::coRowContainer::Dgap
protected
float vrui::coRowContainer::Hgap
protected

Horizontal-, vertical- and depth-gap, default is 5mm for H and Vgap, 0 for Dgap.

vruiTransformNode* vrui::coRowContainer::myDCS
protected

transformation node to position this container

float vrui::coRowContainer::myDepth
protected
float vrui::coRowContainer::myHeight
protected
float vrui::coRowContainer::myWidth
protected
float vrui::coRowContainer::myX
protected

position and size

float vrui::coRowContainer::myY
protected
float vrui::coRowContainer::myZ
protected
Orientation vrui::coRowContainer::orientation
protected

layout orientation

float vrui::coRowContainer::Vgap
protected

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