COVISE Core
coUifSwitch.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_UIF_SWITCH_H_
9#define _CO_UIF_SWITCH_H_
10
11// 15.09.99
12
13#include "coUifElem.h"
14#include "coUifSwitchCase.h"
15
16namespace covise
17{
18
19class coChoiceParam; // we need a pointer to one...
20
26{
27
28private:
29 enum
30 {
31 MAX_CASES = 64
32 };
33
35 coUifSwitch(const coUifSwitch &);
36
38 coUifSwitch &operator=(const coUifSwitch &);
39
42
43 // list of cases
44 coUifSwitchCase *d_swCase[MAX_CASES];
45
46 // check whether this case is currently active
47 int d_valid[MAX_CASES];
48
49 // number of cases
51
52 // name of this switch == name of the Choice parameter handling it
53 char *d_name;
54
55 // label of this switch == Written on the top Choice
56 char *d_desc;
57
58 // active Case
60
61 // whether this is top-level or not
63
64 // a pointer to my master choice
66
67public:
69 coUifSwitch(const char *name, const char *label, int toplevel);
70
72 virtual ~coUifSwitch();
73
74 // add a case to this switch
75 coUifSwitchCase *addCase(const char *name);
76
78 int finish();
79
80 // ------------------ Virtuals from coUifElem
81
83 virtual void hide();
84
86 virtual void show();
87
89 virtual Kind kind() const;
90
92 virtual const char *getName() const;
93
95 virtual int paramChange();
96
98 virtual int setNonImmediateValue();
99
101 virtual void initialize();
102
104 virtual int switchable() const;
105
107 int isTopLevel() const;
108
110 void startUp();
111
113 coChoiceParam *getMasterChoice();
114};
115}
116#endif
#define APIEXPORT
Definition: coExport.h:275
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLuint GLsizei const GLchar * label
Definition: khronos-glext.h:8634
list of all chemical elements
Definition: coConfig.h:27
parameter to choose values from a list
Definition: coChoiceParam.h:30
Definition: coUifElem.h:21
Kind
enum Kind: SWITCH, PARAM, INPORT, OUTPORT
Definition: coUifElem.h:26
Definition: coUifSwitch.h:26
char * d_desc
Definition: coUifSwitch.h:56
coChoiceParam * d_masterChoice
Definition: coUifSwitch.h:65
int d_actCase
Definition: coUifSwitch.h:59
char * d_name
Definition: coUifSwitch.h:53
int d_numCases
Definition: coUifSwitch.h:50
int d_toplevel
Definition: coUifSwitch.h:62
Definition: coUifSwitchCase.h:24