euporie.core.bars.menu
Contains a completion menu for toolbars.
Functions
|
Apply a style to formatted text. |
|
Return the ceiling of x as an Integral. |
|
Get the current active (running) Application. |
|
Return width of a string. |
|
Fill space at the end of lines. |
|
Truncate all lines at a given length. |
Classes
|
Turn any callable into a Filter. |
|
Wrapper around any other container that can change the visibility. |
|
Specified dimension (width/height) of a user control or window. |
|
Several layouts, one stacked above/under the other. |
|
|
Control that shows the meta information of the selected completion. |
|
|
A completion menu for toolbars. |
A completion menu widget for toolbars. |
|
|
Content generated by a user control. |
Base class for all user interface controls. |
|
|
Container that holds a control. |
- class euporie.core.bars.menu.SelectedCompletionMetaControl
Bases:
UIControl
Control that shows the meta information of the selected completion.
- 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 mouse events.
When NotImplemented is returned, it means that the given event is not handled by the UIControl itself. The Window or key bindings can decide to handle this event as scrolling or changing focus.
- Parameters:
mouse_event – MouseEvent instance.
- move_cursor_down() → None
Request to move the cursor down. This happens when scrolling down and the cursor is completely at the top.
- class euporie.core.bars.menu.ToolbarCompletionMenuControl(min_item_width: int = 5, max_item_width: int = 30)
Bases:
UIControl
A completion menu for toolbars.
- 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
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 mouse events.
When NotImplemented is returned, it means that the given event is not handled by the UIControl itself. The Window or key bindings can decide to handle this event as scrolling or changing focus.
- Parameters:
mouse_event – MouseEvent instance.
- move_cursor_down() → None
Request to move the cursor down.
This happens when scrolling down and the cursor is completely at the top.
- class euporie.core.bars.menu.ToolbarCompletionsMenu
Bases:
ConditionalContainer
A completion menu widget for toolbars.
- get_key_bindings() → KeyBindingsBase | None
Returns a
KeyBindings
object. These bindings become active when any user control in this container has the focus, except if any containers between this container and the focused user control is modal.
- is_modal() → bool
When this container is modal, key bindings from parent containers are not taken into account if a user control in this container is focused.
- preferred_height(width: int, max_available_height: int) → Dimension
Return a
Dimension
that represents the desired height for this container.
- preferred_width(max_available_width: int) → Dimension
Return a
Dimension
that represents the desired width for this container.
- reset() → None
Reset the state of this container and all the children. (E.g. reset scroll offsets, etc…)
- write_to_screen(screen: Screen, mouse_handlers: MouseHandlers, write_position: WritePosition, parent_style: str, erase_bg: bool, z_index: int | None) → None
Write the actual content to the screen.
- Parameters:
screen –
Screen
mouse_handlers –
MouseHandlers
.parent_style – Style string to pass to the
Window
object. This will be applied to all content of the windows.VSplit
andHSplit
can use it to pass their style down to the windows that they contain.z_index – Used for propagating z_index from parent to child.