simvx.editor.script_tabs¶
ScriptTabEditor — Multi-tab script editor for the viewport code area.
Manages multiple open script files/embedded scripts in a TabContainer, following the same patterns as the IDE’s EditorPanel but tailored for the editor’s viewport code area.
Module Contents¶
Classes¶
Manages a TabContainer with one CodeTextEdit per open script. |
Data¶
API¶
- simvx.editor.script_tabs.log¶
‘getLogger(…)’
- class simvx.editor.script_tabs.ScriptTabEditor(tab_container: simvx.core.ui.tabs.TabContainer, project_path_fn=None)¶
Manages a TabContainer with one CodeTextEdit per open script.
Supports file-backed scripts, inline scripts, and embedded scripts.
Initialization
- open_script(node: simvx.core.Node)¶
Open a node’s script in a tab, or switch to it if already open.
- save_current()¶
Save the active tab’s script.
- save_all()¶
Save all modified scripts.
- close_tab(index: int)¶
Close a tab by index.
- get_current_editor() simvx.core.CodeTextEdit | None¶
Return the active tab’s CodeTextEdit, if any.
- has_open_tabs() bool¶
- update_dirty_indicators()¶
Update tab names with * for modified scripts.