simvx.core.ui.code_editor_panel

Unified multi-tab code editor panel with optional IDE feature integration.

Module Contents

Classes

CodeEditorPanel

Multi-tab code editor with optional IDE feature integration.

Data

log

API

simvx.core.ui.code_editor_panel.log

‘getLogger(…)’

class simvx.core.ui.code_editor_panel.CodeEditorPanel(**kwargs)

Bases: simvx.core.ui.core.Control

Multi-tab code editor with optional IDE feature integration.

Works standalone as a basic code editor. IDE features (diagnostics, breakpoints, LSP, autocomplete) are injected via callbacks and signals – no IDEState dependency.

Initialization

open_file(path: str)

Open a file in a new tab, or switch to its existing tab.

save_current()

Save the active tab’s file to disk.

save_file(path: str)

Save a specific file to disk.

save_all()

Save all modified files.

close_current()

Close the active tab.

close_file(path: str)

Close a specific file’s tab.

new_file()

Create a new empty untitled tab.

goto_line(line: int, col: int = 0)

Navigate to a line (and optionally column) in the active editor.

get_current_editor() simvx.core.ui.code_edit.CodeTextEdit | None

Return the active tab’s CodeTextEdit, or None.

get_current_path() str | None

Return the active tab’s file path, or None.

get_open_files() dict[str, dict]

Return the open files dict.

get_tab_paths() list[str]

Return ordered list of open file paths matching tab indices.

is_file_modified(path: str) bool

Check if a file has unsaved modifications.

get_file_text(path: str) str

Get the current text content of an open file.

get_modified_files() list[str]

Return list of paths with unsaved modifications.

rename_file(old_path: str, new_path: str)

Update internal tracking when a file is saved to a new path.

reload_file(path: str)

Reload a file’s content from disk.

set_all_editors_property(attr: str, value)

Set a property on all open CodeTextEdit widgets.

set_lsp_client(client)

Inject an LSP client for change notifications.

refresh_diagnostics(path: str)

Reapply diagnostic markers for a file (call after diagnostics change).

refresh_breakpoints(path: str)

Reapply breakpoint markers for a file.

show_completions(items: list, prefix: str | None = None)

Display autocomplete popup with completion results.

undo()
redo()
cut()
copy()
paste()
select_all()
toggle_comment()
delete_line()
select_next_occurrence()
show_find()
show_replace()
process(dt: float)
draw(renderer)
size_x

‘Property(…)’

size_y

‘Property(…)’

property size: simvx.core.math.types.Vec2
get_theme() simvx.core.ui.core.Theme
get_rect() tuple[float, float, float, float]
get_global_rect() tuple[float, float, float, float]
is_point_inside(point) bool
set_anchor_preset(preset: simvx.core.ui.core.AnchorPreset)
set_focus()
grab_focus()
release_focus()
has_focus() bool
focus_next_control()
focus_previous_control()
grab_mouse()
release_mouse()
set_drag_preview(control: simvx.core.ui.core.Control)
draw_popup(renderer)
is_popup_point_inside(point) bool
popup_input(event)
dismiss_popup()
z_index

‘Property(…)’

z_as_relative

‘Property(…)’

property absolute_z_index: int
property position: simvx.core.math.types.Vec2
property rotation: float
property rotation_degrees: float
property scale: simvx.core.math.types.Vec2
property global_position: simvx.core.math.types.Vec2
property global_rotation: float
property global_scale: simvx.core.math.types.Vec2
property forward: simvx.core.math.types.Vec2
property right: simvx.core.math.types.Vec2
translate(offset: tuple[float, float] | numpy.ndarray)
rotate(radians: float)
rotate_deg(degrees: float)
look_at(target: tuple[float, float] | numpy.ndarray)
transform_points(points: list[simvx.core.math.types.Vec2]) list[simvx.core.math.types.Vec2]
draw_polygon(renderer, points: list[simvx.core.math.types.Vec2], closed=True, color=None)
wrap_screen(margin: float = 20)
script_error_raised

‘Signal(…)’

classmethod __init_subclass__(**kwargs)
property name: str
property process_mode: simvx.core.descriptors.ProcessMode
reset_error() None
add_child(node: simvx.core.node.Node) simvx.core.node.Node
remove_child(node: simvx.core.node.Node)
reparent(new_parent: simvx.core.node.Node)
get_node(path: str) simvx.core.node.Node
find_child(name: str, recursive: bool = False) simvx.core.node.Node | None
find(node_type: type) simvx.core.node.Node | None
find_all(node_type: type, recursive: bool = True) list
property path: str
add_to_group(group: str)
remove_from_group(group: str)
is_in_group(group: str) bool
ready() None
enter_tree() None
exit_tree() None
physics_process(dt: float) None
input_event(event: simvx.core.events.InputEvent) None
input(event: simvx.core.events.TreeInputEvent) None
unhandled_input(event: simvx.core.events.TreeInputEvent) None
start_coroutine(gen: simvx.core.descriptors.Coroutine) simvx.core.descriptors.CoroutineHandle
stop_coroutine(gen_or_handle)
destroy()
queue_free

None

property tree: simvx.core.scene_tree.SceneTree
get_tree() simvx.core.scene_tree.SceneTree
__getitem__(key: str)
classmethod get_properties() dict[str, simvx.core.descriptors.Property]
get_settings

None

__repr__()