111 bool CloseTab(
const std::string& tabID);
ComponentTypeID GetComponentTypeID_Static()
Abstract interface shared by all graph-renderer adapters.
Polymorphic interface for all graph editor renderers.
Singleton that owns and manages all open graph editor tabs.
int m_nextTabNum
Counter for "Untitled-N" names.
bool SaveActiveTabAs(const std::string &path)
Saves the active tab to a specific path.
bool HasDirtyTabs() const
Returns true when at least one tab has unsaved changes.
int ShowUnsavedDialog(const EditorTab &tab)
Shows a 3-button "Save / Don't Save / Cancel" modal dialog.
static TabManager & Get()
Returns the global singleton instance.
EditorTab * GetActiveTab()
EditorTab * GetTab(const std::string &tabID)
std::string m_saveAsTabID
std::string GetActiveTabID() const
std::string CreateNewTab(const std::string &graphType)
Creates a new empty tab of the given graph type.
std::string NextTabID()
Generates the next unique tabID.
bool CloseAllTabs()
Attempts to close all tabs.
bool SaveActiveTab()
Saves the active tab.
bool IsEmpty() const
Returns true when there are no open tabs.
bool ShowSaveAsDialog(EditorTab *tab)
Shows the "Save As" input dialog for a tab without a path.
bool CloseTab(const std::string &tabID)
Closes the given tab.
const std::vector< EditorTab > & GetAllTabs() const
static std::string DisplayNameFromPath(const std::string &filePath)
Derives a display name from a file path (filename without dir).
int m_nextTabIDNum
Counter for unique tab IDs.
static std::string DetectGraphType(const std::string &filePath)
Detects the graph type by inspecting the JSON contents.
void RenderTabBar()
Renders the horizontal tab bar (call before RenderActiveCanvas).
std::vector< EditorTab > m_tabs
TabManager & operator=(const TabManager &)
std::string m_pendingSelectTabID
TabManager(const TabManager &)
void RenderActiveCanvas()
Renders the graph canvas of the active tab.
void DestroyTab(size_t index)
Deletes a renderer and removes its tab entry.
std::string m_pendingCloseTabID
void SetActiveTab(const std::string &tabID)
std::string OpenFileInTab(const std::string &filePath)
Opens a file in a new tab.
std::string m_activeTabID
< Provides AssetID and INVALID_ASSET_ID
Represents a single open graph in the editor.
bool isDirty
True when there are unsaved changes.
std::string graphType
"VisualScript", "BehaviorTree", etc.
IGraphRenderer * renderer
Owned pointer — deleted when tab is closed.
std::string filePath
Full path, empty for unsaved graphs.
std::string displayName
Label shown in the tab bar.
std::string tabID
Unique identifier (stringified int counter)
bool isActive
True when this is the currently selected tab.