HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_NetworkEditor.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_NetworkEditor_h__
10 #define __HOM_NetworkEditor_h__
11 
12 #include "HOM_PathBasedPaneTab.h"
13 #include "HOM_NetworkAnimValue.h"
14 #include "HOM_NetworkFootprint.h"
15 #include "HOM_NetworkImage.h"
16 #include "HOM_NetworkShape.h"
17 #include <hboost/tuple/tuple.hpp>
18 #include <vector>
19 
20 class HOM_Node;
21 class HOM_VopNode;
22 class HOM_NetworkItem;
24 class HOM_StickyNote;
26 class HOM_BoundingRect;
27 class HOM_Vector2;
28 
29 SWIGOUT(%rename(NetworkEditor) HOM_NetworkEditor;)
30 
32 {
33 public:
35  { HOM_CONSTRUCT_OBJECT(this) }
36  // Because the lowermost base classes initialize the virtual bases
37  // before any non-virtual bases, the correct thing to do here is
38  // explicitly call the constructor for HOM_PaneTab.
40  : HOM_PaneTab(pane), HOM_PathBasedPaneTab(pane)
41  { HOM_CONSTRUCT_OBJECT(this) }
42 
44  { HOM_DESTRUCT_OBJECT(this) }
45 
46  // Let swig know we're overriding __repr__ for this class so it doesn't
47  // provide its own __repr__.
48  SWIGOUT(virtual std::string __repr__() = 0);
49 
50  virtual bool isShowingConnectors() = 0;
51  virtual bool isPosInside(const HOM_Vector2 &pos) = 0;
52  virtual void setCursorPosition(const HOM_Vector2 &pos) = 0;
53  virtual HOM_Vector2 cursorPosition(bool confine_to_view = true) = 0;
54  virtual HOM_BoundingRect screenBounds() = 0;
55  virtual HOM_BoundingRect visibleBounds() = 0;
56  SWIGOUT(%kwargs setVisibleBounds;)
57  virtual void setVisibleBounds(const HOM_BoundingRect &bounds,
58  float transition_time = 0.0,
59  float max_scale = 0.0,
60  bool set_center_when_scale_rejected = false) = 0;
61 
62  virtual void setLocatingEnabled(bool enabled) = 0;
63  virtual bool locatingEnabled() = 0;
64 
65  virtual float lengthToScreen(float len) = 0;
66  virtual float lengthFromScreen(float len) = 0;
67 
68  virtual HOM_Vector2 sizeToScreen(const HOM_Vector2 &size) = 0;
69  virtual HOM_Vector2 sizeFromScreen(const HOM_Vector2 &size) = 0;
70 
71  virtual HOM_Vector2 posToScreen(const HOM_Vector2 &pos) = 0;
72  virtual HOM_Vector2 posFromScreen(const HOM_Vector2 &pos) = 0;
73 
74  virtual HOM_Vector2 overviewPosToScreen(const HOM_Vector2 &pos) = 0;
75  virtual HOM_Vector2 overviewPosFromScreen(const HOM_Vector2 &pos) = 0;
76  virtual bool overviewVisible() = 0;
77  virtual bool overviewVisibleIfAutomatic() = 0;
78 
79  SWIGOUT(%kwargs networkItemsInBox;)
80  virtual std::vector<hboost::tuple<HOM_ElemPtr<HOM_NetworkItem>,
82  int> >
83  networkItemsInBox(const HOM_Vector2 &pos1, const HOM_Vector2 &pos2,
84  bool for_drop = false, bool for_select = false) = 0;
85  virtual void setDropTargetItem(
86  HOM_NetworkItem *item, const char *name, int index) = 0;
87  virtual hboost::tuple<HOM_ElemPtr<HOM_NetworkItem>, std::string, int>
88  dropTargetItem() = 0;
89  virtual void setDecoratedItem(HOM_NetworkItem *item, bool interactive) = 0;
90  SWIGOUT(%newobject decoratedItem;)
91  virtual HOM_NetworkItem *decoratedItem() = 0;
92  virtual bool decorationInteractive() = 0;
93 
94  virtual void setPreSelectedItems(
95  const std::vector<HOM_NetworkItem *> &items) = 0;
96  virtual std::vector<HOM_ElemPtr<HOM_NetworkItem> > preSelectedItems() = 0;
97 
98  virtual void setNetworkBoxPendingRemovals(
99  const std::vector<HOM_NetworkMovableItem *> &items) = 0;
100  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> >
101  networkBoxPendingRemovals() = 0;
102 
103  virtual void setFootprints(
104  const std::vector<HOM_NetworkFootprint> &footprints) = 0;
105  virtual std::vector<HOM_NetworkFootprint> footprints() = 0;
106 
107  virtual void setCursorMap(
108  std::map<std::pair<std::string, int>, std::string> cursors) = 0;
109  virtual std::map<std::pair<std::string, int>, std::string> cursorMap() = 0;
110  virtual void setDefaultCursor(const char *cursor_name) = 0;
111  virtual std::string defaultCursor() = 0;
112 
113  virtual void setBackgroundImages(
114  const std::vector<HOM_NetworkImage> &images) = 0;
115  virtual std::vector<HOM_NetworkImage> backgroundImages() = 0;
116 
117  virtual HOM_BoundingRect itemRect(
118  HOM_NetworkMovableItem *item, bool adjusted=true) = 0;
119  virtual HOM_Vector2 itemInputPos(
120  HOM_NetworkMovableItem *item, int input_index, bool adjusted=true) = 0;
121  virtual HOM_Vector2 itemInputDir(
122  HOM_NetworkMovableItem *item, int input_index) = 0;
123  virtual HOM_Vector2 itemOutputPos(
124  HOM_NetworkMovableItem *item, int output_index, bool adjusted=true) = 0;
125  virtual HOM_Vector2 itemOutputDir(
126  HOM_NetworkMovableItem *item, int output_index) = 0;
127  virtual std::vector<std::pair<HOM_ElemPtr<HOM_NetworkMovableItem>,
128  HOM_BoundingRect> > allVisibleRects(
129  const std::vector<HOM_NetworkMovableItem *> &ignore_items,
130  bool adjusted = true) = 0;
131 
132  SWIGOUT(%kwargs setAdjustments;)
133  virtual void setAdjustments(
134  const std::vector<HOM_NetworkItem *> &items,
135  const std::vector<HOM_NetworkAnimValue> &adjustments,
136  bool auto_remove = false) = 0;
137  virtual void setShapes(
138  const std::vector<HOM_NetworkShape *> &shapes) = 0;
139  virtual void setOverlayShapes(
140  const std::vector<HOM_NetworkShape *> &shapes) = 0;
141 
142  virtual void setTooltip(const char *tooltip) = 0;
143  virtual std::string tooltip() = 0;
144  virtual void setPrompt(const char *prompt) = 0;
145  virtual std::string prompt() = 0;
146  virtual void flashMessage(const char *image,
147  const char *message, float duration) = 0;
148 
149  SWIGOUT(%kwargs openTabMenu;)
150  virtual void openTabMenu(const char *key = NULL,
151  bool auto_place = false,
152  bool branch = false,
153  HOM_NetworkMovableItem *src_item = NULL,
154  int src_connector_index = -1,
155  HOM_NetworkMovableItem *dest_item = NULL,
156  int dest_connector_index = -1,
157  HOM_Vector2 *node_position = NULL,
158  const std::vector<HOM_NetworkMovableItem *> &src_items =
159  std::vector<HOM_NetworkMovableItem *>(),
160  const std::vector<int> &src_connector_indexes =
161  std::vector<int>(),
162  const std::vector<HOM_NetworkMovableItem *> &dest_items =
163  std::vector<HOM_NetworkMovableItem *>(),
164  const std::vector<int> &dest_connector_indexes =
165  std::vector<int>()) = 0;
166  SWIGOUT(%kwargs openNodeMenu;)
167  virtual void openNodeMenu(HOM_Node *node = NULL,
168  const std::vector<HOM_NetworkMovableItem *> &items =
169  std::vector<HOM_NetworkMovableItem *>()) = 0;
170  virtual void openVopEffectsMenu(HOM_VopNode *node, int input_index) = 0;
171  virtual void openVopOutputInfoMenu(HOM_VopNode *node, int output_index) = 0;
172 
173  virtual int openNameEditor(HOM_NetworkMovableItem *item,
174  bool select_all = false) = 0;
175  virtual int openCommentEditor(HOM_NetworkMovableItem *item,
176  bool select_all = false) = 0;
177  virtual int openNoteEditor(HOM_StickyNote *stickynote,
178  bool select_all = false) = 0;
179  SWIGOUT(%kwargs closeTextEditor;)
180  virtual void closeTextEditor(int id, bool apply_changes = true) = 0;
181 
182  virtual int scheduleTimerEvent(float seconds) = 0;
183  virtual void handleCurrentKeyboardEvent(bool resend = false) = 0;
184  virtual void setVolatileKeys(const std::vector<std::string> &keys) = 0;
185  virtual bool isVolatileKeyDown(const char *key) = 0;
186 
187  virtual void setPref(const char *pref, const char *value) = 0;
188  virtual std::string getPref(const char *pref) = 0;
189  virtual void setPrefs(const std::map<std::string, std::string> &prefs) = 0;
190  virtual std::map<std::string, std::string> getPrefs() = 0;
191  virtual void registerPref(const char *pref, const char *value, bool global) = 0;
192  virtual std::vector<std::vector<std::string> > badges() = 0;
193  virtual std::vector<std::vector<std::string> > textBadges() = 0;
194 
195  virtual std::vector<std::string> nodeShapes() = 0;
196  virtual std::vector<std::string> reloadNodeShapes() = 0;
197  virtual void redraw() = 0;
198 
199  virtual void setDragSourceData(
200  const std::vector<HOM_NetworkMovableItem *> &items) = 0;
201 
202  SWIGOUT(%ignore pushOpaqueEventContext);
203  virtual void pushOpaqueEventContext(const char *module, void *data) = 0;
204  virtual void popEventContext() = 0;
205  SWIGOUT(%ignore opaqueEventContextData);
206  virtual void *opaqueEventContextData() = 0;
207 #ifdef SWIG
208 %extend
209 {
210  virtual void pushEventContext(const char *module, InterpreterObject data)
211  { return self->pushOpaqueEventContext(module, data); }
212  virtual InterpreterObject eventContextData()
213  { return HOMincRef((InterpreterObject)self->opaqueEventContextData()); }
214 }
215 #endif
216 };
217 
218 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:974
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2538
GLsizeiptr size
Definition: glcorearb.h:663
png_bytepp image
Definition: png.h:1849
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:973
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual ~HOM_NetworkEditor()
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2542
GLsizei const GLfloat * value
Definition: glcorearb.h:823
GLuint index
Definition: glcorearb.h:785
HOM_NetworkEditor(const HOM_NetworkEditor &pane)
std::string __repr__()