euporie.web.widgets.webview
Defines a web-view control.
Functions
|
Add a command to the centralized command system. |
|
Cast a value to a type. |
|
Return the character width of this text fragment list. |
|
Get the current active (running) Application. |
|
Attempt to guess the format of a path. |
|
Create or return the conversion IO loop. |
|
Assign key-bindings to commands based on a dictionary. |
|
Parse and resolve a path. |
|
Pate formatted text on top of other formatted text. |
|
Update the key-binding registry. |
|
Take a single list of (style_str, text) tuples and yield one such list for each line. |
Classes
|
Turn any callable into a Filter. |
|
Class for storing and converting display data. |
|
Simple event to which event handlers can be attached. For instance::. |
|
Fast, lightweight cache which keeps at most size items. |
|
Class which loads and positions graphics references in a |
|
A HTML formatted text renderer. |
|
|
|
Mouse event, sent to UIControl.mouse_handler. |
|
|
|
Represent an node in the DOM. |
|
|
|
A class that represents a thread of control. |
|
Content generated by a user control. |
Base class for all user interface controls. |
|
|
|
|
Web view displays. |
|
Container that holds a control. |
- class euporie.web.widgets.webview.WebViewControl(url: str | Path = 'about:blank', link_handler: Callable | None = None)
Bases:
UIControl
Web view displays.
A control which displays rendered HTML content.
- create_content(width: int, height: int) UIContent
Generate the content for this user control.
- Returns:
A
UIContent
instance.
- get_content(url: Path, loading: bool, resizing: bool, width: int, height: int, cursor_position: Point, assets_loaded: bool) UIContent
Create a cacheable UIContent.
- get_invalidate_events() Iterable[Event[object]]
Return a list of Event objects, which can be a generator.
the application collects all these events, in order to bind redraw handlers to these events.
- get_key_bindings() KeyBindingsBase | None
Return key bindings that are specific for this user control.
- Returns:
- A
KeyBindings
object if some key bindings are specified, or None otherwise.
- A
- 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.
- Returns:
NotImplemented if the UI does not need to be updates, None if it does
Navigate backwards through the browser history.
Navigate forwards through the browser history.
- preferred_height(width: int, max_available_height: int, wrap_lines: bool, get_line_prefix: GetLinePrefixCallable | None) int | None
Calculate and return the preferred height of the control.