Tatooine
node_builder.h
Go to the documentation of this file.
1#ifndef TATOOINE_FLOWEXPLORER_UI_NODE_BUILDER_H
2#define TATOOINE_FLOWEXPLORER_UI_NODE_BUILDER_H
3//==============================================================================
4#include <imgui-node-editor/imgui_node_editor.h>
5#include <tatooine/gl/imgui.h>
6//==============================================================================
8//==============================================================================
10 private:
11 enum class stage {
12 invalid,
13 begin,
14 header,
15 content,
16 input,
17 output,
18 middle,
19 end
20 };
21 //============================================================================
22 ax::NodeEditor::NodeId m_cur_node_id;
25 ImVec2 m_node_min;
26 ImVec2 m_node_max;
32
33 public:
35
36 auto begin(ax::NodeEditor::NodeId id) -> void;
37 auto end() -> void;
38
39 auto header(const ImVec4& color = ImVec4(1, 1, 1, 1)) -> void;
40 auto end_header() -> void;
41
42 auto input(ax::NodeEditor::PinId id) -> void;
43 auto end_input() -> void;
44
45 auto middle() -> void;
46
47 auto output(ax::NodeEditor::PinId id) -> void;
48 auto end_output() -> void;
49
50 private:
52
53 auto pin(ax::NodeEditor::PinId id, ax::NodeEditor::PinKind kind) -> void;
54 auto end_pin() -> void;
55};
56//==============================================================================
57} // namespace tatooine::flowexplorer::ui
58//==============================================================================
59#endif
Definition: draw_icon.h:6
Definition: node_builder.h:9
ImVec2 m_node_max
Definition: node_builder.h:26
auto output(ax::NodeEditor::PinId id) -> void
auto header(const ImVec4 &color=ImVec4(1, 1, 1, 1)) -> void
auto begin(ax::NodeEditor::NodeId id) -> void
ImU32 m_header_color
Definition: node_builder.h:24
ImVec2 m_content_max
Definition: node_builder.h:30
auto pin(ax::NodeEditor::PinId id, ax::NodeEditor::PinKind kind) -> void
ImVec2 m_content_min
Definition: node_builder.h:29
ax::NodeEditor::NodeId m_cur_node_id
Definition: node_builder.h:22
stage
Definition: node_builder.h:11
ImVec2 m_header_min
Definition: node_builder.h:27
auto input(ax::NodeEditor::PinId id) -> void
ImVec2 m_node_min
Definition: node_builder.h:25
ImVec2 m_header_max
Definition: node_builder.h:28
bool m_has_header
Definition: node_builder.h:31
stage m_cur_stage
Definition: node_builder.h:23