Skip to main content

Component

Trait Component 

Source
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§

Source

fn render( &mut self, f: &mut Frame<'_>, rect: Rect, theme: &Theme, focused: bool, )

Provided Methods§

Source

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.

Source

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§

Source§

impl Component for ActiveDialog

Source§

impl Component for AppearanceSection

Source§

impl Component for AttachmentView

Source§

impl Component for CreateNoteDialog

Source§

impl Component for DeleteConfirmDialog

Source§

impl Component for DisplaySection

Source§

impl Component for EditorSection

Source§

impl Component for FileOpsMenuDialog

Source§

impl Component for HelpDialog

Source§

impl Component for IndexingSection

Source§

impl Component for MoveDialog

Source§

impl Component for RenameDialog

Source§

impl Component for ServerSection

Source§

impl Component for SidebarComponent

Source§

impl Component for SortDialog

Source§

impl Component for SortingSection

Source§

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.

Source§

impl Component for ThemePicker

Source§

impl Component for ThreadPanel

Source§

impl Component for UpdateAvailableDialog

Source§

impl Component for VaultSection

Source§

impl Component for WorkspacesSection