#include "imgui.h"
#include "imgui_internal.h"
#include "./imgui-node-editor/imgui_node_editor.h"
#include "cimnodes_editor.h"
#include <cstring>
static inline ImVec2 ConvertToCPP_ImVec2(const ImVec2_c& src)
{
ImVec2 dest;
dest.x = src.x;
dest.y = src.y;
return dest;
}
static inline ImVec2_c ConvertFromCPP_ImVec2(const ImVec2& src)
{
ImVec2_c dest;
dest.x = src.x;
dest.y = src.y;
return dest;
}
static inline ImVec4 ConvertToCPP_ImVec4(const ImVec4_c& src)
{
ImVec4 dest;
dest.x = src.x;
dest.y = src.y;
dest.z = src.z;
dest.w = src.w;
return dest;
}
static inline ImVec4_c ConvertFromCPP_ImVec4(const ImVec4& src)
{
ImVec4_c dest;
dest.x = src.x;
dest.y = src.y;
dest.z = src.z;
dest.w = src.w;
return dest;
}CIMGUI_API Config* ax_NodeEditor_Config_Config_Config(void)
{
return IM_NEW(Config)();
}
CIMGUI_API void Config_destroy(Config* self)
{
IM_DELETE(self);
}
CIMGUI_API void ax_NodeEditor_SetCurrentEditor(EditorContext* ctx)
{
return ax::NodeEditor::SetCurrentEditor(ctx);
}
CIMGUI_API EditorContext* ax_NodeEditor_GetCurrentEditor()
{
return ax::NodeEditor::GetCurrentEditor();
}
CIMGUI_API EditorContext* ax_NodeEditor_CreateEditor(const Config* config)
{
return ax::NodeEditor::CreateEditor(config);
}
CIMGUI_API void ax_NodeEditor_DestroyEditor(EditorContext* ctx)
{
return ax::NodeEditor::DestroyEditor(ctx);
}
CIMGUI_API const Config* ax_NodeEditor_GetConfig(EditorContext* ctx)
{
return &ax::NodeEditor::GetConfig(ctx);
}
CIMGUI_API cimnodes_editor_Style* ax_NodeEditor_GetStyle()
{
return &ax::NodeEditor::GetStyle();
}
CIMGUI_API const char* ax_NodeEditor_GetStyleColorName(StyleColor colorIndex)
{
return ax::NodeEditor::GetStyleColorName(colorIndex);
}
CIMGUI_API void ax_NodeEditor_PushStyleColor(StyleColor colorIndex,const ImVec4_c color)
{
return ax::NodeEditor::PushStyleColor(colorIndex,ConvertToCPP_ImVec4(color));
}
CIMGUI_API void ax_NodeEditor_PopStyleColor(int count)
{
return ax::NodeEditor::PopStyleColor(count);
}
CIMGUI_API void ax_NodeEditor_PushStyleVar_Float(StyleVar varIndex,float value)
{
return ax::NodeEditor::PushStyleVar(varIndex,value);
}
CIMGUI_API void ax_NodeEditor_PushStyleVar_Vec2(StyleVar varIndex,const ImVec2_c value)
{
return ax::NodeEditor::PushStyleVar(varIndex,ConvertToCPP_ImVec2(value));
}
CIMGUI_API void ax_NodeEditor_PushStyleVar_Vec4(StyleVar varIndex,const ImVec4_c value)
{
return ax::NodeEditor::PushStyleVar(varIndex,ConvertToCPP_ImVec4(value));
}
CIMGUI_API void ax_NodeEditor_PopStyleVar(int count)
{
return ax::NodeEditor::PopStyleVar(count);
}
CIMGUI_API void ax_NodeEditor_Begin(const char* id,const ImVec2_c size)
{
return ax::NodeEditor::Begin(id,ConvertToCPP_ImVec2(size));
}
CIMGUI_API void ax_NodeEditor_End()
{
return ax::NodeEditor::End();
}
CIMGUI_API void ax_NodeEditor_BeginNode(NodeId* id)
{
return ax::NodeEditor::BeginNode(*id);
}
CIMGUI_API void ax_NodeEditor_BeginPin(PinId* id,PinKind kind)
{
return ax::NodeEditor::BeginPin(*id,kind);
}
CIMGUI_API void ax_NodeEditor_PinRect(const ImVec2_c a,const ImVec2_c b)
{
return ax::NodeEditor::PinRect(ConvertToCPP_ImVec2(a),ConvertToCPP_ImVec2(b));
}
CIMGUI_API void ax_NodeEditor_PinPivotRect(const ImVec2_c a,const ImVec2_c b)
{
return ax::NodeEditor::PinPivotRect(ConvertToCPP_ImVec2(a),ConvertToCPP_ImVec2(b));
}
CIMGUI_API void ax_NodeEditor_PinPivotSize(const ImVec2_c size)
{
return ax::NodeEditor::PinPivotSize(ConvertToCPP_ImVec2(size));
}
CIMGUI_API void ax_NodeEditor_PinPivotScale(const ImVec2_c scale)
{
return ax::NodeEditor::PinPivotScale(ConvertToCPP_ImVec2(scale));
}
CIMGUI_API void ax_NodeEditor_PinPivotAlignment(const ImVec2_c alignment)
{
return ax::NodeEditor::PinPivotAlignment(ConvertToCPP_ImVec2(alignment));
}
CIMGUI_API void ax_NodeEditor_EndPin()
{
return ax::NodeEditor::EndPin();
}
CIMGUI_API void ax_NodeEditor_Group(const ImVec2_c size)
{
return ax::NodeEditor::Group(ConvertToCPP_ImVec2(size));
}
CIMGUI_API void ax_NodeEditor_EndNode()
{
return ax::NodeEditor::EndNode();
}
CIMGUI_API bool ax_NodeEditor_BeginGroupHint(NodeId* nodeId)
{
return ax::NodeEditor::BeginGroupHint(*nodeId);
}
CIMGUI_API ImVec2_c ax_NodeEditor_GetGroupMin()
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::GetGroupMin());
}
CIMGUI_API ImVec2_c ax_NodeEditor_GetGroupMax()
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::GetGroupMax());
}
CIMGUI_API ImDrawList* ax_NodeEditor_GetHintForegroundDrawList()
{
return ax::NodeEditor::GetHintForegroundDrawList();
}
CIMGUI_API ImDrawList* ax_NodeEditor_GetHintBackgroundDrawList()
{
return ax::NodeEditor::GetHintBackgroundDrawList();
}
CIMGUI_API void ax_NodeEditor_EndGroupHint()
{
return ax::NodeEditor::EndGroupHint();
}
CIMGUI_API ImDrawList* ax_NodeEditor_GetNodeBackgroundDrawList(NodeId* nodeId)
{
return ax::NodeEditor::GetNodeBackgroundDrawList(*nodeId);
}
CIMGUI_API bool ax_NodeEditor_Link(LinkId* id,PinId* startPinId,PinId* endPinId,const ImVec4_c color,float thickness)
{
return ax::NodeEditor::Link(*id,*startPinId,*endPinId,ConvertToCPP_ImVec4(color),thickness);
}
CIMGUI_API void ax_NodeEditor_Flow(LinkId* linkId,FlowDirection direction)
{
return ax::NodeEditor::Flow(*linkId,direction);
}
CIMGUI_API bool ax_NodeEditor_BeginCreate(const ImVec4_c color,float thickness)
{
return ax::NodeEditor::BeginCreate(ConvertToCPP_ImVec4(color),thickness);
}
CIMGUI_API bool ax_NodeEditor_QueryNewLink_Nil(PinId* startId,PinId* endId)
{
return ax::NodeEditor::QueryNewLink(startId,endId);
}
CIMGUI_API bool ax_NodeEditor_QueryNewLink_Vec4(PinId* startId,PinId* endId,const ImVec4_c color,float thickness)
{
return ax::NodeEditor::QueryNewLink(startId,endId,ConvertToCPP_ImVec4(color),thickness);
}
CIMGUI_API bool ax_NodeEditor_QueryNewNode_Nil(PinId* pinId)
{
return ax::NodeEditor::QueryNewNode(pinId);
}
CIMGUI_API bool ax_NodeEditor_QueryNewNode_Vec4(PinId* pinId,const ImVec4_c color,float thickness)
{
return ax::NodeEditor::QueryNewNode(pinId,ConvertToCPP_ImVec4(color),thickness);
}
CIMGUI_API bool ax_NodeEditor_AcceptNewItem_Nil()
{
return ax::NodeEditor::AcceptNewItem();
}
CIMGUI_API bool ax_NodeEditor_AcceptNewItem_Vec4(const ImVec4_c color,float thickness)
{
return ax::NodeEditor::AcceptNewItem(ConvertToCPP_ImVec4(color),thickness);
}
CIMGUI_API void ax_NodeEditor_RejectNewItem_Nil()
{
return ax::NodeEditor::RejectNewItem();
}
CIMGUI_API void ax_NodeEditor_RejectNewItem_Vec4(const ImVec4_c color,float thickness)
{
return ax::NodeEditor::RejectNewItem(ConvertToCPP_ImVec4(color),thickness);
}
CIMGUI_API void ax_NodeEditor_EndCreate()
{
return ax::NodeEditor::EndCreate();
}
CIMGUI_API bool ax_NodeEditor_BeginDelete()
{
return ax::NodeEditor::BeginDelete();
}
CIMGUI_API bool ax_NodeEditor_QueryDeletedLink(LinkId* linkId,PinId* startId,PinId* endId)
{
return ax::NodeEditor::QueryDeletedLink(linkId,startId,endId);
}
CIMGUI_API bool ax_NodeEditor_QueryDeletedNode(NodeId* nodeId)
{
return ax::NodeEditor::QueryDeletedNode(nodeId);
}
CIMGUI_API bool ax_NodeEditor_AcceptDeletedItem(bool deleteDependencies)
{
return ax::NodeEditor::AcceptDeletedItem(deleteDependencies);
}
CIMGUI_API void ax_NodeEditor_RejectDeletedItem()
{
return ax::NodeEditor::RejectDeletedItem();
}
CIMGUI_API void ax_NodeEditor_EndDelete()
{
return ax::NodeEditor::EndDelete();
}
CIMGUI_API void ax_NodeEditor_SetNodePosition(NodeId* nodeId,const ImVec2_c editorPosition)
{
return ax::NodeEditor::SetNodePosition(*nodeId,ConvertToCPP_ImVec2(editorPosition));
}
CIMGUI_API void ax_NodeEditor_SetGroupSize(NodeId* nodeId,const ImVec2_c size)
{
return ax::NodeEditor::SetGroupSize(*nodeId,ConvertToCPP_ImVec2(size));
}
CIMGUI_API ImVec2_c ax_NodeEditor_GetNodePosition(NodeId* nodeId)
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::GetNodePosition(*nodeId));
}
CIMGUI_API ImVec2_c ax_NodeEditor_GetNodeSize(NodeId* nodeId)
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::GetNodeSize(*nodeId));
}
CIMGUI_API void ax_NodeEditor_CenterNodeOnScreen(NodeId* nodeId)
{
return ax::NodeEditor::CenterNodeOnScreen(*nodeId);
}
CIMGUI_API void ax_NodeEditor_SetNodeZPosition(NodeId* nodeId,float z)
{
return ax::NodeEditor::SetNodeZPosition(*nodeId,z);
}
CIMGUI_API float ax_NodeEditor_GetNodeZPosition(NodeId* nodeId)
{
return ax::NodeEditor::GetNodeZPosition(*nodeId);
}
CIMGUI_API void ax_NodeEditor_RestoreNodeState(NodeId* nodeId)
{
return ax::NodeEditor::RestoreNodeState(*nodeId);
}
CIMGUI_API void ax_NodeEditor_Suspend()
{
return ax::NodeEditor::Suspend();
}
CIMGUI_API void ax_NodeEditor_Resume()
{
return ax::NodeEditor::Resume();
}
CIMGUI_API bool ax_NodeEditor_IsSuspended()
{
return ax::NodeEditor::IsSuspended();
}
CIMGUI_API bool ax_NodeEditor_IsActive()
{
return ax::NodeEditor::IsActive();
}
CIMGUI_API bool ax_NodeEditor_HasSelectionChanged()
{
return ax::NodeEditor::HasSelectionChanged();
}
CIMGUI_API int ax_NodeEditor_GetSelectedObjectCount()
{
return ax::NodeEditor::GetSelectedObjectCount();
}
CIMGUI_API int ax_NodeEditor_GetSelectedNodes(NodeId* nodes,int size)
{
return ax::NodeEditor::GetSelectedNodes(nodes,size);
}
CIMGUI_API int ax_NodeEditor_GetSelectedLinks(LinkId* links,int size)
{
return ax::NodeEditor::GetSelectedLinks(links,size);
}
CIMGUI_API bool ax_NodeEditor_IsNodeSelected(NodeId* nodeId)
{
return ax::NodeEditor::IsNodeSelected(*nodeId);
}
CIMGUI_API bool ax_NodeEditor_IsLinkSelected(LinkId* linkId)
{
return ax::NodeEditor::IsLinkSelected(*linkId);
}
CIMGUI_API void ax_NodeEditor_ClearSelection()
{
return ax::NodeEditor::ClearSelection();
}
CIMGUI_API void ax_NodeEditor_SelectNode(NodeId* nodeId,bool append)
{
return ax::NodeEditor::SelectNode(*nodeId,append);
}
CIMGUI_API void ax_NodeEditor_SelectLink(LinkId* linkId,bool append)
{
return ax::NodeEditor::SelectLink(*linkId,append);
}
CIMGUI_API void ax_NodeEditor_DeselectNode(NodeId* nodeId)
{
return ax::NodeEditor::DeselectNode(*nodeId);
}
CIMGUI_API void ax_NodeEditor_DeselectLink(LinkId* linkId)
{
return ax::NodeEditor::DeselectLink(*linkId);
}
CIMGUI_API bool ax_NodeEditor_DeleteNode(NodeId* nodeId)
{
return ax::NodeEditor::DeleteNode(*nodeId);
}
CIMGUI_API bool ax_NodeEditor_DeleteLink(LinkId* linkId)
{
return ax::NodeEditor::DeleteLink(*linkId);
}
CIMGUI_API bool ax_NodeEditor_HasAnyLinks_NodeId(NodeId* nodeId)
{
return ax::NodeEditor::HasAnyLinks(*nodeId);
}
CIMGUI_API bool ax_NodeEditor_HasAnyLinks_PinId(PinId* pinId)
{
return ax::NodeEditor::HasAnyLinks(*pinId);
}
CIMGUI_API int ax_NodeEditor_BreakLinks_NodeId(NodeId* nodeId)
{
return ax::NodeEditor::BreakLinks(*nodeId);
}
CIMGUI_API int ax_NodeEditor_BreakLinks_PinId(PinId* pinId)
{
return ax::NodeEditor::BreakLinks(*pinId);
}
CIMGUI_API void ax_NodeEditor_NavigateToContent(float duration)
{
return ax::NodeEditor::NavigateToContent(duration);
}
CIMGUI_API void ax_NodeEditor_NavigateToSelection(bool zoomIn,float duration)
{
return ax::NodeEditor::NavigateToSelection(zoomIn,duration);
}
CIMGUI_API bool ax_NodeEditor_ShowNodeContextMenu(NodeId* nodeId)
{
return ax::NodeEditor::ShowNodeContextMenu(nodeId);
}
CIMGUI_API bool ax_NodeEditor_ShowPinContextMenu(PinId* pinId)
{
return ax::NodeEditor::ShowPinContextMenu(pinId);
}
CIMGUI_API bool ax_NodeEditor_ShowLinkContextMenu(LinkId* linkId)
{
return ax::NodeEditor::ShowLinkContextMenu(linkId);
}
CIMGUI_API bool ax_NodeEditor_ShowBackgroundContextMenu()
{
return ax::NodeEditor::ShowBackgroundContextMenu();
}
CIMGUI_API void ax_NodeEditor_EnableShortcuts(bool enable)
{
return ax::NodeEditor::EnableShortcuts(enable);
}
CIMGUI_API bool ax_NodeEditor_AreShortcutsEnabled()
{
return ax::NodeEditor::AreShortcutsEnabled();
}
CIMGUI_API bool ax_NodeEditor_BeginShortcut()
{
return ax::NodeEditor::BeginShortcut();
}
CIMGUI_API bool ax_NodeEditor_AcceptCut()
{
return ax::NodeEditor::AcceptCut();
}
CIMGUI_API bool ax_NodeEditor_AcceptCopy()
{
return ax::NodeEditor::AcceptCopy();
}
CIMGUI_API bool ax_NodeEditor_AcceptPaste()
{
return ax::NodeEditor::AcceptPaste();
}
CIMGUI_API bool ax_NodeEditor_AcceptDuplicate()
{
return ax::NodeEditor::AcceptDuplicate();
}
CIMGUI_API bool ax_NodeEditor_AcceptCreateNode()
{
return ax::NodeEditor::AcceptCreateNode();
}
CIMGUI_API int ax_NodeEditor_GetActionContextSize()
{
return ax::NodeEditor::GetActionContextSize();
}
CIMGUI_API int ax_NodeEditor_GetActionContextNodes(NodeId* nodes,int size)
{
return ax::NodeEditor::GetActionContextNodes(nodes,size);
}
CIMGUI_API int ax_NodeEditor_GetActionContextLinks(LinkId* links,int size)
{
return ax::NodeEditor::GetActionContextLinks(links,size);
}
CIMGUI_API void ax_NodeEditor_EndShortcut()
{
return ax::NodeEditor::EndShortcut();
}
CIMGUI_API float ax_NodeEditor_GetCurrentZoom()
{
return ax::NodeEditor::GetCurrentZoom();
}
CIMGUI_API NodeId* ax_NodeEditor_GetHoveredNode()
{
static auto opq = ax::NodeEditor::GetHoveredNode();
return &opq;
}
CIMGUI_API PinId* ax_NodeEditor_GetHoveredPin()
{
static auto opq = ax::NodeEditor::GetHoveredPin();
return &opq;
}
CIMGUI_API LinkId* ax_NodeEditor_GetHoveredLink()
{
static auto opq = ax::NodeEditor::GetHoveredLink();
return &opq;
}
CIMGUI_API NodeId* ax_NodeEditor_GetDoubleClickedNode()
{
static auto opq = ax::NodeEditor::GetDoubleClickedNode();
return &opq;
}
CIMGUI_API PinId* ax_NodeEditor_GetDoubleClickedPin()
{
static auto opq = ax::NodeEditor::GetDoubleClickedPin();
return &opq;
}
CIMGUI_API LinkId* ax_NodeEditor_GetDoubleClickedLink()
{
static auto opq = ax::NodeEditor::GetDoubleClickedLink();
return &opq;
}
CIMGUI_API bool ax_NodeEditor_IsBackgroundClicked()
{
return ax::NodeEditor::IsBackgroundClicked();
}
CIMGUI_API bool ax_NodeEditor_IsBackgroundDoubleClicked()
{
return ax::NodeEditor::IsBackgroundDoubleClicked();
}
CIMGUI_API ImGuiMouseButton ax_NodeEditor_GetBackgroundClickButtonIndex()
{
return ax::NodeEditor::GetBackgroundClickButtonIndex();
}
CIMGUI_API ImGuiMouseButton ax_NodeEditor_GetBackgroundDoubleClickButtonIndex()
{
return ax::NodeEditor::GetBackgroundDoubleClickButtonIndex();
}
CIMGUI_API bool ax_NodeEditor_GetLinkPins(LinkId* linkId,PinId* startPinId,PinId* endPinId)
{
return ax::NodeEditor::GetLinkPins(*linkId,startPinId,endPinId);
}
CIMGUI_API bool ax_NodeEditor_PinHadAnyLinks(PinId* pinId)
{
return ax::NodeEditor::PinHadAnyLinks(*pinId);
}
CIMGUI_API ImVec2_c ax_NodeEditor_GetScreenSize()
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::GetScreenSize());
}
CIMGUI_API ImVec2_c ax_NodeEditor_ScreenToCanvas(const ImVec2_c pos)
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::ScreenToCanvas(ConvertToCPP_ImVec2(pos)));
}
CIMGUI_API ImVec2_c ax_NodeEditor_CanvasToScreen(const ImVec2_c pos)
{
return ConvertFromCPP_ImVec2(ax::NodeEditor::CanvasToScreen(ConvertToCPP_ImVec2(pos)));
}
CIMGUI_API int ax_NodeEditor_GetNodeCount()
{
return ax::NodeEditor::GetNodeCount();
}
CIMGUI_API int ax_NodeEditor_GetOrderedNodeIds(NodeId* nodes,int size)
{
return ax::NodeEditor::GetOrderedNodeIds(nodes,size);
}
CIMGUI_API NodeId* ax_NodeEditor_NodeId(uintptr_t val)
{
return IM_NEW(NodeId)(val);
}
CIMGUI_API void ax_NodeEditor_NodeId_destroy(NodeId* self)
{
return IM_DELETE(self);
}
CIMGUI_API PinId* ax_NodeEditor_PinId(uintptr_t val)
{
return IM_NEW(PinId)(val);
}
CIMGUI_API void ax_NodeEditor_PinId_destroy(PinId* self)
{
return IM_DELETE(self);
}
CIMGUI_API LinkId* ax_NodeEditor_LinkId(uintptr_t val)
{
return IM_NEW(LinkId)(val);
}
CIMGUI_API void ax_NodeEditor_LinkId_destroy(LinkId* self)
{
return IM_DELETE(self);
}
CIMGUI_API uintptr_t ax_NodeEditor_NodeId_value(NodeId* self)
{
return self->Get();
}
CIMGUI_API uintptr_t ax_NodeEditor_PinId_value(PinId* self)
{
return self->Get();
}
CIMGUI_API uintptr_t ax_NodeEditor_LinkId_value(LinkId* self)
{
return self->Get();
}