euporie.core.comm.ipympl
This module contains ipympl Comm implementations.
Classes
|
Add padding around a container. |
|
A clickable button widget which holds text. |
|
Hold a container and methods to update its attributes. |
|
Turn any callable into a Filter. |
|
Wrapper around any other container that can change the visibility. |
|
Class for storing and converting display data. |
|
Rich output displays. |
|
Apply a style to child containers when focused or hovered. |
|
Several layouts, one stacked above/under the other. |
|
A Comm object which represents ipython widgets. |
|
A label widget which displays rich text. |
|
A ipywidget which displays an image. |
|
|
|
|
|
|
|
Store the relative position or the mouse within a terminal cell. |
|
A toggleable button widget. |
|
A toolbar with a list of buttons. |
|
Several layouts, one stacked left/right of the other. |
|
Create a new function with partial application of the given arguments and keywords. |
- class euporie.core.comm.ipympl.MPLCanvasModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
IpyWidgetCommA ipywidget which displays an image.
- mouse_handler(mouse_event: PtkMouseEvent) NotImplementedOrNone
Process a mouse event, and forward it to the kernel.
- Parameters:
mouse_event – The prompt-toolkit mouse event to process.
- process_data(data: dict, buffers: Sequence[memoryview | bytearray | bytes]) None
Process data received from the kernel.
- Parameters:
data – The data dictionary from the comm message.
buffers – The binary buffers from the comm message.
- set_data(display: Display, value: bytes) None
Set the image data for a display from bytes.
- Parameters:
display – The display to update.
value – The new image data.
- set_size(display: Display, value: list[float]) None
Set the size of the canvas display.
- Parameters:
display – The display to resize.
value – The new [width, height] of the canvas.
- set_url(display: Display, data_uri: str) None
Set the image data for a display from a data URI.
- Parameters:
display – The display to update.
data_uri – The data URI of the new image.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipympl.ToolbarModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[memoryview | bytearray | bytes])
Bases:
IpyWidgetCommA toolbar with a list of buttons.
- process_data(data: dict, buffers: Sequence[memoryview | bytearray | bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'