COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coColormapChoiceParam.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_COLORMAPCHOICE_PARAM_H_
9 #define _CO_COLORMAPCHOICE_PARAM_H_
10 
11 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12 // + +
13 // + coColormapChoiceParam Parameter handling class +
14 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 
16 #include <covise/covise.h>
17 #include <appl/CoviseBase.h>
18 #include "coUifPara.h"
19 
20 namespace covise
21 {
22 
25 {
26 public:
28  coColormapChoiceParam(const char *name, const char *desc);
29 
31  virtual ~coColormapChoiceParam();
32 
34  virtual int isOfType(coUifPara::Typeinfo type);
35 
37  static coUifPara::Typeinfo getType();
38 
40  virtual int paramChange();
41 
43  virtual void initialize();
44 
46  virtual void print(ostream &str) const;
47 
49  int setValue(int numChoices, int actChoice, TColormapChoice *list);
50 
52  int setValue(int actChoice);
53 
55  int getValue() const;
56 
58  TColormapChoice getValue(int i) const;
59 
61  const string getActLabel() const;
62 
64  const string getLabel(int i) const;
65 
67  int getNumChoices() const;
68 
70  virtual const char *getTypeString() const;
71 
73  virtual const char *getValString() const;
74 
76  virtual void setValString(const char *str);
77 
78 private:
79  enum
80  {
81  MAX_CHOICE_LABELS = 256
82  };
83 
86 
88  coColormapChoiceParam &operator=(const coColormapChoiceParam &);
89 
92 
95 
100 
101  // Parameter type name
102  static const char *s_type;
103 };
104 }
105 #endif
Definition: coUifPara.h:23
GLuint const GLchar * name
Definition: khronos-glext.h:6722
parameter to choose values from a list
Definition: coColormapChoiceParam.h:24
static const char * s_type
Definition: coColormapChoiceParam.h:102
static coUifPara::Typeinfo s_paraType
my type info
Definition: coColormapChoiceParam.h:94
int d_activeChoice
Definition: coColormapChoiceParam.h:98
int d_numChoices
Port data fields.
Definition: coColormapChoiceParam.h:97
TColormapChoice * colormaps
Definition: coColormapChoiceParam.h:99
#define APIEXPORT
Definition: coExport.h:251
GLenum type
Definition: khronos-glext.h:6279
Definition: CoviseBase.h:51
int Typeinfo
Definition: coUifPara.h:28