Expand description
Shared trait definitions for par-term components.
These traits document the contracts between major components and enable
mock implementations for unit testing the app/ module without needing
a live PTY session or GPU context.
§Status
TerminalAccess is fully implemented on par_term_terminal::TerminalManager.
See crate::traits_impl for the concrete impl and a MockTerminal test helper.
UIElement is fully implemented on crate::tab_bar_ui::TabBarUI and
crate::status_bar::StatusBarUI.
See crate::traits_impl for the concrete impls and a compile-time test.
EventHandler is still deferred — see the comment block at the end of this file.
§Migration Path for EventHandler
When the WindowState decomposition is further advanced:
- Define
EventHandler<E>whereE = winit::event::WindowEventand implement it on each sub-handler struct extracted fromWindowState. - Add mock implementations in
#[cfg(test)]blocks.
Traits§
- Overlay
Component - Common interface for egui overlay UI components that follow the
show(&mut self, ctx: &egui::Context) -> Self::Actionpattern. - Terminal
Access - Provides read-only access to terminal mode and state for input/mouse handlers.
- UIElement
- Common interface for UI bar/panel components whose height and visibility depend on per-frame context (configuration, window state).