OpenCOVER
coProgressBar.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 COPROGRESSBAR_H
9#define COPROGRESSBAR_H
10
11#include <OpenVRUI/coPanel.h>
12
13namespace vrui
14{
15
16class coLabel;
17class coTexturedBackground;
18
19class OPENVRUIEXPORT coProgressBar : public coPanel
20{
21public:
23 virtual ~coProgressBar();
24
25 enum Style
26 {
27 Default = 0xFF,
28 Empty = 0x00,
29 Integer = 0x01,
30 Float = 0x02
31 };
32
33 void setProgress(float progress);
34 void setProgress(int progress);
35
36 float getProgress() const;
37
38 void setStyle(Style style);
39 Style getStyle() const;
40
41 virtual void resizeToParent(float x, float y, float z, bool shrink);
42
44 virtual const char *getClassName() const;
46 virtual bool isOfClassName(const char *) const;
47
48private:
49 float progress;
50
51 void setProgress(const std::string &progressString, float progress);
52
53 Style styleCurrent;
54 Style styleSet;
55
56 coLabel *label;
57 coLabel *dummyLabel;
58
59 float px, py;
60
61 coTexturedBackground *doneBackground;
62};
63}
64
65#endif // COPROGRESSBAR_H
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coLabel.h:26
Definition: coPanel.h:29
Definition: coProgressBar.h:20
virtual void resizeToParent(float x, float y, float z, bool shrink)
Style
Definition: coProgressBar.h:26
void setProgress(int progress)
Style getStyle() const
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
float getProgress() const
void setProgress(float progress)
virtual const char * getClassName() const
get the Element's classname
virtual ~coProgressBar()
void setStyle(Style style)
Definition: coTexturedBackground.h:62