HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_MenuParmTemplate.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  * COMMENTS:
7  */
8 
9 #ifndef __HOM_MenuParmTemplate_h__
10 #define __HOM_MenuParmTemplate_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_ParmTemplate.h"
14 #include "HOM_EnumModules.h"
15 
16 SWIGOUT(%feature("notabstract") HOM_MenuParmTemplate;)
17 SWIGOUT(%rename(MenuParmTemplate) HOM_MenuParmTemplate;)
18 
20 {
21 public:
22 #ifdef SWIG
23 %extend {
24  %kwargs HOM_MenuParmTemplate;
25  HOM_MenuParmTemplate(
26  const char *name,
27  const char *label,
28  const std::vector<std::string> &menu_items,
29  const std::vector<std::string> &menu_labels =
30  std::vector<std::string>(),
31  int default_value = 0,
32  const std::vector<std::string> &icon_names =
33  std::vector<std::string>(),
34  const std::string &item_generator_script = "",
35  HOM_EnumValue *item_generator_script_language = NULL,
36  HOM_EnumValue &menu_type = HOM_menuType::Normal,
37  const char *disable_when = NULL,
38  bool is_hidden = false,
39  bool is_label_hidden = false,
40  bool join_with_next = false,
41  const char *help = NULL,
42  const char *script_callback = NULL,
43  HOM_EnumValue &script_callback_language =
44  HOM_scriptLanguage::Hscript,
45  const std::map<std::string, std::string> &tags =
47  const std::map<HOM_EnumValue, std::string> &conditionals =
49  const std::string &default_expression = "",
50  const HOM_EnumValue &default_expression_language =
51  HOM_scriptLanguage::Hscript,
52  bool store_default_value_as_string=false,
53  bool menu_use_token = false,
54  bool is_button_strip = false,
55  bool strip_uses_icons = false
56  )
57  {
58  return HOM().newMenuParmTemplate(
59  name, label, menu_items, menu_labels, default_value, icon_names,
60  item_generator_script, item_generator_script_language,
61  menu_type, menu_use_token, disable_when, is_hidden, is_label_hidden,
62  join_with_next, help, script_callback, script_callback_language,
63  tags, conditionals, default_expression,
64  default_expression_language, store_default_value_as_string,
65  is_button_strip, strip_uses_icons
66  );
67  }
68 };
69 #else
71  { HOM_CONSTRUCT_OBJECT(this) }
72 
74  : HOM_ParmTemplate(parm_template)
75  { HOM_CONSTRUCT_OBJECT(this) }
76 #endif
77 
79  { HOM_DESTRUCT_OBJECT(this) }
80 
81  // Let swig think we're overriding __repr__ for this class so it doesn't
82  // provide its own __repr__.
83  SWIGOUT(virtual std::string __repr__();)
84 
85  virtual int defaultValue() = 0;
86  virtual std::string defaultValueAsString() = 0;
87  virtual void setDefaultValue(int default_value) = 0;
88  virtual std::string defaultExpression() = 0;
89  virtual void setDefaultExpression(
90  const std::string &default_expression) = 0;
91  virtual HOM_EnumValue &defaultExpressionLanguage() = 0;
92  virtual void setDefaultExpressionLanguage(
93  const HOM_EnumValue &default_expression_language) = 0;
94 
95  virtual std::vector<std::string> menuItems() = 0;
96  virtual void setMenuItems(const std::vector<std::string> &menu_items) = 0;
97 
98  virtual std::vector<std::string> menuLabels() = 0;
99  virtual void setMenuLabels(const std::vector<std::string> &menu_labels) = 0;
100 
101  virtual std::vector<std::string> iconNames() = 0;
102  virtual void setIconNames(const std::vector<std::string> &icon_names) = 0;
103 
104  virtual std::string itemGeneratorScript() = 0;
105  virtual void setItemGeneratorScript(const char *item_generator_script) = 0;
106 
107  virtual HOM_EnumValue &itemGeneratorScriptLanguage() = 0;
108  virtual void setItemGeneratorScriptLanguage(HOM_EnumValue &language) = 0;
109 
110  virtual HOM_EnumValue &menuType() = 0;
111  virtual void setMenuType(HOM_EnumValue &menu_type) = 0;
112 
113  virtual bool menuUseToken() = 0;
114  virtual void setMenuUseToken(bool menuusetoken) = 0;
115 
116  virtual bool isButtonStrip() const = 0;
117  virtual bool isIconStrip() const = 0;
118  virtual bool isMenu() const = 0;
119  virtual void setAsButtonStrip() = 0;
120  virtual void setAsIconStrip() = 0;
121  virtual void setAsMenu() = 0;
122 };
123 
124 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1133
GLuint const GLchar * name
Definition: glew.h:1814
OIIO_API bool rename(string_view from, string_view to, std::string &err)
HOM_MenuParmTemplate(const HOM_MenuParmTemplate &parm_template)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1132
virtual HOM_MenuParmTemplate * newMenuParmTemplate(const char *name, const char *label, const std::vector< std::string > &menu_items, const std::vector< std::string > &menu_labels, int default_value, const std::vector< std::string > &icon_names, const std::string &item_generator_script, HOM_EnumValue *item_generator_script_language, HOM_EnumValue &menu_type, bool menu_use_token, const char *disable_when, bool is_hidden, bool is_label_hidden, bool join_with_next, const char *help, const char *script_callback, HOM_EnumValue &script_callback_language, const std::map< std::string, std::string > &tags, const std::map< HOM_EnumValue, std::string > &conditionals, const std::string &default_expression, const HOM_EnumValue &default_expression_language, bool store_default_value_as_string, bool is_button_strip, bool strip_uses_icons)=0
std::map< HOM_EnumValue, std::string > HOM_StdMapEnumString
Definition: HOM_Module.h:1139
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:8986
GLsizei const GLchar *const * string
Definition: glew.h:1844
HOM_API HOM_Module & HOM()
std::map< std::string, std::string > HOM_StdMapStringString
Definition: HOM_Module.h:1138