euporie.core.layout.controls

Miscellaneous control fields.

Classes

DummyControl()

A dummy control object that doesn't paint any content.

FocusableDummyControl()

A dummy control object that doesn't paint any content.

UIContent(get_line, StyleAndTextTuples] = >, ...)

Content generated by a user control.

UIControl()

Base class for all user interface controls.

class euporie.core.layout.controls.DummyControl

Bases: UIControl

A dummy control object that doesn’t paint any content.

create_content(width: int, height: int) UIContent

Return one blank line only.

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.

is_focusable() bool

Tell whether this user control is focusable.

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_eventMouseEvent instance.

move_cursor_down() None

Request to move the cursor down. This happens when scrolling down and the cursor is completely at the top.

move_cursor_up() None

Request to move the cursor up.

preferred_height(width: int, max_available_height: int, wrap_lines: bool, get_line_prefix: GetLinePrefixCallable | None) int | None
preferred_width(max_available_width: int) int | None
reset() None
class euporie.core.layout.controls.FocusableDummyControl

Bases: DummyControl

A dummy control object that doesn’t paint any content.

create_content(width: int, height: int) UIContent

Return one blank line only.

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.

is_focusable() bool

Make this control focusable.

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_eventMouseEvent instance.

move_cursor_down() None

Request to move the cursor down. This happens when scrolling down and the cursor is completely at the top.

move_cursor_up() None

Request to move the cursor up.

preferred_height(width: int, max_available_height: int, wrap_lines: bool, get_line_prefix: GetLinePrefixCallable | None) int | None
preferred_width(max_available_width: int) int | None
reset() None