conntextual.ui package#
Subpackages#
- conntextual.ui.channel package
- Submodules
- conntextual.ui.channel.color module
- conntextual.ui.channel.environment module
ChannelEnvironmentDisplayChannelEnvironmentDisplay.add_channel()ChannelEnvironmentDisplay.add_field()ChannelEnvironmentDisplay.by_indexChannelEnvironmentDisplay.can_focusChannelEnvironmentDisplay.can_focus_childrenChannelEnvironmentDisplay.channel_patternChannelEnvironmentDisplay.channels_by_rowChannelEnvironmentDisplay.compose()ChannelEnvironmentDisplay.create()ChannelEnvironmentDisplay.handle_cell_selected()ChannelEnvironmentDisplay.labelChannelEnvironmentDisplay.modelChannelEnvironmentDisplay.on_mount()ChannelEnvironmentDisplay.random_channel()ChannelEnvironmentDisplay.reset_plot()ChannelEnvironmentDisplay.row_idxChannelEnvironmentDisplay.selectedChannelEnvironmentDisplay.switch_to_channel()ChannelEnvironmentDisplay.update_channels()
- conntextual.ui.channel.log module
- conntextual.ui.channel.model module
- conntextual.ui.channel.pattern module
- conntextual.ui.channel.plot module
- conntextual.ui.channel.selected module
- conntextual.ui.channel.suggester module
- Module contents
Submodules#
conntextual.ui.base module#
A module implementing a user interface base application.
- class conntextual.ui.base.Base(driver_class: Type[Driver] | None = None, css_path: str | PurePath | List[str | PurePath] | None = None, watch_css: bool = False, ansi_color: bool | None = None)[source]#
Bases:
App[None]A simple textual application.
- BINDINGS = [('q', 'quit'), (Keys.Escape, 'quit', '(or q) quit'), ('space', 'toggle_pause', 'toggle pause'), ('d', 'toggle_dark', 'toggle dark mode'), ('g', 'screenshot', 'take a screenshot'), ('r', 'refresh_plot', 'refresh plot'), ('R', 'random_channel', 'plot random channel'), Binding(key=<Keys.Tab: 'tab'>, action='tab(True)', description='Next tab', show=True, key_display=None, priority=True, tooltip='', id=None, system=False, group=None), Binding(key=<Keys.BackTab: 'shift+tab'>, action='tab(False)', description='Previous tab', show=True, key_display=None, priority=True, tooltip='', id=None, system=False, group=None)]#
The default key bindings.
- CSS_PATH = PosixPath('/home/runner/work/conntextual/conntextual/conntextual/data/tcss/base.tcss')#
File paths to load CSS from.
- composed: Event#
- static create(app: AppInfo, env: ChannelEnvironment, handle_debug: bool = True) Base[source]#
Create an application instance.
- property current_channel_environment: ChannelEnvironmentDisplay | None#
Get the current channel-environment display.
- dispatch(max_plot_samples: int, update_table: bool = True, update_log: bool = True, update_plot: bool = True) None[source]#
Update channel values.
- tab_pattern: PatternPair#
- property tabs: TabbedContent#
Get the tab container.
conntextual.ui.model module#
A module implementing a data model for base applications.
- class conntextual.ui.model.Model(app: AppInfo, env: ChannelEnvironment, environments: List[ChannelEnvironmentDisplay], uptime: DoublePrimitive, paused: BooleanPrimitive, start: float, tab_to_id: dict[str, str])[source]#
Bases:
ChannelEnvironmentMixinA base application model.
- app: AppInfo#
- env: ChannelEnvironment#
- environments: List[ChannelEnvironmentDisplay]#
- paused: BooleanPrimitive#
- start: float#
- tab_to_id: dict[str, str]#
- uptime: DoublePrimitive#
conntextual.ui.task module#
A module implementing a TUI application task.
- class conntextual.ui.task.TuiDispatch[source]#
Bases:
TaskFactory[TuiDispatchTask]A factory for the TUI dispatch task.
- kind#
alias of
TuiDispatchTask
- class conntextual.ui.task.TuiDispatchTask(name: str, average_depth: int = 10, metrics: PeriodicTaskMetrics = None, period_s: float = 1.0, env: ChannelEnvironment = None, period_controls: dict[str, int | float | bool | dict[str, int | float | bool]] | str = 'period', markdown: str = None, config: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]] = None)[source]#
Bases:
ArbiterTaskA class implementing a periodic task for a textual TUI.
- process: Process#
- tui_task: Task[None]#
Module contents#
A module implementing a basic user interface.
- class conntextual.ui.Base(driver_class: Type[Driver] | None = None, css_path: str | PurePath | List[str | PurePath] | None = None, watch_css: bool = False, ansi_color: bool | None = None)[source]#
Bases:
App[None]A simple textual application.
- BINDINGS = [('q', 'quit'), (Keys.Escape, 'quit', '(or q) quit'), ('space', 'toggle_pause', 'toggle pause'), ('d', 'toggle_dark', 'toggle dark mode'), ('g', 'screenshot', 'take a screenshot'), ('r', 'refresh_plot', 'refresh plot'), ('R', 'random_channel', 'plot random channel'), Binding(key=<Keys.Tab: 'tab'>, action='tab(True)', description='Next tab', show=True, key_display=None, priority=True, tooltip='', id=None, system=False, group=None), Binding(key=<Keys.BackTab: 'shift+tab'>, action='tab(False)', description='Previous tab', show=True, key_display=None, priority=True, tooltip='', id=None, system=False, group=None)]#
The default key bindings.
- CSS_PATH = PosixPath('/home/runner/work/conntextual/conntextual/conntextual/data/tcss/base.tcss')#
File paths to load CSS from.
- composed: Event#
- static create(app: AppInfo, env: ChannelEnvironment, handle_debug: bool = True) Base[source]#
Create an application instance.
- property current_channel_environment: ChannelEnvironmentDisplay | None#
Get the current channel-environment display.
- dispatch(max_plot_samples: int, update_table: bool = True, update_log: bool = True, update_plot: bool = True) None[source]#
Update channel values.
- tab_pattern: PatternPair#
- property tabs: TabbedContent#
Get the tab container.
- class conntextual.ui.ChannelEnvironmentDisplay(content: VisualType = '', *, expand: bool = False, shrink: bool = False, markup: bool = True, name: str | None = None, id: str | None = None, classes: str | None = None, disabled: bool = False)[source]#
Bases:
StaticA channel-environment interface element.
- add_channel(name: str, chan: Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], enum: RuntimeEnum | None) int[source]#
Add a channel to the table.
- by_index: List[Tuple[Coordinate, str | int]]#
- can_focus = False#
Widget may receive focus.
- can_focus_children = True#
Widget’s children may receive focus.
- channel_pattern: PatternPair#
- channels_by_row: Dict[int, SelectedChannel]#
- static create(name: str, command: ChannelCommandProcessor, source: ChannelEnvironmentSource, logger: Logger | LoggerAdapter[Any], app: AppInfo, channel_pattern: PatternPair) ChannelEnvironmentDisplay[source]#
Create a channel-environment display.
- property label: str#
Obtain a label string for this instance.
- row_idx: int#
- selected: SelectedChannel#