2#include "json/json.hpp"
3#include "imgui-node-editor/imgui_node_editor.h"
8#include <unordered_map>
13#define MAKE_IMGUI_ID(x) ("##" + std::to_string(x)).c_str()
14#define MAKE_IMGUI_LABEL(x, y) (y + std::string("##") + std::to_string(x)).c_str()
16namespace ImGuiNodeEditor = ax::NodeEditor;
52 NodeInputParam(
float *pos,
float *texCoord,
float *minPos,
float *maxPos);
57void SeUIDSeed(
int seed);
65 std::function<void(
void)> updateFunc;
66 std::function<void(
void)> makeNodeFunc;
76 ImGuiNodeEditor::LinkId _id;
79 ImVec4 color = ImVec4(1, 1, 1, 1);
80 float thickness = 1.0f;
92 ImGuiNodeEditor::PinId _id;
96 NodeEditorPinType type;
98 ImU32 color = ImColor(94, 95, 191);
99 uint32_t userData = 0;
103 virtual void Begin();
113 NodeEditorPin(NodeEditorPinType type = NodeEditorPinType::Input,
int id = GenerateUID());
123 ImGuiNodeEditor::NodeId _id;
124 std::vector<NodeEditorPin *> outputPins;
125 std::vector<NodeEditorPin *> inputPins;
128 ImU32 headerColor = ImColor(59, 29, 209);
132 virtual std::vector<NodeEditorPin *> GetPins();
134 virtual void OnDelete();
140 virtual void OnRender() = 0;
144 void DrawHeader(std::string text);
154 ImGuiNodeEditor::EditorContext *context;
155 std::string name =
"Node Editor";
157 std::unordered_map<uintptr_t, NodeEditorLink *> links;
158 std::unordered_map<uintptr_t, NodeEditorNode *> nodes;
159 std::unordered_map<uintptr_t, NodeEditorPin *> pins;
176 ImGuiNodeEditor::NodeId lastNodeId;
a class to store JSON values
basic_json<> json
default JSON class