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

#include <coTexturedBackground.h>

Inheritance diagram for vrui::coTexturedBackground:
Inheritance graph
Collaboration diagram for vrui::coTexturedBackground:
Collaboration graph


class  TextureSet

Public Member Functions

 coTexturedBackground (const std::string &normalTexture, const std::string &highlightTexture, const std::string &disabledTexture, coTexturedBackgroundActor *actor=0)
 coTexturedBackground (uint *normalImage, uint *highlightImage, uint *disabledImage, int comp, int ns, int nt, int nr, coTexturedBackgroundActor *actor=0)
virtual ~coTexturedBackground ()
virtual int hit (vruiHit *hit)
virtual void miss ()
virtual void setEnabled (bool en)
virtual void setHighlighted (bool hl)
virtual void setActive (bool a)
 functions activates or deactivates the item More...
virtual void shrinkToMin ()
 Set element location in space. More...
void setRepeat (bool repeat)
bool getRepeat () const
void setUpdated (bool update)
bool getUpdated ()
void setTexSize (float, float)
float getTexXSize () const
float getTexYSize () const
void setImage (uint *normalImage, uint *highlightImage, uint *disabledImage, int comp, int ns, int nt, int nr)
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...
TextureSetgetCurrentTextures ()
const std::string & getNormalTexName () const
const std::string & getHighlightTexName () const
const std::string & getDisabledTexName () const
void setScale (float s)
float getScale ()
- Public Member Functions inherited from vrui::coBackground
 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 resizeToParent (float, float, float, bool shrink=true)
- Public Member Functions inherited from vrui::coUIContainer
 coUIContainer ()
virtual ~coUIContainer ()
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 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
- Public Member Functions inherited from vrui::coAction
 coAction ()
 Constructor. More...
virtual ~coAction ()
 Destructor. More...
void setFrame (unsigned int frame)
 INTERNAL set the framecounter (used to produce the miss call) More...
unsigned int getFrame () const
 INTERNAL get the framecounter (used to produce the miss call) More...
void setNode (vruiNode *)
 INTERNAL set the node this action belongs to. More...
void addChild (coAction *)
 INTERNAL add a child action. More...
virtual int hitAll (vruiHit *hit)
 INTERNAL same as miss/hit, but do it for all children as well. More...
virtual void missAll ()
 INTERNAL same as miss/hit, but do it for all children as well. More...

Protected Attributes

 action listener, triggered on pointer intersections More...
- 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...
- Protected Attributes inherited from vrui::coAction
std::string actionName

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 {
 Color definitions, to be used whenever a material is needed. More...
enum  {
- Public Types inherited from vrui::coAction
enum  Result { ACTION_DONE = 0x00, ACTION_CALL_ON_MISS = 0x01, ACTION_UNDEF = 0x02 }
- 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
- Protected Member Functions inherited from vrui::coBackground
virtual void resizeGeometry ()
void realign ()
 centers the child More...
- Protected Member Functions inherited from vrui::coUIElement
virtual const vruiMatrixgetTransformMatrix ()

Detailed Description

This class provides background for GUI elements. The texture of this background changes according to the elements state (normal/highlighted/disabled) A background should contain only one child, use another container to layout multiple chlidren inside the frame.

Constructor & Destructor Documentation

vrui::coTexturedBackground::coTexturedBackground ( const std::string &  normalTexture,
const std::string &  highlightTexture,
const std::string &  disabledTexture,
coTexturedBackgroundActor actor = 0 
vrui::coTexturedBackground::coTexturedBackground ( uint *  normalImage,
uint *  highlightImage,
uint *  disabledImage,
int  comp,
int  ns,
int  nt,
int  nr,
coTexturedBackgroundActor actor = 0 
virtual vrui::coTexturedBackground::~coTexturedBackground ( )

Member Function Documentation

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

get the Element's classname

Reimplemented from vrui::coBackground.

TextureSet* vrui::coTexturedBackground::getCurrentTextures ( )
const std::string& vrui::coTexturedBackground::getDisabledTexName ( ) const
const std::string& vrui::coTexturedBackground::getHighlightTexName ( ) const
const std::string& vrui::coTexturedBackground::getNormalTexName ( ) const
bool vrui::coTexturedBackground::getRepeat ( ) const
float vrui::coTexturedBackground::getScale ( )
float vrui::coTexturedBackground::getTexXSize ( ) const
float vrui::coTexturedBackground::getTexYSize ( ) const
bool vrui::coTexturedBackground::getUpdated ( )
virtual int vrui::coTexturedBackground::hit ( vruiHit hit)

hit is called whenever the node, or any node underneath the node with this action is intersected return ACTION_CALL_ON_MISS if you want miss to be called otherwise return ACTION_DONE

Implements vrui::coAction.

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

check if the Element or any ancestor is this classname

Reimplemented from vrui::coBackground.

virtual void vrui::coTexturedBackground::miss ( )

miss is called once after a hit, if the node is not intersected anymore

Reimplemented from vrui::coAction.

virtual void vrui::coTexturedBackground::setActive ( bool  a)

functions activates or deactivates the item

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

Reimplemented from vrui::coBackground.

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

Reimplemented from vrui::coBackground.

void vrui::coTexturedBackground::setImage ( uint *  normalImage,
uint *  highlightImage,
uint *  disabledImage,
int  comp,
int  ns,
int  nt,
int  nr 
void vrui::coTexturedBackground::setRepeat ( bool  repeat)
void vrui::coTexturedBackground::setScale ( float  s)
void vrui::coTexturedBackground::setTexSize ( float  ,
void vrui::coTexturedBackground::setUpdated ( bool  update)
virtual void vrui::coTexturedBackground::shrinkToMin ( )

Set element location in space.

Reimplemented from vrui::coBackground.

Member Data Documentation

coTexturedBackgroundActor* vrui::coTexturedBackground::myActor

action listener, triggered on pointer intersections

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