pub struct ActionLogOverlay {
pub title: String,
pub entries: Vec<ActionLogDisplayEntry>,
pub selected: usize,
pub scroll_offset: usize,
}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
Implementations§
Source§impl ActionLogOverlay
impl ActionLogOverlay
Sourcepub fn from_log(log: &ActionLog, title: impl Into<String>) -> Self
pub fn from_log(log: &ActionLog, title: impl Into<String>) -> Self
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
Trait Implementations§
Source§impl Clone for ActionLogOverlay
impl Clone for ActionLogOverlay
Source§fn clone(&self) -> ActionLogOverlay
fn clone(&self) -> ActionLogOverlay
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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 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
Mutably borrows from an owned value. Read more
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>
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