euporie.notebook.widgets.side_bar
Define a side-bar.
Functions
|
Get the current active (running) Application. |
|
Convert the given value (which can be formatted text) into a list of text fragments. |
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. |
|
Container class that dynamically returns any Container. |
|
Simple event to which event handlers can be attached. For instance::. |
|
Apply a style to child containers when focused or hovered. |
|
Several layouts, one stacked above/under the other. |
A container for a set of key bindings. |
|
|
Draw a horizontal or vertical line. |
|
|
|
|
|
A side-bar for the notebook application. |
|
Vertical toggle-buttons with additional styling for the side-bar. |
|
A draggable vertical bar to resize the sidebar. |
|
A toggleable button widget. |
|
A widget where an option is selected using mutually exclusive toggle-buttons. |
|
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. |
|
|
|
Create a new function with partial application of the given arguments and keywords. |
- class euporie.notebook.widgets.side_bar.SideBar(titles: Sequence[str], icons: Sequence[str], panels: Sequence[AnyContainer], width: int = 25, index: int | None = -1, on_resize: Callable[[SideBar], None] | None = None, on_change: Callable[[SideBar], None] | None = None)
Bases:
objectA side-bar for the notebook application.
- class euporie.notebook.widgets.side_bar.SideBarButtons(options: list[Any], labels: Sequence[AnyFormattedText] | None = None, index: int | None = None, indices: list[int] | None = None, n_values: int | None = None, multiple: FilterOrBool = False, max_count: int | None = None, on_change: Callable[[SelectableWidget], None] | None = None, style: str | Callable[[], str] = 'class:input', border: GridStyle | None = ▁▁ 🮇 │▎ 🮇─┼▎ ▔▔ , disabled: FilterOrBool = False, vertical: FilterOrBool = False)
Bases:
ToggleButtonsVertical toggle-buttons with additional styling for the side-bar.
- key_bindings() KeyBindingsBase
Return key-bindings for the drop-down widget.
- load_container() AnyContainer
Load the widget’s container.
- mouse_handler(i: int, mouse_event: MouseEvent) NotImplementedOrNone
Handle mouse events.
- update_buttons(widget: SelectableWidget | None = None) None
Set the toggle buttons’ selection state when the selected index changes.
- class euporie.notebook.widgets.side_bar.SidebarResizeHandleControl(sidebar: SideBar)
Bases:
UIControlA draggable vertical bar to resize the sidebar.
- create_content(width: int, height: int | None) UIContent
Create the content for the resize handle.
- Parameters:
width – The width of the control.
height – The height of the control.
- Returns:
The UI content to display.
- 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
KeyBindingsobject if some key bindings are specified, or None otherwise.
- mouse_handler(mouse_event: MouseEvent) NotImplementedOrNone
Handle mouse events for resizing the sidebar.
- Parameters:
mouse_event – The mouse event to handle.
- Returns:
None if the event was handled, NotImplemented otherwise.
- move_cursor_down() None
Request to move the cursor down. This happens when scrolling down and the cursor is completely at the top.