OpenCOVER
coRowMenuItem.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_ROWMENUITEM_H
9#define CO_ROWMENUITEM_H
10
11#include <OpenVRUI/coMenuItem.h>
12
13namespace vrui
14{
15
16class coMenuContainer;
17class coColoredBackground;
18class coMenu;
19class coLabel;
20
30class OPENVRUIEXPORT coRowMenuItem : public coMenuItem
31{
32protected:
33 static const int LEFTMARGIN;
37
38public:
39 coRowMenuItem(const std::string &labelString);
40 coRowMenuItem(const std::string &symbolicName, const std::string &labelString);
41 virtual ~coRowMenuItem();
42 virtual void setLabel(coLabel *label);
44 void setLabel(const std::string &labelString) override;
46
48 const char *getClassName() const override;
50 bool isOfClassName(const char *) const override;
51
53 void setActive(bool a) override;
54
55 void selected(bool selected) override;
56
57 void setVisible(bool visible) override;
58};
59}
60#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coColoredBackground.h:24
Definition: coLabel.h:26
Definition: coMenuContainer.h:20
Definition: coMenuItem.h:45
Definition: coRowMenuItem.h:31
virtual ~coRowMenuItem()
coLabel * label
label text
Definition: coRowMenuItem.h:36
coMenuContainer * container
container to store menu elements
Definition: coRowMenuItem.h:34
const char * getClassName() const override
get the Element's classname
coColoredBackground * background
menu item background which changes its color when menu item is selected
Definition: coRowMenuItem.h:35
static const int LEFTMARGIN
size of margin at left edge of menu item
Definition: coRowMenuItem.h:33
void setActive(bool a) override
activates or deactivates the item
bool isOfClassName(const char *) const override
check if the Element or any ancestor is this classname
void selected(bool selected) override
MenuItem is selected via joystick.
void setVisible(bool visible) override
coLabel * getLabel()
coRowMenuItem(const std::string &labelString)
void setLabel(const std::string &labelString) override
this function may be overloaded - it is called by setName()
coUIElement * getUIElement() override
virtual void setLabel(coLabel *label)
coRowMenuItem(const std::string &symbolicName, const std::string &labelString)
Definition: coUIElement.h:53