pub struct UndoHistory(/* private fields */);
Expand description
W
Undo/redo stack view.
This widget shows a snapshot of the undo/redo stacks of the focused undo scope when the history widget is open. Note that the stack is not live, this widget is designed to work as a menu popup content.
Implementations§
source§impl UndoHistory
impl UndoHistory
sourcepub fn widget_new() -> UndoHistory
pub fn widget_new() -> UndoHistory
Start building a new instance.
sourcepub fn widget_type() -> WidgetType
pub fn widget_type() -> WidgetType
Gets the widget type info.
source§impl UndoHistory
impl UndoHistory
sourcepub fn undo_entry_fn(&self, wgt_fn: impl IntoVar<WidgetFn<UndoEntryArgs>>)
pub fn undo_entry_fn(&self, wgt_fn: impl IntoVar<WidgetFn<UndoEntryArgs>>)
P
Widget function that converts UndoEntryArgs
to widgets.
Try undo_button_style_fn
for making only visual changes.
Sets the UNDO_ENTRY_FN_VAR
.
source§impl UndoHistory
impl UndoHistory
sourcepub fn undo_stack_fn(&self, wgt_fn: impl IntoVar<WidgetFn<UndoStackArgs>>)
pub fn undo_stack_fn(&self, wgt_fn: impl IntoVar<WidgetFn<UndoStackArgs>>)
P
Widget function that converts UndoStackArgs
to widgets.
Sets the UNDO_STACK_FN_VAR
.
source§impl UndoHistory
impl UndoHistory
sourcepub fn undo_panel_fn(&self, wgt_fn: impl IntoVar<WidgetFn<UndoPanelArgs>>)
pub fn undo_panel_fn(&self, wgt_fn: impl IntoVar<WidgetFn<UndoPanelArgs>>)
P
Widget function that converts UndoPanelArgs
to widgets.
Sets the UNDO_PANEL_FN_VAR
.
source§impl UndoHistory
impl UndoHistory
sourcepub fn group_by_undo_interval(&self, enabled: impl IntoVar<bool>)
pub fn group_by_undo_interval(&self, enabled: impl IntoVar<bool>)
P
If undo entries are grouped by the UNDO.undo_interval
.
Enabled by default.
Sets the GROUP_BY_UNDO_INTERVAL_VAR
.
Methods from Deref<Target = WidgetBase>§
sourcepub fn widget_builder(&mut self) -> &mut WidgetBuilder
pub fn widget_builder(&mut self) -> &mut WidgetBuilder
Returns a mutable reference to the widget builder.
sourcepub fn widget_when(&mut self) -> Option<&mut WhenInfo>
pub fn widget_when(&mut self) -> Option<&mut WhenInfo>
Returns a mutable reference to the when
block if called inside a when block.
sourcepub fn widget_take(&mut self) -> WidgetBuilder
pub fn widget_take(&mut self) -> WidgetBuilder
Takes the widget builder, finishing the widget macro build.
After this call trying to set a property using self
will panic,
the returned builder can still be manipulated directly.
sourcepub fn widget_build(&mut self) -> impl UiNode
pub fn widget_build(&mut self) -> impl UiNode
Build the widget.
After this call trying to set a property will panic.
sourcepub fn widget_importance(&mut self) -> &mut Importance
pub fn widget_importance(&mut self) -> &mut Importance
Returns a mutable reference to the importance of the next property assigns, unsets or when blocks.
Note that during the widget_intrinsic
call this is Importance::WIDGET
and after it is Importance::INSTANCE
.
sourcepub fn start_when_block(
&mut self,
inputs: Box<[WhenInput]>,
state: Box<dyn VarBoxed<bool>>,
expr: &'static str,
location: SourceLocation,
)
pub fn start_when_block( &mut self, inputs: Box<[WhenInput]>, state: Box<dyn VarBoxed<bool>>, expr: &'static str, location: SourceLocation, )
Start building a when
block, all properties set after this call are pushed in the when block.
sourcepub fn end_when_block(&mut self)
pub fn end_when_block(&mut self)
End the current when
block, all properties set after this call are pushed in the widget.
Trait Implementations§
source§impl Deref for UndoHistory
impl Deref for UndoHistory
source§type Target = WidgetBase
type Target = WidgetBase
source§impl DerefMut for UndoHistory
impl DerefMut for UndoHistory
Auto Trait Implementations§
impl !Freeze for UndoHistory
impl !RefUnwindSafe for UndoHistory
impl Send for UndoHistory
impl !Sync for UndoHistory
impl Unpin for UndoHistory
impl !UnwindSafe for UndoHistory
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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