pub struct HistoryPanel { /* private fields */ }Expand description
History panel widget that displays undo/redo command history.
The panel shows commands in chronological order with the current position marked. Commands above the marker can be undone, commands below can be redone.
Implementations§
Source§impl HistoryPanel
impl HistoryPanel
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Set the panel title.
Sourcepub fn with_undo_items(self, items: &[impl AsRef<str>]) -> Self
pub fn with_undo_items(self, items: &[impl AsRef<str>]) -> Self
Set the undo items (descriptions from oldest to newest).
Sourcepub fn with_redo_items(self, items: &[impl AsRef<str>]) -> Self
pub fn with_redo_items(self, items: &[impl AsRef<str>]) -> Self
Set the redo items (descriptions from oldest to newest).
Sourcepub fn with_mode(self, mode: HistoryPanelMode) -> Self
pub fn with_mode(self, mode: HistoryPanelMode) -> Self
Set the display mode.
Sourcepub fn with_compact_limit(self, limit: usize) -> Self
pub fn with_compact_limit(self, limit: usize) -> Self
Set the compact mode limit.
Sourcepub fn with_title_style(self, style: Style) -> Self
pub fn with_title_style(self, style: Style) -> Self
Set the title style.
Sourcepub fn with_undo_style(self, style: Style) -> Self
pub fn with_undo_style(self, style: Style) -> Self
Set the undo items style.
Sourcepub fn with_redo_style(self, style: Style) -> Self
pub fn with_redo_style(self, style: Style) -> Self
Set the redo items style.
Sourcepub fn with_marker_style(self, style: Style) -> Self
pub fn with_marker_style(self, style: Style) -> Self
Set the marker style.
Sourcepub fn with_bg_style(self, style: Style) -> Self
pub fn with_bg_style(self, style: Style) -> Self
Set the background style.
Sourcepub fn with_marker_text(self, text: impl Into<String>) -> Self
pub fn with_marker_text(self, text: impl Into<String>) -> Self
Set the marker text.
Sourcepub fn with_undo_icon(self, icon: impl Into<String>) -> Self
pub fn with_undo_icon(self, icon: impl Into<String>) -> Self
Set the undo icon prefix.
Sourcepub fn with_redo_icon(self, icon: impl Into<String>) -> Self
pub fn with_redo_icon(self, icon: impl Into<String>) -> Self
Set the redo icon prefix.
Sourcepub fn undo_items(&self) -> &[String]
pub fn undo_items(&self) -> &[String]
Get the undo stack items.
Sourcepub fn redo_items(&self) -> &[String]
pub fn redo_items(&self) -> &[String]
Get the redo stack items.
Trait Implementations§
Source§impl Clone for HistoryPanel
impl Clone for HistoryPanel
Source§fn clone(&self) -> HistoryPanel
fn clone(&self) -> HistoryPanel
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 moreSource§impl Debug for HistoryPanel
impl Debug for HistoryPanel
Source§impl Default for HistoryPanel
impl Default for HistoryPanel
Auto Trait Implementations§
impl Freeze for HistoryPanel
impl RefUnwindSafe for HistoryPanel
impl Send for HistoryPanel
impl Sync for HistoryPanel
impl Unpin for HistoryPanel
impl UnsafeUnpin for HistoryPanel
impl UnwindSafe for HistoryPanel
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