OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
11 #include <OpenVRUI/coUIContainer.h>
12 
13 namespace vrui
14 {
15 
16 class vruiTransformNode;
17 
22 class OPENVRUIEXPORT coBackground : public coUIContainer
23 {
24 public:
25  coBackground();
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 
55 protected:
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
float myZOffset
Z offset of child.
Definition: coBackground.h:69
Definition: coUIContainer.h:23
Definition: coBackground.h:22
float minDepth
Background minimal depth.
Definition: coBackground.h:68
float myY
Background position Y.
Definition: coBackground.h:61
float myWidth
Background width.
Definition: coBackground.h:63
float myX
Background position X.
Definition: coBackground.h:60
float myZ
Background position Z.
Definition: coBackground.h:62
float myDepth
Background depth.
Definition: coBackground.h:65
float minHeight
Background minimal height.
Definition: coBackground.h:67
float myHeight
Background height.
Definition: coBackground.h:64
Definition: coUIElement.h:52
float minWidth
Background minimal width.
Definition: coBackground.h:66