pub struct SearchModesWidget { /* private fields */ }
Expand description
A widget for handling all search/filter modes
Implementations§
Source§impl SearchModesWidget
impl SearchModesWidget
pub fn new() -> Self
Sourcepub fn enter_mode(
&mut self,
mode: SearchMode,
current_sql: String,
cursor_pos: usize,
)
pub fn enter_mode( &mut self, mode: SearchMode, current_sql: String, cursor_pos: usize, )
Initialize the widget for a specific search mode
Sourcepub fn exit_mode(&mut self) -> Option<(String, usize)>
pub fn exit_mode(&mut self) -> Option<(String, usize)>
Exit the current mode and return saved state
Sourcepub fn current_mode(&self) -> Option<SearchMode>
pub fn current_mode(&self) -> Option<SearchMode>
Get the current mode if active
Sourcepub fn get_pattern(&self) -> String
pub fn get_pattern(&self) -> String
Get the current pattern
Sourcepub fn get_cursor_position(&self) -> usize
pub fn get_cursor_position(&self) -> usize
Get cursor position for rendering
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> SearchModesAction
pub fn handle_key(&mut self, key: KeyEvent) -> SearchModesAction
Handle key input
Sourcepub fn check_debounce(&mut self) -> Option<SearchModesAction>
pub fn check_debounce(&mut self) -> Option<SearchModesAction>
Check if debounced action should execute
Sourcepub fn render_hint(&self) -> Line<'static>
pub fn render_hint(&self) -> Line<'static>
Render inline hint in status bar
Trait Implementations§
Source§impl DebugInfoProvider for SearchModesWidget
impl DebugInfoProvider for SearchModesWidget
Source§fn debug_info(&self) -> String
fn debug_info(&self) -> String
Generate a formatted string containing debug information about the widget’s state Read more
Source§fn debug_summary(&self) -> String
fn debug_summary(&self) -> String
Optional: Get a short one-line summary of the widget state
Useful for compact debug views
Auto Trait Implementations§
impl !Freeze for SearchModesWidget
impl RefUnwindSafe for SearchModesWidget
impl Send for SearchModesWidget
impl Sync for SearchModesWidget
impl Unpin for SearchModesWidget
impl UnwindSafe for SearchModesWidget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more