OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coMovableBackgroundMenuItem.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_MOVABLE_BACKGROUND_MENUITEM_H
9 #define CO_MOVABLE_BACKGROUND_MENUITEM_H
10 
11 #include <sys/types.h>
12 #include "coMenuItem.h"
13 #include "coTexturedBackground.h"
14 #include "coFrame.h"
15 
16 #ifdef WIN32
17 typedef unsigned int uint;
18 #endif
19 
20 namespace vrui
21 {
22 
23 class OPENVRUIEXPORT coMovableBackgroundMenuItem : public coMenuItem
24 {
25 protected:
27  float aspect_;
28  float vsize_;
29 
30 public:
31  coMovableBackgroundMenuItem(const char *name, float aspect, float size = -1);
32  coMovableBackgroundMenuItem(const char *name, uint *normalImage, int comp, int ns, int nt, int nr, float aspect, float size = -1);
33 
34  virtual ~coMovableBackgroundMenuItem();
35 
36  // return the actual UI Element that represents this menu.
37  virtual coUIElement *getUIElement();
38 
40  virtual const char *getClassName() const;
41 
43  virtual bool isOfClassName(const char *) const;
44 
45  // return scalefactor of movableBackground;
46  float getScale();
47 
48  // set scalefactor of movable background
49  void setScale(float s);
50 
51  // set size
52  void setSize(float hsize, float vsize);
53 
54  // reset scale and position of movable background
55  void reset();
56 
57  float getAspect();
58 
59  float getVSize();
60 };
61 }
62 
63 #endif
Definition: coTexturedBackground.h:59
unsigned int uint
abbreviation for unsigned int
Definition: rel_mcast-old.h:77
Definition: coMovableBackgroundMenuItem.h:23
Definition: coUIElement.h:52
coTexturedBackground * background
Definition: coMovableBackgroundMenuItem.h:26
float aspect_
Definition: coMovableBackgroundMenuItem.h:27
float vsize_
Definition: coMovableBackgroundMenuItem.h:28
Definition: coMenuItem.h:44