16#include "../third_party/imgui/imgui.h"
24class GraphExecutionTracer;
25class ExecutionTestPanel;
55 bool Load(
const std::string& path)
override;
56 bool Save(
const std::string& path)
override;
66 bool CreateNew(
const std::string& name =
"Untitled BehaviorTree");
Property editor panel for BehaviorTree nodes.
ComponentTypeID GetComponentTypeID_Static()
Abstract interface shared by all graph-renderer adapters.
UI panel for editing BehaviorTree node properties.
Adapts the BTNodeGraphManager + NodeGraphPanel to IGraphRenderer.
void SetCanvasStateJSON(const std::string &json) override
Restore canvas state from JSON string.
struct Olympe::BehaviorTreeRenderer::CanvasState m_savedCanvasState
std::string m_filePath
Path that was loaded.
void RenderLayoutWithTabs()
std::string GetGraphType() const override
Returns the graph type string, e.g.
bool CreateNew(const std::string &name="Untitled BehaviorTree")
Create a new empty BehaviorTree graph and set it active.
float m_canvasPanelWidth
Split ratio: 75% canvas, 25% right panel.
std::unique_ptr< GraphExecutionTracer > m_lastTracer
Last simulation trace for results display.
int m_graphId
ID in BTNodeGraphManager; -1 if not loaded.
std::unique_ptr< AI::BTNodePalette > m_palette
BTNodePalette for drag-drop.
int m_rightPanelTabSelection
0 = Palette, 1 = Properties
void Render() override
Renders the graph canvas into the current ImGui child window.
void AcceptNodeDrop(const std::string &nodeType, float screenX, float screenY)
Handle drop of node type at screen position.
void OnRunGraphClicked()
Run graph simulation via BehaviorTreeGraphAdapter + GraphExecutionSimulator Converts BT to graph form...
void RestoreCanvasState() override
Restore previously saved canvas viewport state Called when tab is reactivated.
NodeGraphPanel & m_panel
Shared panel reference (not owned)
BTNodePropertyPanel m_propertyPanel
Property editor for node properties.
void SaveCanvasState() override
Save the current canvas viewport state (pan, zoom, etc.) Called when tab is deactivated.
std::string GetCurrentPath() const override
Returns the last path successfully loaded/saved, or empty string.
std::string GetCanvasStateJSON() const override
Get canvas state as JSON string for persistence.
bool Save(const std::string &path) override
Saves the current graph state to disk.
bool IsDirty() const override
Returns true when the graph has unsaved changes.
std::unique_ptr< ExecutionTestPanel > m_executionTestPanel
REUSED: Simulation results panel.
ImVec2 m_canvasScreenPos
Screen position of canvas for drag-drop coordinate transformation.
void HandleKeyboardShortcuts()
Handle keyboard shortcuts for copy/paste/duplicate operations Ctrl+C: Copy selected node Ctrl+V: Past...
bool Load(const std::string &path) override
Loads a graph from a file on disk.
void RenderRightPanelTabs()
Polymorphic interface for all graph editor renderers.
NodeGraphPanel - ImGui/ImNodes panel for node graph editing Provides visual editor for behavior trees...
< Provides AssetID and INVALID_ASSET_ID