HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Dialog.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_Dialog_h__
10 #define __HOM_Dialog_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_Module.h"
16 
17 SWIGOUT(%rename(Dialog) HOM_Dialog;)
18 
20 {
21 public:
23  { HOM_CONSTRUCT_OBJECT(this) }
25  { HOM_CONSTRUCT_OBJECT(this) }
26  virtual ~HOM_Dialog()
27  { HOM_DESTRUCT_OBJECT(this) }
28 
29  virtual std::string __repr__() = 0;
30 
31  virtual void destroy() = 0;
32 
33  virtual void setValue(const char *name, const char *value) = 0;
34  virtual void setValue(const char *name, int value) = 0;
35  virtual void setValue(const char *name, double value) = 0;
36 
37  SWIGOUT(%ignore boostAnyValue;)
38  virtual hboost::any boostAnyValue(const char *name) = 0;
39 
40  virtual void enableValue(const char *name, bool onoff) = 0;
41 
42  SWIGOUT(%ignore addOpaqueCallback;)
43  virtual void addOpaqueCallback(const char *name, void *callback) = 0;
44 
45  SWIGOUT(%ignore removeOpaqueCallback;)
46  virtual void removeOpaqueCallback(const char *name, void *callback) = 0;
47 
48  SWIGOUT(%ignore opaqueCallbacks;)
49  virtual std::vector<void *> opaqueCallbacks(const char *name) = 0;
50 
51  virtual void waitForValueToChangeTo(const char *name, const char *new_value) = 0;
52 
53  virtual void waitForValueToChangeTo(const char *name, int new_value) = 0;
54 
55  virtual std::vector<std::string> menuItems(const char *name) = 0;
56  virtual void setMenuItems(const char *name,
57  const std::vector<std::string> &items) = 0;
58 
59 #ifdef SWIG
60 %extend
61 {
62  InterpreterObject value(const char *name)
63  { return HOMboostAnyToInterpreterObject(self->boostAnyValue(name)); }
64 
65  virtual void addCallback(const char *name, InterpreterObject callback)
66  { self->addOpaqueCallback(name, callback); }
67 
68  virtual void removeCallback(const char *name, InterpreterObject callback)
69  { self->removeOpaqueCallback(name, callback); }
70 
71 
72  // Note that we return a vector of borrowed references because swig
73  // will increment the reference counts.
74  std::vector<InterpreterObject> callbacks(const char *name)
75  {
76  std::vector<void *> opaque_callbacks(self->opaqueCallbacks(name));
77 
78  std::vector<InterpreterObject> callbacks;
79  for (int i=0; i< opaque_callbacks.size(); ++i)
80  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
81  return callbacks;
82  }
83 }
84 #endif
85 };
86 
87 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1053
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:344
png_uint_32 i
Definition: png.h:2877
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1052
GLuint const GLchar * name
Definition: glcorearb.h:785
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual ~HOM_Dialog()
Definition: HOM_Dialog.h:26
HOM_Dialog(const HOM_Dialog &)
Definition: HOM_Dialog.h:24