runtimepy.ui package#

Submodules#

runtimepy.ui.button module#

A module implementing an action-button interface.

class runtimepy.ui.button.ActionButton(key: str, payload: dict[str, Any], text: str, icon: str, variant: str, outline: bool)[source]#

Bases: NamedTuple

A class implementing an interface for action buttons.

element() Element[source]#

Create an action button element.

static from_dict(data: dict[str, Any]) ActionButton[source]#

Create an action button from dictionary data.

static from_top_level(data: dict[str, Any] | list[dict[str, Any]]) list[ActionButton][source]#

Create an action button from dictionary data.

icon: str#

Alias for field number 3

key: str#

Alias for field number 0

outline: bool#

Alias for field number 5

payload: dict[str, Any]#

Alias for field number 1

text: str#

Alias for field number 2

variant: str#

Alias for field number 4

runtimepy.ui.controls module#

A module implementing UI controls instances for configuring UI widgets.

runtimepy.ui.controls.bit_slider(width: int, signed: bool) dict[str, int | float | bool | dict[str, int | float | bool]][source]#

Make a slider for an unsigned integer width.

runtimepy.ui.controls.make_slider(min_val: int | float, max_val: int | float, step: int | float, default: int | float | None = None) dict[str, int | float | bool | dict[str, int | float | bool]][source]#

Create dictionary data for a slider element.

runtimepy.ui.controls.normalize_controls(data: dict[str, int | float | bool | dict[str, int | float | bool]] | str) dict[str, int | float | bool | dict[str, int | float | bool]][source]#

Resolve a canonical control name if necessary.

runtimepy.ui.controls.signed_slider(width: int) dict[str, int | float | bool | dict[str, int | float | bool]][source]#

Make a slider for an unsigned integer width.

runtimepy.ui.controls.unsigned_slider(width: int) dict[str, int | float | bool | dict[str, int | float | bool]][source]#

Make a slider for an unsigned integer width.

Module contents#