HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ViewerHandleTemplate.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_ViewerHandleTemplate_h
10 #define HOM_ViewerHandleTemplate_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_ViewerHandleMenu.h"
17 #include "HOM_ViewerStateMenu.h"
18 
19 #include <string>
20 #include <vector>
21 #include <utility>
22 
23 SWIGOUT(%rename(ViewerHandleTemplate) HOM_ViewerHandleTemplate;)
24 SWIGOUT(%feature("notabstract") HOM_ViewerHandleTemplate;)
25 
27 {
28 public:
29 
30 #ifdef SWIG
31 %extend
32 {
34  HOM_ViewerHandleTemplate(
35  std::string const & type_name,
36  std::string const & label,
37  std::vector<HOM_NodeTypeCategory*> const& categories = std::vector<HOM_NodeTypeCategory*>())
38  {
39  return HOM().newViewerHandleTemplate(type_name, label, categories);
40  }
41 }
42 #else
44  { HOM_CONSTRUCT_OBJECT(this) }
45 #endif
46 
48  { HOM_DESTRUCT_OBJECT(this) }
49 
50  virtual std::string __repr__() = 0;
51 
52  virtual std::string typeName() const = 0;
53 
54  virtual std::vector<HOM_NodeTypeCategory*> categories() const = 0;
55 
56  SWIGOUT(%ignore bindFactory_internal;)
57  virtual void bindFactory_internal(void *callback) = 0;
58  virtual void bindMenu( HOM_ViewerStateMenu const & menu ) = 0;
59  virtual void bindIcon( std::string const & name ) = 0;
60 
61  SWIGOUT(%kwargs bindGadget;)
62  virtual void bindGadget(HOM_EnumValue const & drawable_type, std::string const & name,
63  std::string const & label=std::string()) = 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  hboost::any default_value=hboost::any(),
71  int num_components=1,
72  double min_limit=0,
73  double max_limit=1) = 0;
74 
75  virtual void exportParameters(std::vector<std::string> const & params) = 0;
76 
77  SWIGOUT(%kwargs bindSetting;)
78  virtual void bindSetting(
79  HOM_EnumValue const& param_type,
80  std::string const& name=std::string(),
81  std::string const& label=std::string(),
82  std::vector< std::vector<std::string> > const &
83  menu_items=std::vector< std::vector<std::string> >(),
84  bool menu_as_button_strip=false,
85  hboost::any default_value=hboost::any(),
86  int num_components=1,
87  double min_limit=0,
88  double max_limit=1,
89  bool align=false) = 0;
90 
91  #ifdef SWIG
92 %extend
93 {
94  virtual void bindFactory(InterpreterObject callback)
95  {
96  self->bindFactory_internal(callback);
97  }
98 }
99 #endif // SWIG
100 };
101 
102 #endif // HOM_ViewerHandleTemplate_h
103 
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1210
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_ViewerHandleTemplate * newViewerHandleTemplate(std::string const &type_name, std::string const &label, std::vector< HOM_NodeTypeCategory * > const &categories)=0
GLsizei GLenum * categories
Definition: glew.h:2581
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:1209
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:8986
GLsizei const GLchar *const * string
Definition: glew.h:1844
const GLfloat * params
Definition: glew.h:1531
HOM_API HOM_Module & HOM()