# {py:mod}`simvx.editor.command_palette` ```{py:module} simvx.editor.command_palette ``` ```{autodoc2-docstring} simvx.editor.command_palette :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`EditorCommand ` - ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommand :summary: ``` * - {py:obj}`CommandRegistry ` - ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry :summary: ``` * - {py:obj}`EditorCommandPalette ` - ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`fuzzy_score ` - ```{autodoc2-docstring} simvx.editor.command_palette.fuzzy_score :summary: ``` * - {py:obj}`register_editor_commands ` - ```{autodoc2-docstring} simvx.editor.command_palette.register_editor_commands :summary: ``` ```` ### API ````{py:function} fuzzy_score(query: str, target: str) -> int :canonical: simvx.editor.command_palette.fuzzy_score ```{autodoc2-docstring} simvx.editor.command_palette.fuzzy_score ``` ```` `````{py:class} EditorCommand :canonical: simvx.editor.command_palette.EditorCommand ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommand ``` ````{py:attribute} name :canonical: simvx.editor.command_palette.EditorCommand.name :type: str :value: > None ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommand.name ``` ```` ````{py:attribute} callback :canonical: simvx.editor.command_palette.EditorCommand.callback :type: collections.abc.Callable :value: > None ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommand.callback ``` ```` ````{py:attribute} shortcut :canonical: simvx.editor.command_palette.EditorCommand.shortcut :type: str :value: ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommand.shortcut ``` ```` ````{py:attribute} category :canonical: simvx.editor.command_palette.EditorCommand.category :type: str :value: ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommand.category ``` ```` ````` `````{py:class} CommandRegistry() :canonical: simvx.editor.command_palette.CommandRegistry ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry.__init__ ``` ````{py:method} register(name: str, callback: collections.abc.Callable, shortcut: str = '', category: str = '') -> None :canonical: simvx.editor.command_palette.CommandRegistry.register ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry.register ``` ```` ````{py:method} get_commands() -> list[simvx.editor.command_palette.EditorCommand] :canonical: simvx.editor.command_palette.CommandRegistry.get_commands ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry.get_commands ``` ```` ````{py:method} execute(name: str) -> bool :canonical: simvx.editor.command_palette.CommandRegistry.execute ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry.execute ``` ```` ````{py:method} search(query: str) -> list[simvx.editor.command_palette.EditorCommand] :canonical: simvx.editor.command_palette.CommandRegistry.search ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry.search ``` ```` ````{py:method} __len__() -> int :canonical: simvx.editor.command_palette.CommandRegistry.__len__ ```{autodoc2-docstring} simvx.editor.command_palette.CommandRegistry.__len__ ``` ```` ````` `````{py:class} EditorCommandPalette(state: simvx.editor.state.EditorState | None = None, **kwargs) :canonical: simvx.editor.command_palette.EditorCommandPalette Bases: {py:obj}`simvx.core.ui.core.Control` ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.__init__ ``` ````{py:method} register_command(name: str, callback: collections.abc.Callable, shortcut: str = '', category: str = '') -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.register_command ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.register_command ``` ```` ````{py:method} show() :canonical: simvx.editor.command_palette.EditorCommandPalette.show ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.show ``` ```` ````{py:method} hide() :canonical: simvx.editor.command_palette.EditorCommandPalette.hide ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.hide ``` ```` ````{py:method} toggle() :canonical: simvx.editor.command_palette.EditorCommandPalette.toggle ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.toggle ``` ```` ````{py:method} is_popup_point_inside(point) -> bool :canonical: simvx.editor.command_palette.EditorCommandPalette.is_popup_point_inside ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.is_popup_point_inside ``` ```` ````{py:method} popup_input(event) :canonical: simvx.editor.command_palette.EditorCommandPalette.popup_input ```{autodoc2-docstring} simvx.editor.command_palette.EditorCommandPalette.popup_input ``` ```` ````{py:method} dismiss_popup() :canonical: simvx.editor.command_palette.EditorCommandPalette.dismiss_popup ```` ````{py:method} process(dt: float) :canonical: simvx.editor.command_palette.EditorCommandPalette.process ```` ````{py:method} draw(renderer) :canonical: simvx.editor.command_palette.EditorCommandPalette.draw ```` ````{py:method} draw_popup(renderer) :canonical: simvx.editor.command_palette.EditorCommandPalette.draw_popup ```` ````{py:attribute} size_x :canonical: simvx.editor.command_palette.EditorCommandPalette.size_x :value: > 'Property(...)' ```` ````{py:attribute} size_y :canonical: simvx.editor.command_palette.EditorCommandPalette.size_y :value: > 'Property(...)' ```` ````{py:property} size :canonical: simvx.editor.command_palette.EditorCommandPalette.size :type: simvx.core.math.types.Vec2 ```` ````{py:attribute} touch_mode :canonical: simvx.editor.command_palette.EditorCommandPalette.touch_mode :type: str :value: > 'mouse' ```` ````{py:property} theme :canonical: simvx.editor.command_palette.EditorCommandPalette.theme :type: simvx.core.ui.types.Theme | None ```` ````{py:property} mouse_over :canonical: simvx.editor.command_palette.EditorCommandPalette.mouse_over :type: bool ```` ````{py:property} focused :canonical: simvx.editor.command_palette.EditorCommandPalette.focused :type: bool ```` ````{py:property} disabled :canonical: simvx.editor.command_palette.EditorCommandPalette.disabled :type: bool ```` ````{py:method} get_theme() -> simvx.core.ui.types.Theme :canonical: simvx.editor.command_palette.EditorCommandPalette.get_theme ```` ````{py:method} queue_redraw() :canonical: simvx.editor.command_palette.EditorCommandPalette.queue_redraw ```` ````{py:method} get_minimum_size() -> simvx.core.math.types.Vec2 :canonical: simvx.editor.command_palette.EditorCommandPalette.get_minimum_size ```` ````{py:method} get_rect() -> tuple[float, float, float, float] :canonical: simvx.editor.command_palette.EditorCommandPalette.get_rect ```` ````{py:method} get_global_rect() -> tuple[float, float, float, float] :canonical: simvx.editor.command_palette.EditorCommandPalette.get_global_rect ```` ````{py:method} is_point_inside(point) -> bool :canonical: simvx.editor.command_palette.EditorCommandPalette.is_point_inside ```` ````{py:method} set_anchor_preset(preset: simvx.core.ui.enums.AnchorPreset) :canonical: simvx.editor.command_palette.EditorCommandPalette.set_anchor_preset ```` ````{py:method} set_focus() :canonical: simvx.editor.command_palette.EditorCommandPalette.set_focus ```` ````{py:method} grab_focus() :canonical: simvx.editor.command_palette.EditorCommandPalette.grab_focus ```` ````{py:method} release_focus() :canonical: simvx.editor.command_palette.EditorCommandPalette.release_focus ```` ````{py:method} has_focus() -> bool :canonical: simvx.editor.command_palette.EditorCommandPalette.has_focus ```` ````{py:method} focus_next_control() :canonical: simvx.editor.command_palette.EditorCommandPalette.focus_next_control ```` ````{py:method} focus_previous_control() :canonical: simvx.editor.command_palette.EditorCommandPalette.focus_previous_control ```` ````{py:method} grab_mouse() :canonical: simvx.editor.command_palette.EditorCommandPalette.grab_mouse ```` ````{py:method} release_mouse() :canonical: simvx.editor.command_palette.EditorCommandPalette.release_mouse ```` ````{py:method} set_drag_preview(control: simvx.core.ui.core.Control) :canonical: simvx.editor.command_palette.EditorCommandPalette.set_drag_preview ```` ````{py:attribute} z_index :canonical: simvx.editor.command_palette.EditorCommandPalette.z_index :value: > 'Property(...)' ```` ````{py:attribute} z_as_relative :canonical: simvx.editor.command_palette.EditorCommandPalette.z_as_relative :value: > 'Property(...)' ```` ````{py:attribute} render_layer :canonical: simvx.editor.command_palette.EditorCommandPalette.render_layer :value: > 'Property(...)' ```` ````{py:method} set_render_layer(index: int, enabled: bool = True) -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.set_render_layer ```` ````{py:method} is_on_render_layer(index: int) -> bool :canonical: simvx.editor.command_palette.EditorCommandPalette.is_on_render_layer ```` ````{py:property} absolute_z_index :canonical: simvx.editor.command_palette.EditorCommandPalette.absolute_z_index :type: int ```` ````{py:property} position :canonical: simvx.editor.command_palette.EditorCommandPalette.position :type: simvx.core.math.types.Vec2 ```` ````{py:property} rotation :canonical: simvx.editor.command_palette.EditorCommandPalette.rotation :type: float ```` ````{py:property} rotation_degrees :canonical: simvx.editor.command_palette.EditorCommandPalette.rotation_degrees :type: float ```` ````{py:property} scale :canonical: simvx.editor.command_palette.EditorCommandPalette.scale :type: simvx.core.math.types.Vec2 ```` ````{py:property} world_position :canonical: simvx.editor.command_palette.EditorCommandPalette.world_position :type: simvx.core.math.types.Vec2 ```` ````{py:property} world_rotation :canonical: simvx.editor.command_palette.EditorCommandPalette.world_rotation :type: float ```` ````{py:property} world_scale :canonical: simvx.editor.command_palette.EditorCommandPalette.world_scale :type: simvx.core.math.types.Vec2 ```` ````{py:property} forward :canonical: simvx.editor.command_palette.EditorCommandPalette.forward :type: simvx.core.math.types.Vec2 ```` ````{py:property} right :canonical: simvx.editor.command_palette.EditorCommandPalette.right :type: simvx.core.math.types.Vec2 ```` ````{py:method} translate(offset: tuple[float, float] | numpy.ndarray) :canonical: simvx.editor.command_palette.EditorCommandPalette.translate ```` ````{py:method} rotate(radians: float) :canonical: simvx.editor.command_palette.EditorCommandPalette.rotate ```` ````{py:method} rotate_deg(degrees: float) :canonical: simvx.editor.command_palette.EditorCommandPalette.rotate_deg ```` ````{py:method} look_at(target: tuple[float, float] | numpy.ndarray) :canonical: simvx.editor.command_palette.EditorCommandPalette.look_at ```` ````{py:method} transform_points(points: list[simvx.core.math.types.Vec2]) -> list[simvx.core.math.types.Vec2] :canonical: simvx.editor.command_palette.EditorCommandPalette.transform_points ```` ````{py:method} draw_polygon(renderer, points: list[simvx.core.math.types.Vec2], closed=True, colour=None) :canonical: simvx.editor.command_palette.EditorCommandPalette.draw_polygon ```` ````{py:method} wrap_screen(margin: float = 20) :canonical: simvx.editor.command_palette.EditorCommandPalette.wrap_screen ```` ````{py:attribute} strict_errors :canonical: simvx.editor.command_palette.EditorCommandPalette.strict_errors :type: typing.ClassVar[bool] :value: > True ```` ````{py:attribute} script_error_raised :canonical: simvx.editor.command_palette.EditorCommandPalette.script_error_raised :value: > 'Signal(...)' ```` ````{py:method} __init_subclass__(**kwargs) :canonical: simvx.editor.command_palette.EditorCommandPalette.__init_subclass__ :classmethod: ```` ````{py:property} name :canonical: simvx.editor.command_palette.EditorCommandPalette.name :type: str ```` ````{py:property} process_mode :canonical: simvx.editor.command_palette.EditorCommandPalette.process_mode :type: simvx.core.descriptors.ProcessMode ```` ````{py:method} reset_error() -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.reset_error ```` ````{py:method} add_child(node: simvx.core.node.Node) -> simvx.core.node.Node :canonical: simvx.editor.command_palette.EditorCommandPalette.add_child ```` ````{py:method} remove_child(node: simvx.core.node.Node) :canonical: simvx.editor.command_palette.EditorCommandPalette.remove_child ```` ````{py:method} reparent(new_parent: simvx.core.node.Node) :canonical: simvx.editor.command_palette.EditorCommandPalette.reparent ```` ````{py:method} get_node(path: str) -> simvx.core.node.Node :canonical: simvx.editor.command_palette.EditorCommandPalette.get_node ```` ````{py:method} find_child(name: str, recursive: bool = False) -> simvx.core.node.Node | None :canonical: simvx.editor.command_palette.EditorCommandPalette.find_child ```` ````{py:method} find(node_type: type, recursive: bool = True) -> simvx.core.node.Node | None :canonical: simvx.editor.command_palette.EditorCommandPalette.find ```` ````{py:method} find_all(node_type: type, recursive: bool = True) -> list :canonical: simvx.editor.command_palette.EditorCommandPalette.find_all ```` ````{py:property} path :canonical: simvx.editor.command_palette.EditorCommandPalette.path :type: str ```` ````{py:method} add_to_group(group: str) :canonical: simvx.editor.command_palette.EditorCommandPalette.add_to_group ```` ````{py:method} remove_from_group(group: str) :canonical: simvx.editor.command_palette.EditorCommandPalette.remove_from_group ```` ````{py:method} is_in_group(group: str) -> bool :canonical: simvx.editor.command_palette.EditorCommandPalette.is_in_group ```` ````{py:method} ready() -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.ready ```` ````{py:method} enter_tree() -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.enter_tree ```` ````{py:method} exit_tree() -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.exit_tree ```` ````{py:method} physics_process(dt: float) -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.physics_process ```` ````{py:method} input_event(event: simvx.core.events.InputEvent) -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.input_event ```` ````{py:method} input(event: simvx.core.events.TreeInputEvent) -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.input ```` ````{py:method} unhandled_input(event: simvx.core.events.TreeInputEvent) -> None :canonical: simvx.editor.command_palette.EditorCommandPalette.unhandled_input ```` ````{py:method} start_coroutine(gen: simvx.core.descriptors.Coroutine) -> simvx.core.descriptors.CoroutineHandle :canonical: simvx.editor.command_palette.EditorCommandPalette.start_coroutine ```` ````{py:method} stop_coroutine(gen_or_handle) :canonical: simvx.editor.command_palette.EditorCommandPalette.stop_coroutine ```` ````{py:method} clear_children() :canonical: simvx.editor.command_palette.EditorCommandPalette.clear_children ```` ````{py:method} destroy() :canonical: simvx.editor.command_palette.EditorCommandPalette.destroy ```` ````{py:property} app :canonical: simvx.editor.command_palette.EditorCommandPalette.app ```` ````{py:property} tree :canonical: simvx.editor.command_palette.EditorCommandPalette.tree :type: simvx.core.scene_tree.SceneTree ```` ````{py:method} get_tree() -> simvx.core.scene_tree.SceneTree :canonical: simvx.editor.command_palette.EditorCommandPalette.get_tree ```` ````{py:method} __getitem__(key: str) :canonical: simvx.editor.command_palette.EditorCommandPalette.__getitem__ ```` ````{py:method} get_properties() -> dict[str, simvx.core.descriptors.Property] :canonical: simvx.editor.command_palette.EditorCommandPalette.get_properties :classmethod: ```` ````{py:method} __repr__() :canonical: simvx.editor.command_palette.EditorCommandPalette.__repr__ ```` ````` ````{py:function} register_editor_commands(palette: simvx.editor.command_palette.EditorCommandPalette, state: simvx.editor.state.EditorState) -> None :canonical: simvx.editor.command_palette.register_editor_commands ```{autodoc2-docstring} simvx.editor.command_palette.register_editor_commands ``` ````