![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Polymorphic interface for all graph editor renderers. More...
#include <IGraphRenderer.h>
Inheritance diagram for Olympe::IGraphRenderer:Public Member Functions | |
| virtual | ~IGraphRenderer () |
| virtual void | Render ()=0 |
| Renders the graph canvas into the current ImGui child window. | |
| virtual bool | Load (const std::string &path)=0 |
| Loads a graph from a file on disk. | |
| virtual bool | Save (const std::string &path)=0 |
| Saves the current graph state to disk. | |
| virtual bool | IsDirty () const =0 |
| Returns true when the graph has unsaved changes. | |
| virtual std::string | GetGraphType () const =0 |
| Returns the graph type string, e.g. | |
| virtual std::string | GetCurrentPath () const =0 |
| Returns the last path successfully loaded/saved, or empty string. | |
| virtual void | SaveCanvasState () |
| Save the current canvas viewport state (pan, zoom, etc.) Called when tab is deactivated. | |
| virtual void | RestoreCanvasState () |
| Restore previously saved canvas viewport state Called when tab is reactivated. | |
| virtual std::string | GetCanvasStateJSON () const |
| Get canvas state as JSON string for persistence. | |
| virtual void | SetCanvasStateJSON (const std::string &json) |
| Restore canvas state from JSON string. | |
Polymorphic interface for all graph editor renderers.
Implementations are owned by TabManager via raw pointers (C++14 style). Lifetime: the owning EditorTab deletes the renderer when the tab is closed.
Definition at line 27 of file IGraphRenderer.h.
|
inlinevirtual |
Definition at line 30 of file IGraphRenderer.h.
|
inlinevirtual |
Get canvas state as JSON string for persistence.
Reimplemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Definition at line 96 of file IGraphRenderer.h.
|
pure virtual |
Returns the last path successfully loaded/saved, or empty string.
Implemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
|
pure virtual |
Returns the graph type string, e.g.
"VisualScript", "BehaviorTree".
Implemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Returns true when the graph has unsaved changes.
Implemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Loads a graph from a file on disk.
| path | Absolute or relative path to the .ats / .json file. |
Implemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Renders the graph canvas into the current ImGui child window.
Implemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Restore previously saved canvas viewport state Called when tab is reactivated.
Ensures smooth tab switching without losing layout.
Reimplemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Definition at line 90 of file IGraphRenderer.h.
Saves the current graph state to disk.
| path | Destination path. If empty, save to the path passed to Load(). |
Implemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Save the current canvas viewport state (pan, zoom, etc.) Called when tab is deactivated.
Used to preserve viewport when switching between multiple tabs.
Reimplemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Definition at line 83 of file IGraphRenderer.h.
Restore canvas state from JSON string.
| json | JSON representation of saved canvas state |
Reimplemented in Olympe::BehaviorTreeRenderer, Olympe::EntityPrefabRenderer, and Olympe::VisualScriptRenderer.
Definition at line 105 of file IGraphRenderer.h.
References GetComponentTypeID_Static().
Here is the call graph for this function: