diff --git a/src/gui/NodeEditor.cpp b/src/gui/GraphEditor.cpp similarity index 95% rename from src/gui/NodeEditor.cpp rename to src/gui/GraphEditor.cpp index 055f68b..8183253 100644 --- a/src/gui/NodeEditor.cpp +++ b/src/gui/GraphEditor.cpp @@ -1,10 +1,10 @@ #include "gui.hpp" #include -#include "NodeEditor.hpp" +#include "GraphEditor.hpp" namespace GraphC::gui { -void NodeEditor::drawNode(const GraphModel::Node& node){ +void GraphEditor::drawNode(const GraphModel::Node& node){ ImNodes::BeginNode(node.id); ImNodes::BeginNodeTitleBar(); ImGui::TextUnformatted(node.title.c_str()); @@ -81,7 +81,7 @@ void NodeEditor::drawNode(const GraphModel::Node& node){ } -GraphModel::Node* NodeEditor::CreateExampleNode(std::string title){ +GraphModel::Node* GraphEditor::CreateExampleNode(std::string title){ GraphModel::Node* n = graph.createNode(GraphModel::Node(graph.id_gen.getNext(), title)); graph.createAttribute(GraphModel::Attribute(graph.id_gen.getNext(), n, GraphModel::Attribute::Type::Input, "In")); graph.createAttribute(GraphModel::Attribute(graph.id_gen.getNext(), n, GraphModel::Attribute::Type::Output, "Out")); @@ -89,7 +89,7 @@ GraphModel::Node* NodeEditor::CreateExampleNode(std::string title){ return n; } -NodeEditor::NodeEditor(std::string _title) +GraphEditor::GraphEditor(std::string _title) : title(_title) { // CreateExampleNode("Node A"); @@ -102,15 +102,15 @@ NodeEditor::NodeEditor(std::string _title) std::cout<show(); } diff --git a/src/gui/gui.hpp b/src/gui/gui.hpp index 1b380b2..37968d6 100644 --- a/src/gui/gui.hpp +++ b/src/gui/gui.hpp @@ -6,7 +6,7 @@ #include "../../dependencies/SDL2/include/SDL_opengl.h" #include "../../dependencies/imgui/imgui.h" #include "../format.hpp" -#include "NodeEditor.hpp" +#include "GraphEditor.hpp" #include "imgui_extensions.hpp" #include "fonts.hpp" #include "exceptions.hpp" @@ -36,7 +36,7 @@ private: bool show_metrics_window = false; SDL_Window* sdl_window; SDL_GLContext gl_context; - NodeEditor* node_editor = nullptr; + GraphEditor* node_editor = nullptr; public: void init(const char* window_title);