pub trait Component {
// Required method
fn render(
&mut self,
f: &mut Frame<'_>,
rect: Rect,
theme: &Theme,
focused: bool,
);
// Provided methods
fn handle_input(&mut self, event: &InputEvent, tx: &AppTx) -> EventState { ... }
fn hint_shortcuts(&self) -> Vec<(String, String)> { ... }
}Required Methods§
Provided Methods§
Sourcefn handle_input(&mut self, event: &InputEvent, tx: &AppTx) -> EventState
fn handle_input(&mut self, event: &InputEvent, tx: &AppTx) -> EventState
Handle an event. Send AppEvents through tx for app-level effects.
Returns whether this component consumed the event.
Sourcefn hint_shortcuts(&self) -> Vec<(String, String)>
fn hint_shortcuts(&self) -> Vec<(String, String)>
Context-sensitive shortcut hints shown in the hints bar when this
component is focused. Each entry is (key_display, label).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Component for ActiveDialog
impl Component for AppearanceSection
impl Component for AttachmentView
impl Component for CreateNoteDialog
impl Component for DeleteConfirmDialog
impl Component for DisplaySection
impl Component for EditorSection
impl Component for FileOpsMenuDialog
impl Component for HelpDialog
impl Component for IndexingSection
impl Component for MoveDialog
impl Component for RenameDialog
impl Component for ServerSection
impl Component for SidebarComponent
impl Component for SortDialog
impl Component for SortingSection
impl Component for TextEditorComponent
Viewport post-pass: emphasize search-needle matches
(color_search_match, bold) and style task checkboxes — [ ] accent,
[x] rows dimmed + struck (spec §5.1). Operates on the rendered buffer
rows, so cost is bounded by the visible area regardless of note size.