OpenCOVER
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"
14#include "coFrame.h"
15
16#ifdef WIN32
17typedef unsigned int uint;
18#endif
19
20namespace vrui
21{
22
23class OPENVRUIEXPORT coMovableBackgroundMenuItem : public coMenuItem
24{
25protected:
27 float aspect_;
28 float vsize_;
29
30public:
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
35
36 // return the actual UI Element that represents this menu.
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
unsigned int uint
abbreviation for unsigned int
Definition: rel_mcast-old.h:77
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coMenuItem.h:45
Definition: coMovableBackgroundMenuItem.h:24
float vsize_
Definition: coMovableBackgroundMenuItem.h:28
coMovableBackgroundMenuItem(const char *name, float aspect, float size=-1)
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
coTexturedBackground * background
Definition: coMovableBackgroundMenuItem.h:26
coMovableBackgroundMenuItem(const char *name, uint *normalImage, int comp, int ns, int nt, int nr, float aspect, float size=-1)
void setSize(float hsize, float vsize)
virtual const char * getClassName() const
get the Element's classname
float aspect_
Definition: coMovableBackgroundMenuItem.h:27
virtual coUIElement * getUIElement()
Definition: coTexturedBackground.h:62
Definition: coUIElement.h:53