Skip to content

Anywidget widgets

Notebook widgets (Jupyter, marimo) for building your own layout around a CellierController. Each one reads and writes the controller's models through its event bus. The convenience API's controls= models build these for you; the same widgets for Qt are on the Qt page.

A widget for one appearance field (a toggle, a spin box, a colour) lists only what it adds; what they all share (widget, close, subscription_specs, visual_ids, field, control) is documented once, on AnywidgetAppearanceField under Building blocks.

Dims

The canvas itself comes from build_canvas_widget, which pairs it with this panel.

cellier.gui.anywidget.AnywidgetDimsPanel

Bases: AnyWidget

Renders per-axis slice sliders and an optional 2D/3D toggle button.

CellierController.connect_widget wires it the same way as the Qt QtDimsControl. The toggle button is included automatically when constructed with axes_2d/axes_3d (see from_scene), e.g. omitted for a scene with fewer than 3 axes.

Construct via from_scene, then wire with:

dims = AnywidgetDimsPanel.from_scene(scene, axis_values)
controller.connect_widget(dims, subscription_specs=dims.subscription_specs())

axis_values class-attribute instance-attribute

axis_values = traitlets.Dict().tag(sync=True)

Axis index (str) to that axis's serialised AxisValues.

discrete_index class-attribute instance-attribute

discrete_index = traitlets.Dict().tag(sync=True)

Axis index (str) to the slider position of each discrete axis.

Derived here from slice_indices whenever it changes, so the rule for which listed value a between-values position shows lives in Python (nearest_value_index) rather than being copied into dims_panel.js.

slider_axes class-attribute instance-attribute

slider_axes = traitlets.List(allow_none=True, default_value=None).tag(sync=True)

World axes that get a slider when not displayed; None means all.

Read from scene.slider_axes and kept current by SliderAxesChangedEvent.

thickness class-attribute instance-attribute

thickness = traitlets.Dict().tag(sync=True)

Axis index (str) to that axis's half-thickness, in world units.

One entry per axis that has a thickness box; 0 is a plane. The scene's thickness is the only thickness in the slicing path.

thickness_axes class-attribute instance-attribute

thickness_axes = traitlets.List().tag(sync=True)

World axes whose slider row gets a "±" half-thickness box.

throttle_ms class-attribute instance-attribute

throttle_ms = traitlets.Int(DIMS_SLIDER_THROTTLE_MS).tag(sync=True)

How often a slider drag reaches the bus, in ms.

Synced rather than hard-coded in the front end, so this panel and the Qt QtDimsControl coalesce drags at the same rate by default.

from_scene classmethod

from_scene(scene: Scene, axis_values: Mapping[int, AxisValues]) -> AnywidgetDimsPanel

Build a dims panel from a live scene.

Includes the 2D/3D toggle when the scene declares both render modes and has an axis to add to a 2D view. It starts from the scene's displayed axes; the mode not shown yet gets a default. From 2D, the 3D set adds the last remaining "space" axis in world order (any remaining axis when no space axis is left); from 3D, the 2D set is the last two displayed axes in world order. The default is replaced once the scene has shown that mode. A scene that renders only one way -- each panel of an OrthoViewer -- gets no toggle, because there is nothing to switch to.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

Image

cellier.gui.anywidget.visuals.AnywidgetImageControls

Bases: VisualIdGroup, AnyWidget

Bidirectional image appearance control for the anywidget GUI.

One control per image visual (or per group of OrthoViewer panel siblings). From the top:

  • a shared section: visibility, blending and interpolation;
  • a "Composite channels" switch, shown only when the visual has a channel axis;
  • one page per mode: the single appearance's rows, or, when compositing, one group of rows per channel.

Each page shows the rows its values ask for (colormap, contrast, opacity, render mode, ...). A row that only means something for some render modes, or only in 3D, hides itself; n_displayed_dimensions and scene_ids keep the 3D rule current. A MaskedImage adds its surface and 2D band rows to the single page.

Build the starting state with cellier.gui.image_control_values, then wire to the controller after construction:

values = image_control_values(visual, fields=["color_map", "clim"])
control = AnywidgetImageControls(visual.id, values, scene_ids=[scene.id])
controller.connect_widget(
    control, subscription_specs=control.subscription_specs()
)

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual, or an OrthoViewer's panel siblings, driven together.

required
values dict[str, Any]

The control's starting state: a dict of the visual's current appearance values, page by page ("shared", "single" and "channels"), the "fields" to show, and the widgets' ranges and choices. Its layout is internal. The convenience viewers build it when an ImageControl is in a visual's controls= list; code that builds this widget directly gets it from cellier.gui.image_control_values and passes it through unchanged.

required
title str | None

The heading. Defaults to DEFAULT_TITLE.

None
n_displayed_dimensions int

How many dimensions the driven visuals' scenes display now, 2 or 3. Seeds the rows that are shown only in 3D. Default 3, which shows them.

3
scene_ids Sequence[UUID]

The scenes to follow: after construction the control takes n_displayed_dimensions from their DimsChangedEvent. The visuals are assumed to share one display dimensionality; if they do not, the last change wins.

()

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

channels class-attribute instance-attribute

channels = traitlets.Dict({}).tag(sync=True)

Channel index (str) to that channel's values.

decimals class-attribute instance-attribute

decimals = traitlets.Int(2).tag(sync=True)

Decimal places for the contrast limits and the iso threshold.

threshold_modes class-attribute instance-attribute

threshold_modes = traitlets.List(list(THRESHOLD_MODES)).tag(sync=True)

Render modes that show the threshold row (in 3D).

attenuation_modes class-attribute instance-attribute

attenuation_modes = traitlets.List(list(ATTENUATION_MODES)).tag(sync=True)

Render modes that show the attenuation row (in 3D).

projection class-attribute instance-attribute

projection = traitlets.Dict({}).tag(sync=True)

How many dimensions the scene displays (2 or 3). Python to JS only.

masked class-attribute instance-attribute

masked = traitlets.Bool(False).tag(sync=True)

Whether the control drives a MaskedImage (its own row rule).

labels class-attribute instance-attribute

labels = traitlets.Dict({}).tag(sync=True)

Row label overrides, field to label (a MaskedImage's units).

threshold_range class-attribute instance-attribute

threshold_range = traitlets.List([]).tag(sync=True)

Threshold slider bounds; empty uses clim_range.

thickness_range class-attribute instance-attribute

thickness_range = traitlets.List([0.0, 10.0]).tag(sync=True)

A MaskedImage's thickness slider bounds, world units.

min_width_range class-attribute instance-attribute

min_width_range = traitlets.List(list(MIN_WIDTH_RANGE)).tag(sync=True)

A MaskedImage's minimum band width bounds and step, pixels.

int_ranges class-attribute instance-attribute

int_ranges = traitlets.Dict({}).tag(sync=True)

A MaskedImage's integer rows' bounds, field to [min, max].

choices class-attribute instance-attribute

choices = traitlets.Dict({}).tag(sync=True)

A MaskedImage's choice rows' options, field to list.

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list

One subscription per inbound event type per driven visual.

Plus one DimsChangedEvent subscription per followed scene.

Any visual

cellier.gui.anywidget.visuals.AnywidgetVisibleToggle

Bases: AnywidgetToggle

Show or hide the visual.

Mirrors QtVisibleToggle. visible exists on every appearance model, so this control applies to every visual type.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual_model.appearance.visible. Defaults to True, matching the model default.

None

cellier.gui.anywidget.visuals.AnywidgetOpacitySlider

Bases: AnywidgetBoundedSlider

Master opacity multiplier.

Applies to every visual type -- opacity is on BaseAppearance. It is also the only appearance field carrying ge/le, which is why it is the only bounded slider: the range is read off the model rather than picked.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.opacity.

None

cellier.gui.anywidget.visuals.AnywidgetUniformColorPicker

Bases: AnywidgetColorPicker

Uniform RGBA colour.

One class for mesh, points and lines: they spell the field color alike, so the control is shared rather than triplicated. Only used when the visual's color_mode is "uniform"; per-vertex colours come from the data store.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.color.

None

cellier.gui.anywidget.visuals.AnywidgetAABBWidget

Bases: VisualIdGroup, AnyWidget

Bidirectional AABB parameter controls wired to the event bus.

Mirrors QtAABBWidget: an enabled checkbox, a line_width number input, and a color swatch, sharing one UUID so a single subscription covers all three fields.

Wire to the controller after construction:

aabb = AnywidgetAABBWidget(visual_id, initial_enabled=True, ...)
controller.connect_widget(aabb, subscription_specs=aabb.subscription_specs())

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual whose aabb params this widget controls. A sequence drives every listed visual in lock-step -- the OrthoViewer's four panel siblings.

required
initial_enabled bool

Starting value for the enabled checkbox. Default False.

False
initial_line_width float

Starting value for the line_width input. Default 2.0.

2.0
initial_color str

Starting CSS color string for the color swatch. Default "#ffffff".

'#ffffff'

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = 'Bounding box'

Name shown when no title= is given.

The same title the built-in viewers pass when they build this widget.

title class-attribute instance-attribute

title = traitlets.Unicode(DEFAULT_TITLE).tag(sync=True)

What this control calls itself, drawn by its own front end.

A control names itself rather than being named by whatever lays it out, which is what lets the dock stack controls and stop.

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return the inbound subscription this widget requires.

Planes

The data these are built from comes from the toolkit-neutral helpers.

cellier.gui.anywidget.visuals.AnywidgetClippingPlanesControls

Bases: VisualIdGroup, AnyWidget

A visual's clipping planes: one row per plane, and an add button.

Each row has an enabled checkbox, a flip button, a remove button, the normal and a position slider along the normal. The normal has one column per data axis: two buttons named after the axis as the store's coordinate system gives it (+z and -z) that face the plane along the axis, and under them the normal's entry on it. Values are in the visual's data coordinates. Given gizmo_target, a row also has a "Gizmo" toggle that puts a gizmo on its plane in the 3D canvas; one plane of a canvas has it at a time.

The front end reports an action by setting edit to {"action", "index", "value", "serial"}; the Python side applies it and syncs rows back. A refused edit comes back as error with rows unchanged. rows and error are written by the Python side only; a value a host writes into them is put back. An update is sent only when the planes differ from the ones held, so a host that delivers one edit twice sends one.

Wire to the controller after construction:

data = get_clipping_planes_data_from_visual(visual, store)
controls = AnywidgetClippingPlanesControls(visual.id, **data)
controller.connect_widget(
    controls, subscription_specs=controls.subscription_specs()
)

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual, or a group of them (an OrthoViewer's panel siblings), edited together.

required
coordinate_system UUID | str

The level-0 data coordinate system of the store they read (its id).

required
axis_names Sequence[str]

The data axis names, in order.

required
bounds Sequence[Sequence[float]]

(low, high) of the data on each axis.

required
planes Sequence[Mapping[str, Any]]

One row per plane of visual.clipping_planes, in order: a dict with "id" (the plane's id as a string), "enabled", "normal" (a list of floats), "position" (the plane's offset divided by the normal's length) and "outline" (its outline settings).

()
data_store_id UUID | str | None

The store the visuals read.

None
bounds_source Callable[[], Sequence[Sequence[float]]] | None

Reads the store's current (low, high) per axis. Given with data_store_id, the position ranges follow the store's extent; without it they stay at bounds.

None
gizmo_target ClippingPlaneGizmoTarget | None

Where a plane's gizmo is drawn (a ClippingPlaneGizmoTarget), the plane that has it now, and why a plane cannot have one: get_clipping_plane_gizmo_data(controller, visual_id, canvas_id). The target's visual must be one of visual_id. Without gizmo_target the rows have no gizmo toggle.

None
gizmo_plane ClippingPlaneGizmoTarget | None

Where a plane's gizmo is drawn (a ClippingPlaneGizmoTarget), the plane that has it now, and why a plane cannot have one: get_clipping_plane_gizmo_data(controller, visual_id, canvas_id). The target's visual must be one of visual_id. Without gizmo_target the rows have no gizmo toggle.

None
gizmo_blocked ClippingPlaneGizmoTarget | None

Where a plane's gizmo is drawn (a ClippingPlaneGizmoTarget), the plane that has it now, and why a plane cannot have one: get_clipping_plane_gizmo_data(controller, visual_id, canvas_id). The target's visual must be one of visual_id. Without gizmo_target the rows have no gizmo toggle.

None

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = CLIPPING_PLANES_TITLE

Name shown when no title= is given.

widget property

An AnyWidget is itself the embeddable element.

editor property

editor: ClippingPlanesEditor

The toolkit-neutral half (for tests and scripting).

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One ClippingPlanesChangedEvent per visual.

cellier.gui.anywidget.visuals.AnywidgetRenderPlanesControls

Bases: VisualIdGroup, AnyWidget

A visual's render planes: one row per plane, and an add button.

The planes a visual in the "plane" render mode draws its data on. Each row is a "Clipping planes" row with the extents added: an enabled checkbox, a flip button, a remove button, the normal (two buttons and an entry per axis of the plane), a position slider along the normal, and for each of the plane's two in-plane axes a minimum and a maximum, each with an "unbounded" box. Values are in world units. Given gizmo_target, a row also has a "Gizmo" toggle that puts the canvas's gizmo on its plane; one plane of a canvas has it at a time, clipping planes included.

An edit is sent as RenderPlanesUpdateEvent with the whole new tuple, and only when the planes differ from the ones held. An edit the model refuses is shown as an error and the rows keep their previous values.

Wire to the controller after construction:

data = get_render_planes_data_from_visual(controller, visual.id)
controls = AnywidgetRenderPlanesControls(visual.id, **data)
controller.connect_widget(
    controls, subscription_specs=controls.subscription_specs()
)

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual, or a group of them, edited together.

required
coordinate_system UUID | str

The scene's world coordinate system (its id).

required
axis_ids Sequence[str]

The world axes, in order: their ids and names.

required
axis_names Sequence[str]

The world axes, in order: their ids and names.

required
planes Sequence[Any]

The visual's current render_planes.

()
displayed_axes Sequence[str] | None

What the scene and the visual's data are now, and a reader of it: get_render_planes_data_from_visual(controller, visual_id).

None
bounds Sequence[str] | None

What the scene and the visual's data are now, and a reader of it: get_render_planes_data_from_visual(controller, visual_id).

None
state_source Sequence[str] | None

What the scene and the visual's data are now, and a reader of it: get_render_planes_data_from_visual(controller, visual_id).

None
scene_id Sequence[str] | None

What the scene and the visual's data are now, and a reader of it: get_render_planes_data_from_visual(controller, visual_id).

None
data_store_id Sequence[str] | None

What the scene and the visual's data are now, and a reader of it: get_render_planes_data_from_visual(controller, visual_id).

None
gizmo_target RenderPlaneGizmoTarget | None

Where a plane's gizmo is drawn (a RenderPlaneGizmoTarget), the plane that has it now, and why a plane cannot have one: get_render_plane_gizmo_data(controller, visual_id, canvas_id). Without gizmo_target the rows have no gizmo toggle.

None
gizmo_plane RenderPlaneGizmoTarget | None

Where a plane's gizmo is drawn (a RenderPlaneGizmoTarget), the plane that has it now, and why a plane cannot have one: get_render_plane_gizmo_data(controller, visual_id, canvas_id). Without gizmo_target the rows have no gizmo toggle.

None
gizmo_blocked RenderPlaneGizmoTarget | None

Where a plane's gizmo is drawn (a RenderPlaneGizmoTarget), the plane that has it now, and why a plane cannot have one: get_render_plane_gizmo_data(controller, visual_id, canvas_id). Without gizmo_target the rows have no gizmo toggle.

None

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = RENDER_PLANES_TITLE

Name shown when no title= is given.

widget property

An AnyWidget is itself the embeddable element.

editor property

editor: RenderPlanesEditor

The toolkit-neutral half (for tests and scripting).

refresh

refresh() -> None

Read the scene's state again (whether the control is disabled).

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

What the control follows on the bus (see the editor).

Level of detail and loading

cellier.gui.anywidget.visuals.AnywidgetLevelOfDetailControls

Bases: VisualIdGroup, AnyWidget

Settled bias slider and "coarsest while moving" checkbox.

Mirrors QtLevelOfDetailControls. The front end shows one checkbox, bound to coarsest_while_moving_3d while n_displayed_dimensions is 3 and to coarsest_while_moving_2d otherwise. The bias is sent on a settled change of the slider, not while it is dragged, because a bias change reslices.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual the control drives, or a sequence driven in lock-step.

required
values Mapping[str, Any] | None

The appearance's current values, keyed by field name: settled_lod_bias (float), coarsest_while_moving_3d and coarsest_while_moving_2d (bool), and has_moving_3d: False for an appearance without the 3D setting, which hides that checkbox in 3D. Missing keys take the model's defaults.

None
n_displayed_dimensions int

What the view displays now, 2 or 3.

3
scene_ids Sequence[UUID]

Scenes whose DimsChangedEvent the control follows.

()

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

widget property

An AnyWidget is itself the embeddable element.

moving_field property

moving_field: str

The appearance field the checkbox edits now.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One appearance subscription per visual, one dims one per scene.

cellier.gui.anywidget.visuals.AnywidgetLoadingIndicator

Bases: VisualIdGroup, AnyWidget

How far a multiscale visual's data has loaded.

Mirrors QtLoadingIndicator: a bar of target chunks resident over needed, and a status line, under a heading titled title. Read-only: it listens to ResliceProgressEvent and emits nothing.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual, or a group of them, shown summed.

required
initial Mapping[UUID, LoadingProgress | None] | None

Their progress now, so an indicator built mid-load starts right.

None
levels bool

The visuals are meshes: the status line names levels ("Loading coarse level"), not chunk counts.

False

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = LOADING_TITLE

Name shown when no title= is given.

widget property

An AnyWidget is itself the embeddable element.

state property

state: IndicatorState

What the indicator shows now.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One ResliceProgressEvent subscription per visual.

cellier.gui.anywidget.visuals.AnywidgetLoadingConfigControls

Bases: VisualIdGroup, AnyWidget

Every ProgressiveLoadingConfig field of a multiscale visual.

Mirrors QtLoadingConfigControls. The front end draws one row per entry of fields from the values in config, and reports an edit by setting edit; a refused edit comes back as error, with config unchanged.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual, or a group of them, edited together.

required
loading Mapping[str, Any]

The current config, as ProgressiveLoadingConfig.model_dump().

required
n_levels int | None

The visual's level count, the most "Backstop level" offers.

None

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = LOADING_CONFIG_TITLE

Name shown when no title= is given.

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One LoadingConfigChangedEvent subscription per visual.

cellier.gui.anywidget.visuals.AnywidgetLodConfigControls

Bases: VisualIdGroup, AnyWidget

The level-of-detail settings of a multiscale mesh.

The notebook counterpart of cellier.gui.qt.visuals.QtLodConfigControls: one row per GeometryLodConfig field. An edit the model refuses is shown as an error and the row keeps its previous value.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The visual, or a group of them, edited together.

required
lod Mapping[str, Any]

The current config, as GeometryLodConfig.model_dump().

required

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = LOD_CONFIG_TITLE

Name shown when no title= is given.

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One LodConfigChangedEvent subscription per visual.

Labels

cellier.gui.anywidget.visuals.AnywidgetLabelsRenderModeCombo

Bases: AnywidgetChoice

How label voxels are rendered in 3D.

Offers the five labels render modes: iso_categorical, flat_categorical, smooth_iso, smooth_geometry and plane. The in-memory and multiscale labels models both accept all five. Distinct from the image render-mode control, whose modes differ.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.render_mode.

None

cellier.gui.anywidget.visuals.AnywidgetBackgroundLabelSpin

Bases: AnywidgetIntSpin

Label id rendered as transparent.

The range spans the label dtype: stores are int32 and nothing forbids a negative id.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.background_label.

None

cellier.gui.anywidget.visuals.AnywidgetSaltSpin

Bases: AnywidgetIntSpin

Hash seed for the random label colormap.

The number itself is meaningless -- only the colouring it produces matters -- so this control carries a shuffle button that writes a random seed in range.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.salt.

None

cellier.gui.anywidget.visuals.AnywidgetSmoothGeometryLevelSlider

Bases: AnywidgetBoundedSlider

Where the smooth_geometry surface sits.

The share of the blended weight a label must carry. Lower grows every label, higher shrinks it; 0.5 puts flat sides on the voxel faces. No effect in the other render modes.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.smooth_geometry_level.

None

Points

cellier.gui.anywidget.visuals.AnywidgetSizeSpin

Bases: AnywidgetFloatSpin

Uniform point size, in size_space units.

The default range is in screen pixels. With size_space="world" the useful range depends on the data extent, and value_range= is the escape hatch.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.size.

None

cellier.gui.anywidget.visuals.AnywidgetSizeSpaceCombo

Bases: AnywidgetChoice

Coordinate space point size is interpreted in.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.size_space.

None

Lines

cellier.gui.anywidget.visuals.AnywidgetThicknessSpin

Bases: AnywidgetFloatSpin

Line thickness, in thickness_space units.

Screen pixels by default; see *SizeSpin for the world case.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.thickness.

None

cellier.gui.anywidget.visuals.AnywidgetThicknessSpaceCombo

Bases: AnywidgetChoice

Coordinate space line thickness is interpreted in.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.thickness_space.

None

Meshes

cellier.gui.anywidget.visuals.AnywidgetMeshSectionControls

Bases: VisualIdGroup, AnyWidget

How a mesh is drawn in a 2D view: every MeshSectionConfig field.

The notebook counterpart of cellier.gui.qt.visuals.QtMeshSectionControls: one row per field. An edit the model refuses is shown as an error and the row keeps its previous value. The control hides itself while none of the scenes in displayed_dimensions displays two dimensions.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The mesh visual, or a group of them, edited together.

required
section Mapping[str, Any]

The current config, as MeshSectionConfig.model_dump().

required
displayed_dimensions Mapping[UUID, int] | None

Scene id to how many dimensions it displays now (2 or 3, from len(scene.dims.selection.displayed_axes) of each scene the visuals are in). The control follows these scenes' DimsChangedEvent. Empty (the default) keeps it always shown.

None

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = MESH_SECTION_TITLE

Name shown when no title= is given.

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One MeshSectionChangedEvent per visual, one dims per scene.

cellier.gui.anywidget.visuals.AnywidgetFlatShadingToggle

Bases: AnywidgetToggle

Use face normals instead of smooth vertex normals. Phong meshes.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.flat_shading.

None

cellier.gui.anywidget.visuals.AnywidgetShininessSpin

Bases: AnywidgetFloatSpin

Phong specular exponent. Phong meshes.

128 is the conventional practical ceiling.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.shininess.

None

cellier.gui.anywidget.visuals.AnywidgetSideCombo

Bases: AnywidgetChoice

Which face windings are drawn.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.side.

None

cellier.gui.anywidget.visuals.AnywidgetWireframeToggle

Bases: AnywidgetToggle

Draw the mesh as edges only. Flat meshes.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.wireframe.

None

cellier.gui.anywidget.visuals.AnywidgetWireframeThicknessSpin

Bases: AnywidgetFloatSpin

Edge thickness of the mesh wireframe, in screen pixels.

Below 0.1 the wireframe is invisible; above roughly 20 it swamps the mesh.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.wireframe_thickness.

None

Graphs

cellier.gui.anywidget.visuals.AnywidgetNodeVisibleToggle

Bases: AnywidgetToggle

Show the node sub-visual. Nests under visible.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.node_visible.

None

cellier.gui.anywidget.visuals.AnywidgetNodeColorPicker

Bases: AnywidgetColorPicker

Uniform RGBA node colour.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.node_color.

None

cellier.gui.anywidget.visuals.AnywidgetNodeSizeSpin

Bases: AnywidgetFloatSpin

Uniform node size, in node_size_space units.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.node_size.

None

cellier.gui.anywidget.visuals.AnywidgetNodeSizeSpaceCombo

Bases: AnywidgetChoice

Coordinate space node size is interpreted in.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.node_size_space.

None

cellier.gui.anywidget.visuals.AnywidgetEdgeVisibleToggle

Bases: AnywidgetToggle

Show the edge sub-visual. Nests under visible.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.edge_visible.

None

cellier.gui.anywidget.visuals.AnywidgetEdgeColorPicker

Bases: AnywidgetColorPicker

Uniform RGBA edge colour.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.edge_color.

None

cellier.gui.anywidget.visuals.AnywidgetEdgeThicknessSpin

Bases: AnywidgetFloatSpin

Edge thickness, in edge_thickness_space units.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.edge_thickness.

None

cellier.gui.anywidget.visuals.AnywidgetEdgeThicknessSpaceCombo

Bases: AnywidgetChoice

Coordinate space edge thickness is interpreted in.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically visual.appearance.edge_thickness_space.

None

cellier.gui.anywidget.visuals.AnywidgetTrailControls

Bases: VisualIdGroup, AnyWidget

Trail-window controls for one or more data axes of a graph visual.

Mirrors QtTrailControls: per offered axis, whether it has a window, how far the window reaches before and after the slice position, and whether it fades.

The browser holds one windows dict keyed by the axis index as a string. Python keeps the full TrailConfig per axis beside it, so the fields the control does not show survive every edit.

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

The graph visual whose trail this widget controls. A sequence drives every listed visual in lock-step, as on an OrthoViewer.

required
axes Sequence[tuple[int, str]]

(data-axis index, label) for each axis to offer, in display order.

required
trail Mapping[int, TrailConfig]

The visual's current {axis: TrailConfig}. Read, never held.

required

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = TRAIL_TITLE

Name shown when no title= is given.

The same title the built-in viewers pass when they build this widget.

widget property

An AnyWidget is itself the embeddable element.

offered_axes property

offered_axes: tuple[int, ...]

The data axes this widget offers, in display order.

is_enabled

is_enabled(axis: int) -> bool

Whether axis currently has a window.

window

window(axis: int) -> TrailConfig

The window axis has, or last had before it was switched off.

close

close() -> None

Unsubscribe from the bus and release the widget.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

One TrailChangedEvent subscription per driven visual.

Render settings

One panel per section of the canvas render config: ambient occlusion, outlines and temporal accumulation.

cellier.gui.anywidget.AnywidgetRenderConfigPanel

Bases: AnyWidget

Base for a notebook panel driving one section of the render config.

Subclasses set section and pass the live config section to super().__init__.

Wire to the controller after construction:

panel = AnywidgetAmbientOcclusionControls(
    controller.render_config.ambient_occlusion
)
controller.connect_widget(panel, subscription_specs=panel.subscription_specs())

Parameters:

Name Type Description Default
config Any

The live config section this panel drives (for example controller.render_config.outline). The panel's controls start from its current values.

required
title str

Heading drawn above the panel. Empty (the default) draws none.

''
slot_usage

Zero-argument callable returning {slot: how many visuals use it}, annotating the outline palette swatches. None (the default) draws no annotation. Only the outline panel uses it.

None
**kwargs

Passed to anywidget.AnyWidget.

{}

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Subscribe to every render-config change; filter by section here.

entity_id is deliberately None: there is no UUID a render config change could be keyed by.

refresh_readouts

refresh_readouts() -> None

Re-read any derived values this panel displays.

cellier.gui.anywidget.AnywidgetAmbientOcclusionControls

Bases: AnywidgetRenderConfigPanel

Ambient occlusion settings for the notebook GUI.

See cellier.gui.qt.QtAmbientOcclusionControls for what the radius means and why it is derived from the scene by default.

Parameters:

Name Type Description Default
config AmbientOcclusionConfig

The live AmbientOcclusionConfig -- typically controller.render_config.ambient_occlusion.

required
effective_radius Callable[[], float | None] | None

Called to read the radius actually in use, in scene units. None omits the readout.

None

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Subscribe to every render-config change; filter by section here.

entity_id is deliberately None: there is no UUID a render config change could be keyed by.

refresh_readouts

refresh_readouts() -> None

Re-read any derived values this panel displays.

cellier.gui.anywidget.AnywidgetOutlineControls

Bases: AnywidgetRenderConfigPanel

Screen-space outline settings for the notebook GUI.

See cellier.gui.qt.QtOutlineControls for what the two layers are and why the selection layer has no colour control.

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Subscribe to every render-config change; filter by section here.

entity_id is deliberately None: there is no UUID a render config change could be keyed by.

refresh_readouts

refresh_readouts() -> None

Re-read any derived values this panel displays.

cellier.gui.anywidget.AnywidgetTemporalControls

Bases: AnywidgetRenderConfigPanel

Temporal accumulation settings for the notebook GUI.

See cellier.gui.qt.QtTemporalControls for what the pass does and why the convergence readout is worth its space.

Parameters:

Name Type Description Default
config TemporalAccumulationConfig

The live TemporalAccumulationConfig.

required
frame_count Callable[[], int | None] | None

Called to read how many frames have accumulated on the least-converged canvas. None omits the readout.

None
on_reset Callable[[], None] | None

Called when the user asks to discard the accumulated history. An action rather than a setting, so it does not travel on the bus. None omits the button.

None

widget property

An AnyWidget is itself the embeddable element.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Subscribe to every render-config change; filter by section here.

entity_id is deliberately None: there is no UUID a render config change could be keyed by.

refresh_readouts

refresh_readouts() -> None

Re-read any derived values this panel displays.

Dataset info

What it shows comes from dataset_info_from_path or a store's dataset_info().

cellier.gui.anywidget.AnywidgetDatasetInfo

Bases: AnyWidget

Read-only display widget for dataset metadata.

Shows (label, value) rows as a table inside a collapsible <details> block. A sectioned DatasetInfo passed to from_info also draws nested blocks and matrix tables (a store's affine, its per-level shapes), the same content QtDatasetInfo shows.

The rows cross to the front end as data and are written with textContent, not as markup: a value carrying < or & -- a path, a dtype, anything read off a store -- is displayed, never parsed.

Parameters:

Name Type Description Default
rows Sequence[tuple[str, str]]

(label, value) pairs to display, in order. Both halves are coerced to str. An empty sequence hides the block.

()

DEFAULT_TITLE class-attribute instance-attribute

DEFAULT_TITLE = 'Dataset info'

Name shown when no title= is given.

The same title the built-in viewers pass when they build this widget.

title class-attribute instance-attribute

title = traitlets.Unicode(DEFAULT_TITLE).tag(sync=True)

What this control calls itself, drawn by its own front end.

A control names itself rather than being named by whatever lays it out, which is what lets the dock stack controls and stop.

rows class-attribute instance-attribute

rows = traitlets.List().tag(sync=True)

[[label, value], ...], the synced form of the rows argument.

sections class-attribute instance-attribute

sections = traitlets.List().tag(sync=True)

The synced form of a DatasetInfo's sections.

Empty for a widget built from plain rows, which the front end then draws as a single flat table. When both are set, sections wins: it is the richer description of the same data.

widget property

An AnyWidget is itself the embeddable element.

section_labels

section_labels() -> list[str]

The sections drawn, in the order they are drawn.

The twin of cellier.gui.qt.QtDatasetInfo.section_labels, and it exists for the same reason: one DatasetInfo must draw the same way on both front ends, and nothing else makes that checkable.

An unlabelled section is named by its first row's label, matching what a reader actually sees at the top of the block.

from_info classmethod

from_info(info: DatasetInfo, *, title: str | None = None) -> AnywidgetDatasetInfo

Build from a sectioned DatasetInfo.

The anywidget twin of QtDatasetInfo.from_info; the two draw the same sections in the same order.

from_store classmethod

from_store(store, *, title: str | None = None) -> AnywidgetDatasetInfo

Construct from any data store, by asking it to describe itself.

from_path classmethod

from_path(zarr_path: str, *, multiscale_index: int = 0, series_index: int = 0, title: str | None = None) -> AnywidgetDatasetInfo

Construct directly from an OME-Zarr URI.

Containers

Layout containers that hold other widgets in a notebook output.

cellier.gui.anywidget.AnywidgetBox

Bases: AnyWidget

A flexbox container that mounts child widget views via the manager.

Jupyter only: the children are mounted through the Jupyter widget manager, which marimo does not have. On marimo use AnywidgetSlot, or marimo's own mo.vstack / mo.hstack.

Parameters:

Name Type Description Default
children list of ipywidgets.DOMWidget

The child widgets to mount, in order.

required
direction 'v' or 'h'

Stacking direction: "v" (column, default) or "h" (row).

required
align str

Cross-axis alignment applied as CSS align-items (e.g. "center"); empty string leaves the flexbox default (stretch).

required
min_width int

When set (> 0), the box grows to fill available space but never narrower than this many pixels (flex: 1 1 <min_width>px); 0 leaves the flexbox default (content-sized, no grow).

required
gap int

Spacing between children in pixels. Defaults to 4, tuned for macro layout blocks (canvas/dims/docks). Pass a smaller value to group closely related sibling controls.

required
padding int

Inner padding in pixels, on all four sides. Defaults to 0. The built-in Jupyter layout pads only the outermost box, to keep it off the notebook cell / sidecar tab edges; nested boxes leave this at 0 so only the outer border shows.

required
title str

A heading drawn above the children, naming what the box holds. Empty (the default) draws nothing. The anywidget counterpart of cellier.gui.qt.visuals.titled_group.

required
scroll bool

Scroll the children vertically within the height of the row the box sits in, instead of making that row as tall as the children. For a side dock: the canvas column beside it sets the height, and a long controls column scrolls rather than stretching the output (or the sidecar) past the canvas. The box keeps its content width, and never gets shorter than scroll_min_height pixels (default SCROLL_MIN_HEIGHT). Only meaningful for a box that is an item in a horizontal box.

required
scroll_min_height int

The least height of a scrolling box, in pixels. Defaults to SCROLL_MIN_HEIGHT.

required

SCROLL_MIN_HEIGHT class-attribute instance-attribute

SCROLL_MIN_HEIGHT = 300

The least height a scrolling box takes, in pixels.

Keeps a small canvas from squeezing a dock to a sliver; a shorter row grows to it.

close

close() -> None

Close this box and every widget beneath it.

A container is the only thing holding the composed tree, so closing it has to close the children too or the whole panel stays registered with ipywidgets, which holds every widget in a process-global table that only close() clears. children is cleared first so the box does not keep them reachable afterwards.

Widget.close() no-ops once the comm is gone, so a child that is also closed some other way (by the layout that displayed it, say) is safe to reach twice.

cellier.gui.anywidget.AnywidgetSlot

Bases: AnyWidget

A column whose children can be replaced after it is displayed.

AnywidgetBox mounts children through the Jupyter widget manager's create_view, renders once, and does not exist on marimo. This mounts them through anywidget's composition API (host.getWidget), which both Jupyter and marimo implement, and remounts whenever children changes. That is what lets a dock follow the viewer on either host.

Children must be anywidgets, and must not be AnywidgetBox instances: a box nested in a slot on marimo would fall back to create_view.

Parameters:

Name Type Description Default
children list of anywidget.AnyWidget

The widgets to show, top to bottom. Assign a new list to replace them; the slot does not close the widgets it stops showing.

required
gap int

Spacing between children in pixels.

required
title str

A heading drawn above the children. Empty draws nothing.

required

close

close() -> None

Close this slot and the widgets it currently shows.

Building blocks

The generic controls the widgets above are made from: each drives one appearance field of a type (boolean, choice, number, colour) on one or more visuals. Use them for a field that has no named widget.

cellier.gui.anywidget.visuals.AnywidgetAppearanceField

Bases: AnyWidget

Bidirectional control for one appearance field on one or more visuals.

Mirrors QtAppearanceField: same constructor keyword, same visual_id fan-out, same echo filtering, same outgoing event.

Wire to the controller after construction:

toggle = AnywidgetVisibleToggle(visual_id, initial_value=True)
controller.connect_widget(
    toggle, subscription_specs=toggle.subscription_specs()
)

Parameters:

Name Type Description Default
visual_id UUID | Sequence[UUID]

UUID of the visual whose field this widget controls, or a sequence of UUIDs to drive as one group.

required
initial_value Any

Starting value -- typically read off the visual's appearance model. None (the default) starts the control at its type's default (_default_value).

None

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).

cellier.gui.anywidget.visuals.AnywidgetToggle

Bases: AnywidgetAppearanceField

Layer 2: a checkbox for a boolean appearance field.

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).

cellier.gui.anywidget.visuals.AnywidgetChoice

Bases: AnywidgetAppearanceField

Layer 2: a select for a Literal field.

Each subclass writes its options out in _default_choices; a test checks every list against its model's Literal so the two cannot drift. choices= replaces the list for one widget.

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).

cellier.gui.anywidget.visuals.AnywidgetFloatSpin

Bases: AnywidgetAppearanceField

Layer 2: a number input for an unbounded float field.

Mirrors QtFloatSpin, including that its range is a widget bound someone picked rather than a model constraint, and is overridable.

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).

cellier.gui.anywidget.visuals.AnywidgetIntSpin

Bases: AnywidgetAppearanceField

Layer 2: a number input for an integer field, optionally with shuffle.

shuffle is a synced bool rather than a separate control type, so the one asset still serves every integer field: int_spin.js renders the button only when the trait is set.

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).

cellier.gui.anywidget.visuals.AnywidgetBoundedSlider

Bases: AnywidgetAppearanceField

Layer 2: a slider for a float field the model bounds.

Mirrors QtBoundedSlider. min/max are synced traits so the one bounded_slider.js asset serves every field class of this type without knowing any field's name.

Its one documented exception carries over too: AnywidgetIsoThresholdSlider's range is a convention rather than a model constraint.

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).

cellier.gui.anywidget.visuals.AnywidgetColorPicker

Bases: AnywidgetAppearanceField

Layer 2: an RGB colour input plus a separate alpha slider.

Mirrors QtColorPicker. The trait is the full float RGBA the model holds; the hex conversion the <input type=color> needs happens in the JS, from that one trait, so the Python side never speaks hex.

widget property

An AnyWidget is itself the embeddable element.

control property

The bare input, under the name the Qt twin uses.

On Qt the control sits inside a labelled row, so widget and control are different objects. Here the widget is the control -- the input lives in JavaScript -- so both return self. Providing the name anyway is what lets a caller reach for the input without asking which toolkit it has.

visual_ids property

visual_ids: tuple[UUID, ...]

The visual ids this widget drives, always as a tuple.

field property

field: str

The appearance field name this widget writes.

close

close() -> None

Unsubscribe from the bus and release the widget.

closed tells the controller to drop this widget's subscriptions; the rest actually releases the widget. Both are needed: ipywidgets holds every widget, and every widget's layout, in a process-global table that only close() clears.

subscription_specs

subscription_specs() -> list[SubscriptionSpec]

Return one inbound subscription per visual id (subscribe-to-all).