HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_OptionTemplate.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GR_OptionTemplate.h ( GR Library, C++)
7  *
8  * COMMENTS:
9  * A GR_OptionTemplate defines a display option type that can be
10  * used to create the corresponding GR_UserOption.
11  */
12 
13 #ifndef __GR_OptionTemplate__
14 #define __GR_OptionTemplate__
15 
16 #include "GR_API.h"
17 #include "GR_UserOption.h"
18 
19 #include <UT/UT_String.h>
20 
21 
23 {
24 public:
25  typedef GR_UserOption *(*GR_OptionConstructor)
26  (const char *, GR_OptionTemplate *);
27 
28  GR_OptionTemplate(const char *name, const char *label,
29  GR_OptionConstructor construct,
31 
32  virtual ~GR_OptionTemplate();
33 
34  const char *getName() const { return (const char *) myName; }
35  const char *getLabel() const { return (const char *) myLabel; }
36  GR_UserOptionType getType() const { return myType; }
37 
38  GR_UserOption *constructOption(const char *name);
39 
40 private:
41  UT_String myName;
42  UT_String myLabel;
43  GR_OptionConstructor myConstructor;
44  GR_UserOptionType myType;
45 };
46 
47 #endif
GR_UserOptionType getType() const
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
const char * getLabel() const
const char * getName() const
#define GR_API
Definition: GR_API.h:10
GLuint const GLchar * name
Definition: glcorearb.h:786
GR_UserOptionType
Definition: GR_UserOption.h:49
type
Definition: core.h:1059