-
Notifications
You must be signed in to change notification settings - Fork 16
/
cimnodes.cpp
364 lines (359 loc) · 10.7 KB
/
cimnodes.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
//This file is automatically generated by generator.lua from https://github.com/cimgui/imnodes
//based on imnodes.h file version XXX from https://github.com/Nelarius/imnodes
#include "imgui.h"
#include "imgui_internal.h"
#include "./imnodes/imnodes.h"
#include "cimnodes.h"
CIMGUI_API EmulateThreeButtonMouse* EmulateThreeButtonMouse_EmulateThreeButtonMouse(void)
{
return IM_NEW(EmulateThreeButtonMouse)();
}
CIMGUI_API void EmulateThreeButtonMouse_destroy(EmulateThreeButtonMouse* self)
{
IM_DELETE(self);
}
CIMGUI_API LinkDetachWithModifierClick* LinkDetachWithModifierClick_LinkDetachWithModifierClick(void)
{
return IM_NEW(LinkDetachWithModifierClick)();
}
CIMGUI_API void LinkDetachWithModifierClick_destroy(LinkDetachWithModifierClick* self)
{
IM_DELETE(self);
}
CIMGUI_API MultipleSelectModifier* MultipleSelectModifier_MultipleSelectModifier(void)
{
return IM_NEW(MultipleSelectModifier)();
}
CIMGUI_API void MultipleSelectModifier_destroy(MultipleSelectModifier* self)
{
IM_DELETE(self);
}
CIMGUI_API ImNodesIO* ImNodesIO_ImNodesIO(void)
{
return IM_NEW(ImNodesIO)();
}
CIMGUI_API void ImNodesIO_destroy(ImNodesIO* self)
{
IM_DELETE(self);
}
CIMGUI_API ImNodesStyle* ImNodesStyle_ImNodesStyle(void)
{
return IM_NEW(ImNodesStyle)();
}
CIMGUI_API void ImNodesStyle_destroy(ImNodesStyle* self)
{
IM_DELETE(self);
}
CIMGUI_API void imnodes_SetImGuiContext(ImGuiContext* ctx)
{
return imnodes::SetImGuiContext(ctx);
}
CIMGUI_API ImNodesContext* imnodes_CreateContext()
{
return imnodes::CreateContext();
}
CIMGUI_API void imnodes_DestroyContext(ImNodesContext* ctx)
{
return imnodes::DestroyContext(ctx);
}
CIMGUI_API ImNodesContext* imnodes_GetCurrentContext()
{
return imnodes::GetCurrentContext();
}
CIMGUI_API void imnodes_SetCurrentContext(ImNodesContext* ctx)
{
return imnodes::SetCurrentContext(ctx);
}
CIMGUI_API ImNodesEditorContext* imnodes_EditorContextCreate()
{
return imnodes::EditorContextCreate();
}
CIMGUI_API void imnodes_EditorContextFree(ImNodesEditorContext* noname1)
{
return imnodes::EditorContextFree(noname1);
}
CIMGUI_API void imnodes_EditorContextSet(ImNodesEditorContext* noname1)
{
return imnodes::EditorContextSet(noname1);
}
CIMGUI_API void imnodes_EditorContextGetPanning(ImVec2 *pOut)
{
*pOut = imnodes::EditorContextGetPanning();
}
CIMGUI_API void imnodes_EditorContextResetPanning(const ImVec2 pos)
{
return imnodes::EditorContextResetPanning(pos);
}
CIMGUI_API void imnodes_EditorContextMoveToNode(const int node_id)
{
return imnodes::EditorContextMoveToNode(node_id);
}
CIMGUI_API ImNodesIO* imnodes_GetIO()
{
return &imnodes::GetIO();
}
CIMGUI_API ImNodesStyle* imnodes_GetStyle()
{
return &imnodes::GetStyle();
}
CIMGUI_API void imnodes_StyleColorsDark(ImNodesStyle* dest)
{
return imnodes::StyleColorsDark(dest);
}
CIMGUI_API void imnodes_StyleColorsClassic(ImNodesStyle* dest)
{
return imnodes::StyleColorsClassic(dest);
}
CIMGUI_API void imnodes_StyleColorsLight(ImNodesStyle* dest)
{
return imnodes::StyleColorsLight(dest);
}
CIMGUI_API void imnodes_BeginNodeEditor()
{
return imnodes::BeginNodeEditor();
}
CIMGUI_API void imnodes_EndNodeEditor()
{
return imnodes::EndNodeEditor();
}
CIMGUI_API void imnodes_MiniMap(const float minimap_size_fraction,const ImNodesMiniMapLocation location,const ImNodesMiniMapNodeHoveringCallback node_hovering_callback,const ImNodesMiniMapNodeHoveringCallbackUserData node_hovering_callback_data)
{
return imnodes::MiniMap(minimap_size_fraction,location,node_hovering_callback,node_hovering_callback_data);
}
CIMGUI_API void imnodes_PushColorStyle(ImNodesCol item,unsigned int color)
{
return imnodes::PushColorStyle(item,color);
}
CIMGUI_API void imnodes_PopColorStyle()
{
return imnodes::PopColorStyle();
}
CIMGUI_API void imnodes_PushStyleVar_Float(ImNodesStyleVar style_item,float value)
{
return imnodes::PushStyleVar(style_item,value);
}
CIMGUI_API void imnodes_PushStyleVar_Vec2(ImNodesStyleVar style_item,const ImVec2 value)
{
return imnodes::PushStyleVar(style_item,value);
}
CIMGUI_API void imnodes_PopStyleVar(int count)
{
return imnodes::PopStyleVar(count);
}
CIMGUI_API void imnodes_BeginNode(int id)
{
return imnodes::BeginNode(id);
}
CIMGUI_API void imnodes_EndNode()
{
return imnodes::EndNode();
}
CIMGUI_API void imnodes_GetNodeDimensions(ImVec2 *pOut,int id)
{
*pOut = imnodes::GetNodeDimensions(id);
}
CIMGUI_API void imnodes_BeginNodeTitleBar()
{
return imnodes::BeginNodeTitleBar();
}
CIMGUI_API void imnodes_EndNodeTitleBar()
{
return imnodes::EndNodeTitleBar();
}
CIMGUI_API void imnodes_BeginInputAttribute(int id,ImNodesPinShape shape)
{
return imnodes::BeginInputAttribute(id,shape);
}
CIMGUI_API void imnodes_EndInputAttribute()
{
return imnodes::EndInputAttribute();
}
CIMGUI_API void imnodes_BeginOutputAttribute(int id,ImNodesPinShape shape)
{
return imnodes::BeginOutputAttribute(id,shape);
}
CIMGUI_API void imnodes_EndOutputAttribute()
{
return imnodes::EndOutputAttribute();
}
CIMGUI_API void imnodes_BeginStaticAttribute(int id)
{
return imnodes::BeginStaticAttribute(id);
}
CIMGUI_API void imnodes_EndStaticAttribute()
{
return imnodes::EndStaticAttribute();
}
CIMGUI_API void imnodes_PushAttributeFlag(ImNodesAttributeFlags flag)
{
return imnodes::PushAttributeFlag(flag);
}
CIMGUI_API void imnodes_PopAttributeFlag()
{
return imnodes::PopAttributeFlag();
}
CIMGUI_API void imnodes_Link(int id,int start_attribute_id,int end_attribute_id)
{
return imnodes::Link(id,start_attribute_id,end_attribute_id);
}
CIMGUI_API void imnodes_SetNodeDraggable(int node_id,const bool draggable)
{
return imnodes::SetNodeDraggable(node_id,draggable);
}
CIMGUI_API void imnodes_SetNodeScreenSpacePos(int node_id,const ImVec2 screen_space_pos)
{
return imnodes::SetNodeScreenSpacePos(node_id,screen_space_pos);
}
CIMGUI_API void imnodes_SetNodeEditorSpacePos(int node_id,const ImVec2 editor_space_pos)
{
return imnodes::SetNodeEditorSpacePos(node_id,editor_space_pos);
}
CIMGUI_API void imnodes_SetNodeGridSpacePos(int node_id,const ImVec2 grid_pos)
{
return imnodes::SetNodeGridSpacePos(node_id,grid_pos);
}
CIMGUI_API void imnodes_GetNodeScreenSpacePos(ImVec2 *pOut,const int node_id)
{
*pOut = imnodes::GetNodeScreenSpacePos(node_id);
}
CIMGUI_API void imnodes_GetNodeEditorSpacePos(ImVec2 *pOut,const int node_id)
{
*pOut = imnodes::GetNodeEditorSpacePos(node_id);
}
CIMGUI_API void imnodes_GetNodeGridSpacePos(ImVec2 *pOut,const int node_id)
{
*pOut = imnodes::GetNodeGridSpacePos(node_id);
}
CIMGUI_API void imnodes_SnapNodeToGrid(int node_id)
{
return imnodes::SnapNodeToGrid(node_id);
}
CIMGUI_API bool imnodes_IsEditorHovered()
{
return imnodes::IsEditorHovered();
}
CIMGUI_API bool imnodes_IsNodeHovered(int* node_id)
{
return imnodes::IsNodeHovered(node_id);
}
CIMGUI_API bool imnodes_IsLinkHovered(int* link_id)
{
return imnodes::IsLinkHovered(link_id);
}
CIMGUI_API bool imnodes_IsPinHovered(int* attribute_id)
{
return imnodes::IsPinHovered(attribute_id);
}
CIMGUI_API int imnodes_NumSelectedNodes()
{
return imnodes::NumSelectedNodes();
}
CIMGUI_API int imnodes_NumSelectedLinks()
{
return imnodes::NumSelectedLinks();
}
CIMGUI_API void imnodes_GetSelectedNodes(int* node_ids)
{
return imnodes::GetSelectedNodes(node_ids);
}
CIMGUI_API void imnodes_GetSelectedLinks(int* link_ids)
{
return imnodes::GetSelectedLinks(link_ids);
}
CIMGUI_API void imnodes_ClearNodeSelection_Nil()
{
return imnodes::ClearNodeSelection();
}
CIMGUI_API void imnodes_ClearLinkSelection_Nil()
{
return imnodes::ClearLinkSelection();
}
CIMGUI_API void imnodes_SelectNode(int node_id)
{
return imnodes::SelectNode(node_id);
}
CIMGUI_API void imnodes_ClearNodeSelection_Int(int node_id)
{
return imnodes::ClearNodeSelection(node_id);
}
CIMGUI_API bool imnodes_IsNodeSelected(int node_id)
{
return imnodes::IsNodeSelected(node_id);
}
CIMGUI_API void imnodes_SelectLink(int link_id)
{
return imnodes::SelectLink(link_id);
}
CIMGUI_API void imnodes_ClearLinkSelection_Int(int link_id)
{
return imnodes::ClearLinkSelection(link_id);
}
CIMGUI_API bool imnodes_IsLinkSelected(int link_id)
{
return imnodes::IsLinkSelected(link_id);
}
CIMGUI_API bool imnodes_IsAttributeActive()
{
return imnodes::IsAttributeActive();
}
CIMGUI_API bool imnodes_IsAnyAttributeActive(int* attribute_id)
{
return imnodes::IsAnyAttributeActive(attribute_id);
}
CIMGUI_API bool imnodes_IsLinkStarted(int* started_at_attribute_id)
{
return imnodes::IsLinkStarted(started_at_attribute_id);
}
CIMGUI_API bool imnodes_IsLinkDropped(int* started_at_attribute_id,bool including_detached_links)
{
return imnodes::IsLinkDropped(started_at_attribute_id,including_detached_links);
}
CIMGUI_API bool imnodes_IsLinkCreated_BoolPtr(int* started_at_attribute_id,int* ended_at_attribute_id,bool* created_from_snap)
{
return imnodes::IsLinkCreated(started_at_attribute_id,ended_at_attribute_id,created_from_snap);
}
CIMGUI_API bool imnodes_IsLinkCreated_IntPtr(int* started_at_node_id,int* started_at_attribute_id,int* ended_at_node_id,int* ended_at_attribute_id,bool* created_from_snap)
{
return imnodes::IsLinkCreated(started_at_node_id,started_at_attribute_id,ended_at_node_id,ended_at_attribute_id,created_from_snap);
}
CIMGUI_API bool imnodes_IsLinkDestroyed(int* link_id)
{
return imnodes::IsLinkDestroyed(link_id);
}
CIMGUI_API const char* imnodes_SaveCurrentEditorStateToIniString(size_t* data_size)
{
return imnodes::SaveCurrentEditorStateToIniString(data_size);
}
CIMGUI_API const char* imnodes_SaveEditorStateToIniString(const ImNodesEditorContext* editor,size_t* data_size)
{
return imnodes::SaveEditorStateToIniString(editor,data_size);
}
CIMGUI_API void imnodes_LoadCurrentEditorStateFromIniString(const char* data,size_t data_size)
{
return imnodes::LoadCurrentEditorStateFromIniString(data,data_size);
}
CIMGUI_API void imnodes_LoadEditorStateFromIniString(ImNodesEditorContext* editor,const char* data,size_t data_size)
{
return imnodes::LoadEditorStateFromIniString(editor,data,data_size);
}
CIMGUI_API void imnodes_SaveCurrentEditorStateToIniFile(const char* file_name)
{
return imnodes::SaveCurrentEditorStateToIniFile(file_name);
}
CIMGUI_API void imnodes_SaveEditorStateToIniFile(const ImNodesEditorContext* editor,const char* file_name)
{
return imnodes::SaveEditorStateToIniFile(editor,file_name);
}
CIMGUI_API void imnodes_LoadCurrentEditorStateFromIniFile(const char* file_name)
{
return imnodes::LoadCurrentEditorStateFromIniFile(file_name);
}
CIMGUI_API void imnodes_LoadEditorStateFromIniFile(ImNodesEditorContext* editor,const char* file_name)
{
return imnodes::LoadEditorStateFromIniFile(editor,file_name);
}
//needed for io.link_detach_with_modifier_click.modifier = &ImGui::GetIO().KeyCtrl
CIMGUI_API bool* getIOKeyCtrlPtr()
{
return &ImGui::GetIO().KeyCtrl;
}