euporie.core.widgets.palette
Contain the command palette container.
Functions
|
Typed version of namedtuple. |
|
Add a command to the centralized command system. |
|
Focus the next visible Window. |
|
Focus the previous visible Window. |
|
Get the current active (running) Application. |
|
Update the key-binding registry. |
Classes
|
Wrap a function so it can be used as a key-binding or a menu item. |
|
A filterable and navigable list of commands. |
|
A command palette which allows searching the available commands. |
|
Turn any callable into a Filter. |
|
A modal dialog which is displayed above the application. |
|
Apply a style to child containers when focused or hovered. |
|
Several layouts, one stacked above/under the other. |
|
A container which renders a stand-alone margin. |
|
Mouse event, sent to UIControl.mouse_handler. |
|
|
|
|
|
Scroll offsets for the |
|
Margin displaying a scrollbar. |
|
A container which allows attaching a status function. |
|
A text input widget. |
|
Content generated by a user control. |
Base class for all user interface controls. |
|
|
Several layouts, one stacked left/right of the other. |
|
Container that holds a control. |
partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords. |
- class euporie.core.widgets.palette.CommandMenuControl(command_palette: CommandPalette, width: int = 60)
Bases:
UIControl
A filterable and navigable list of commands.
- get_invalidate_events() Iterable[Event[object]]
Return a list of Event objects. This can be a generator. (The application collects all these events, in order to bind redraw handlers to these events.)
- get_key_bindings() KeyBindingsBase | None
The key bindings that are specific for this user control.
Return a
KeyBindings
object if some key bindings are specified, or None otherwise.
- mouse_handler(mouse_event: MouseEvent) NotImplementedOrNone
Handle clicking and scrolling mouse events.
- move_cursor_down() None
Request to move the cursor down. This happens when scrolling down and the cursor is completely at the top.
- preferred_height(width: int, max_available_height: int, wrap_lines: bool, get_line_prefix: GetLinePrefixCallable | None) int | None
Return the preferred height of the command list.
- class euporie.core.widgets.palette.CommandPalette(app: BaseApp)
Bases:
Dialog
A command palette which allows searching the available commands.
- body: AnyContainer
- body_padding_bottom = 0
- body_padding_top = 0
- property button_widgets: list[AnyContainer]
A list of button widgets to show in the dialog’s row of buttons.
- hide(event: KeyPressEvent | None = None) None
Hide the dialog.
- select(n: int, event: KeyPressEvent | None = None) None
Change the index of the selected command.
- Parameters:
n – The relative amount by which to change the selected index
event – Ignored