conntextual.ui package#
Subpackages#
- conntextual.ui.channel package
- Submodules
- conntextual.ui.channel.color module
- conntextual.ui.channel.environment module
ChannelEnvironmentDisplay
ChannelEnvironmentDisplay.add_channel()
ChannelEnvironmentDisplay.add_field()
ChannelEnvironmentDisplay.by_index
ChannelEnvironmentDisplay.can_focus
ChannelEnvironmentDisplay.can_focus_children
ChannelEnvironmentDisplay.channel_pattern
ChannelEnvironmentDisplay.channels_by_row
ChannelEnvironmentDisplay.compose()
ChannelEnvironmentDisplay.create()
ChannelEnvironmentDisplay.handle_cell_selected()
ChannelEnvironmentDisplay.highlight_style
ChannelEnvironmentDisplay.label
ChannelEnvironmentDisplay.model
ChannelEnvironmentDisplay.on_mount()
ChannelEnvironmentDisplay.random_channel()
ChannelEnvironmentDisplay.reset_plot()
ChannelEnvironmentDisplay.row_idx
ChannelEnvironmentDisplay.selected
ChannelEnvironmentDisplay.styles
ChannelEnvironmentDisplay.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)[source]#
Bases:
App
[None
]A simple textual application.
- BINDINGS: ClassVar[list[BindingType]] = [('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), Binding(key=<Keys.BackTab: 'shift+tab'>, action='tab(False)', description='Previous tab', show=True, key_display=None, priority=True)]#
- CSS_PATH: ClassVar[CSSPathType | None] = PosixPath('/home/vkottler/src/vkottler/workspace/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:
ChannelEnvironmentMixin
A 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
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)[source]#
Bases:
App
[None
]A simple textual application.
- BINDINGS: ClassVar[list[BindingType]] = [('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), Binding(key=<Keys.BackTab: 'shift+tab'>, action='tab(False)', description='Previous tab', show=True, key_display=None, priority=True)]#
- CSS_PATH: ClassVar[CSSPathType | None] = PosixPath('/home/vkottler/src/vkottler/workspace/conntextual/conntextual/data/tcss/base.tcss')#
File paths to load CSS from.
- animation_level: AnimationLevel#
Determines what type of animations the app will display.
See [textual.constants.TEXTUAL_ANIMATIONS][textual.constants.TEXTUAL_ANIMATIONS].
- app_resume_signal: Signal[App]#
The signal that is published when the app is resumed after a suspend.
When the app is resumed after a [App.suspend][textual.app.App.suspend] call this signal will be [published][textual.signal.Signal.publish]; [subscribe][textual.signal.Signal.subscribe] to this signal to perform work after the app has resumed.
- app_suspend_signal: Signal[App]#
The signal that is published when the app is suspended.
When [App.suspend][textual.app.App.suspend] is called this signal will be [published][textual.signal.Signal.publish]; [subscribe][textual.signal.Signal.subscribe] to this signal to perform work before the suspension takes place.
- 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.
- devtools: DevtoolsClient | None#
- dispatch(max_plot_samples: int, update_table: bool = True, update_log: bool = True, update_plot: bool = True) None [source]#
Update channel values.
- features: frozenset[FeatureFlag]#
- mouse_captured: Widget | None#
- mouse_over: Widget | None#
- scroll_sensitivity_x: float#
Number of columns to scroll in the X direction with wheel or trackpad.
- scroll_sensitivity_y: float#
Number of lines to scroll in the Y direction with wheel or trackpad.
- styles: RenderStyles#
- tab_pattern: PatternPair#
- property tabs: TabbedContent#
Get the tab container.
- ui_enabled(name: str) bool [source]#
Determine if a task tab should be created for a task with a given name.
- use_command_palette: bool#
A flag to say if the application should use the command palette.
If set to False any call to [action_command_palette][textual.app.App.action_command_palette] will be ignored.
- class conntextual.ui.ChannelEnvironmentDisplay(renderable: ConsoleRenderable | RichCast | str = '', *, 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:
Static
A 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: bool = False#
Widget may receive focus.
- can_focus_children: bool = 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#