pub struct ActionLogOverlay {
pub title: String,
pub entries: Vec<ActionLogDisplayEntry>,
pub selected: usize,
pub scroll_offset: usize,
pub search_query: String,
pub search_matches: Vec<usize>,
pub search_match_index: usize,
pub search_input_active: bool,
}Expand description
Overlay for displaying the action log
Fields§
§title: StringTitle for the overlay
entries: Vec<ActionLogDisplayEntry>Action entries to display
selected: usizeCurrently selected entry index (for scrolling)
scroll_offset: usizeScroll offset for visible window
search_query: StringActive action-log search query
search_matches: Vec<usize>Matched row indices for the current search query
search_match_index: usizeCurrent position within search_matches
search_input_active: boolWhether search input mode is active
Implementations§
Source§impl ActionLogOverlay
impl ActionLogOverlay
Sourcepub fn from_log(log: &ActionLog, title: impl Into<String>) -> ActionLogOverlay
pub fn from_log(log: &ActionLog, title: impl Into<String>) -> ActionLogOverlay
Create from an ActionLog reference
Sourcepub fn scroll_down(&mut self)
pub fn scroll_down(&mut self)
Scroll down (select next entry)
Sourcepub fn scroll_to_top(&mut self)
pub fn scroll_to_top(&mut self)
Jump to the top
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
Jump to the bottom
Sourcepub fn scroll_offset_for(&self, visible_rows: usize) -> usize
pub fn scroll_offset_for(&self, visible_rows: usize) -> usize
Calculate the scroll offset to keep the selected row visible.
Sourcepub fn get_selected(&self) -> Option<&ActionLogDisplayEntry>
pub fn get_selected(&self) -> Option<&ActionLogDisplayEntry>
Get the currently selected entry
Sourcepub fn selected_detail(&self) -> Option<ActionDetailOverlay>
pub fn selected_detail(&self) -> Option<ActionDetailOverlay>
Create a detail overlay from the selected entry
Sourcepub fn set_search_query(&mut self, query: impl Into<String>)
pub fn set_search_query(&mut self, query: impl Into<String>)
Set the current search query and recompute matching rows.
Sourcepub fn push_search_char(&mut self, ch: char)
pub fn push_search_char(&mut self, ch: char)
Append a character to the active search query.
Sourcepub fn pop_search_char(&mut self) -> bool
pub fn pop_search_char(&mut self) -> bool
Pop the last search query character.
Sourcepub fn clear_search_query(&mut self)
pub fn clear_search_query(&mut self)
Clear the active search query and matches.
Sourcepub fn search_next(&mut self) -> bool
pub fn search_next(&mut self) -> bool
Move to the next match, wrapping at the end.
Sourcepub fn search_prev(&mut self) -> bool
pub fn search_prev(&mut self) -> bool
Move to the previous match, wrapping at the beginning.
Sourcepub fn has_search_query(&self) -> bool
pub fn has_search_query(&self) -> bool
Returns true when a search query is active.
Sourcepub fn search_match_count(&self) -> usize
pub fn search_match_count(&self) -> usize
Number of matching rows for the active query.
Sourcepub fn search_match_position(&self) -> Option<(usize, usize)>
pub fn search_match_position(&self) -> Option<(usize, usize)>
Current search match position as (index, total) (1-based index).
Sourcepub fn is_search_match(&self, row_index: usize) -> bool
pub fn is_search_match(&self, row_index: usize) -> bool
Returns true if this row index is currently matched by the query.
Trait Implementations§
Source§impl Clone for ActionLogOverlay
impl Clone for ActionLogOverlay
Source§fn clone(&self) -> ActionLogOverlay
fn clone(&self) -> ActionLogOverlay
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ActionLogOverlay
impl RefUnwindSafe for ActionLogOverlay
impl Send for ActionLogOverlay
impl Sync for ActionLogOverlay
impl Unpin for ActionLogOverlay
impl UnsafeUnpin for ActionLogOverlay
impl UnwindSafe for ActionLogOverlay
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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