HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ViewerStateTemplate.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_ViewerStateTemplate_h
10 #define HOM_ViewerStateTemplate_h
11 
12 #include "HOM_API.h"
13 #include "HOM_Module.h"
14 #include "HOM_EnumValue.h"
15 #include "HOM_Defines.h"
16 #include "HOM_ViewerStateMenu.h"
17 #include "HOM_NodeTypeCategory.h"
18 
19 #include <string>
20 #include <vector>
21 #include <utility>
22 
23 SWIGOUT(%rename(ViewerStateTemplate) HOM_ViewerStateTemplate;)
24 SWIGOUT(%feature("notabstract") HOM_ViewerStateTemplate;)
25 
27 {
28 public:
29  typedef std::vector< std::pair<std::string, std::string> > Bindings;
30  typedef std::vector< std::string > HandleParmNames;
31  typedef std::vector< std::vector<std::string> > MenuItemParms;
32 #ifdef SWIG
33 %extend
34 {
36  HOM_ViewerStateTemplate(
37  std::string const & type_name,
38  std::string const & label,
39  HOM_NodeTypeCategory const & category,
40  std::vector<HOM_NodeTypeCategory*> const& contexts =
41  std::vector<HOM_NodeTypeCategory*>())
42  {
43  return HOM().newViewerStateTemplate(type_name, label, category, contexts);
44  }
45 }
46 #else
48  { HOM_CONSTRUCT_OBJECT(this) }
49 #endif
50 
52  { HOM_DESTRUCT_OBJECT(this) }
53 
54  virtual std::string __repr__() = 0;
55 
56  virtual std::string typeName() const = 0;
57 
58  virtual std::string categoryName() const = 0;
59 
60  virtual std::vector<HOM_NodeTypeCategory*> contexts() const = 0;
61 
62  SWIGOUT(%ignore bindFactory_internal;)
63  virtual void bindFactory_internal(void *callback) = 0;
64 
65  SWIGOUT(%kwargs bindParameter;)
66  virtual void bindParameter(
67  HOM_EnumValue const& param_type,
68  std::string const& name,
69  std::string const& label=std::string(),
70  MenuItemParms const & menu_items=MenuItemParms(),
71  bool menu_as_button_strip=false,
72  hboost::any default_value=hboost::any(),
73  int num_components=1,
74  double min_limit=0,
75  double max_limit=1,
76  bool align=false,
77  bool toolbox=true) = 0;
78 
79  SWIGOUT(%kwargs bindHandle;)
80  virtual void bindHandle(
81  std::string const& handle_type,
82  std::string const& name,
83  std::string const& settings=std::string(),
84  bool cache_previous_parms = false,
85  HandleParmNames const& handle_parms = HandleParmNames()) = 0;
86 
87  SWIGOUT(%kwargs bindHandleStatic;)
88  virtual void bindHandleStatic(
89  std::string const& handle_type,
90  std::string const& name,
91  Bindings const & bindings,
92  std::string const& settings=std::string() ) = 0;
93 
94  SWIGOUT(%kwargs bindGeometrySelector;)
95  virtual void bindGeometrySelector(
96  std::string const& prompt,
97  bool allow_drag=false,
98  bool quick_select=true,
99  bool auto_start=true,
100  bool use_existing_selection=true,
101  std::string const& initial_selection=std::string(),
102  HOM_EnumValue * initial_selection_type=nullptr,
103  bool ordered=false,
104  std::vector<HOM_EnumValue *> const& geometry_types=std::vector<HOM_EnumValue *>(),
105  std::vector<HOM_EnumValue *> const& primitive_types=std::vector<HOM_EnumValue *>(),
106  bool allow_other_sops=true,
107  bool consume_selection=true,
108  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
109  std::string const& hotkey=std::string(),
110  std::string const& name=std::string()) = 0;
111 
112  SWIGOUT(%kwargs bindObjectSelector;)
113  virtual void bindObjectSelector(
114  std::string const& prompt,
115  bool quick_select=true,
116  bool auto_start=true,
117  bool use_existing_selection=true,
118  bool allow_multisel = true,
119  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
120  std::vector<std::string> const & allowed_types = std::vector<std::string>(1, "*"),
121  std::string const& hotkey=std::string(),
122  std::string const& name=std::string()) = 0;
123 
124  SWIGOUT(%kwargs bindSceneGraphSelector;)
125  virtual void bindSceneGraphSelector(
126  std::string const& prompt,
127  bool allow_drag = true,
128  bool quick_select = true,
129  bool auto_start=true,
130  bool use_existing_selection = true,
131  bool allow_multisel = true,
132  bool consume_selection = false,
133  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
134  std::vector<std::string> const& prior_selection_paths = std::vector<std::string>(),
135  HOM_EnumValue const& prim_mask = HOM_scenePrimMask::ViewerSetting,
136  std::string const& path_prefix_mask = std::string(),
137  std::string const& prim_kind = std::string(),
138  std::string const& hotkey = std::string(),
139  std::string const& name = std::string()) = 0;
140 
141  SWIGOUT(%kwargs bindDynamicsSelector;)
142  virtual void bindDynamicsSelector(
143  std::string const& prompt,
144  bool auto_start=true,
145  bool allow_objects = true,
146  bool allow_modifiers = false,
147  bool quick_select = false,
148  bool use_existing_selection = true,
149  bool allow_multisel = true,
150  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
151  std::string const& hotkey=std::string(),
152  std::string const& name=std::string()) = 0;
153 
154  SWIGOUT(%kwargs bindDynamicsPointSelector;)
155  virtual void bindDynamicsPointSelector(
156  std::string const& prompt,
157  bool auto_start=true,
158  bool allow_objects = true,
159  bool allow_modifiers = false,
160  bool quick_select = false,
161  bool use_existing_selection = true,
162  bool allow_multisel = true,
163  bool only_select_points = true,
164  bool object_based_point_selection = false,
165  bool use_last_selected_object = false,
166  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
167  std::string const& hotkey=std::string(),
168  std::string const& name=std::string()) = 0;
169 
170  SWIGOUT(%kwargs bindDynamicsPolygonSelector;)
171  virtual void bindDynamicsPolygonSelector(
172  std::string const& prompt,
173  bool auto_start=true,
174  bool quick_select = false,
175  bool use_existing_selection = true,
176  bool object_based_point_selection = false,
177  bool use_last_selected_object = false,
178  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
179  std::string const& hotkey=std::string(),
180  std::string const& name=std::string()) = 0;
181 
182  SWIGOUT(%kwargs bindSelector;)
183  virtual void bindSelector(
184  std::string const& name,
185  std::string const& selector_type,
186  std::string const& prompt,
187  std::vector<HOM_EnumValue *> primitive_types = std::vector<HOM_EnumValue *>(),
188  std::string const& group_parm_name = std::string(),
189  int input_index = 0,
190  bool input_required = true,
191  bool allow_dragging = true ) = 0;
192 
193  virtual void bindMenu( HOM_ViewerStateMenu const & menu ) = 0;
194 
195  virtual void bindIcon( std::string const & name ) = 0;
196 
197  #ifdef SWIG
198 %extend
199 {
200  virtual void bindFactory(InterpreterObject callback)
201  {
202  self->bindFactory_internal(callback);
203  }
204 }
205 #endif // SWIG
206 };
207 
208 #endif // HOM_ViewerStateTemplate_h
209 
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1130
GLuint const GLchar * name
Definition: glew.h:1814
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
virtual HOM_ViewerStateTemplate * newViewerStateTemplate(std::string const &type_name, std::string const &label, HOM_NodeTypeCategory const &category, std::vector< HOM_NodeTypeCategory * > const &contexts)=0
bool any(const vbool4 &v)
Definition: simd.h:3372
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1129
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:8986
GLsizei const GLchar *const * string
Definition: glew.h:1844
std::vector< std::pair< std::string, std::string > > Bindings
std::vector< std::string > HandleParmNames
HOM_API HOM_Module & HOM()
std::vector< std::vector< std::string > > MenuItemParms