OpenCOVER
coBackground.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef CO_BACKGROUND_H
9#define CO_BACKGROUND_H
10
12
13namespace vrui
14{
15
16class vruiTransformNode;
17
22class OPENVRUIEXPORT coBackground : public coUIContainer
23{
24public:
26 virtual ~coBackground();
27 virtual void addElement(coUIElement *element);
28 virtual void removeElement(coUIElement *element);
29 virtual float getWidth() const;
30 virtual float getHeight() const;
31 virtual float getDepth() const;
32 virtual float getXpos() const;
33 virtual float getYpos() const;
34 virtual float getZpos() const;
35 virtual void setPos(float x, float y, float z = 0);
36 virtual void setWidth(float width);
37 virtual void setHeight(float height);
38 virtual void setDepth(float depth);
39 virtual void setMinWidth(float minWidth);
40 virtual void setMinHeight(float minHeight);
41 virtual void setMinDepth(float minDepth);
42 virtual void setZOffset(float offset);
43 virtual void setSize(float size);
44 virtual void setSize(float nw, float nh, float nd);
45 virtual void setEnabled(bool enabled);
46 virtual void setHighlighted(bool highlighted);
47 virtual void resizeToParent(float, float, float, bool shrink = true);
48 virtual void shrinkToMin();
49
51 virtual const char *getClassName() const;
53 virtual bool isOfClassName(const char *) const;
54
55protected:
56 virtual void resizeGeometry();
57
58 //void resize(); ///< resize the background to fit around the child
59 void realign();
60 float myX;
61 float myY;
62 float myZ;
63 float myWidth;
64 float myHeight;
65 float myDepth;
66 float minWidth;
67 float minHeight;
68 float minDepth;
69 float myZOffset;
70};
71}
72#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coBackground.h:23
virtual void setSize(float size)
virtual void setMinDepth(float minDepth)
float myWidth
Background width.
Definition: coBackground.h:63
virtual void resizeToParent(float, float, float, bool shrink=true)
virtual float getYpos() const
Returns element y position.
virtual void setHeight(float height)
virtual void setSize(float nw, float nh, float nd)
virtual void setMinHeight(float minHeight)
virtual void shrinkToMin()
Set element location in space.
virtual float getWidth() const
Returns element width.
virtual const char * getClassName() const
get the Element's classname
float myDepth
Background depth.
Definition: coBackground.h:65
virtual float getXpos() const
Returns element x position.
virtual void setMinWidth(float minWidth)
virtual void setHighlighted(bool highlighted)
float minWidth
Background minimal width.
Definition: coBackground.h:66
virtual void setZOffset(float offset)
virtual ~coBackground()
float minHeight
Background minimal height.
Definition: coBackground.h:67
virtual void setEnabled(bool enabled)
virtual void addElement(coUIElement *element)
Appends a child to this container.
float minDepth
Background minimal depth.
Definition: coBackground.h:68
void realign()
centers the child
virtual void setWidth(float width)
float myX
Background position X.
Definition: coBackground.h:60
float myHeight
Background height.
Definition: coBackground.h:64
float myZOffset
Z offset of child.
Definition: coBackground.h:69
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
virtual void removeElement(coUIElement *element)
Removes a child from this container.
virtual void setPos(float x, float y, float z=0)
virtual float getDepth() const
float myY
Background position Y.
Definition: coBackground.h:61
virtual float getHeight() const
Returns element height.
float myZ
Background position Z.
Definition: coBackground.h:62
virtual void setDepth(float depth)
virtual float getZpos() const
virtual void resizeGeometry()
Definition: coUIContainer.h:24
Definition: coUIElement.h:53