pub struct LocalCopiesDialog { /* private fields */ }Expand description
Offers the copies of a chart’s drawings that “Keep both” in a StorageConflictDialog kept
(ConflictChoice::KeepLocalCopy), for the symbol the chart shows: load one, which replaces
the drawings on the chart as one step that undo reverts, or discard one once the user
confirms. Open it with Self::open, from a menu or after a copy was kept, and call
Self::show every frame. The chart needs storage, set with Chart::set_storage.
if menu {
copies.open(chart);
}
copies.show(ctx, chart);Implementations§
Source§impl LocalCopiesDialog
impl LocalCopiesDialog
Sourcepub fn open(&mut self, chart: &mut Chart)
pub fn open(&mut self, chart: &mut Chart)
Opens the dialog and asks chart’s storage for the kept copies of its symbol’s drawings.
Sourcepub fn show(&mut self, ctx: &Context, chart: &mut Chart)
pub fn show(&mut self, ctx: &Context, chart: &mut Chart)
Shows the dialog while it is open; call it every frame. Loading a copy closes it, and
failures are reported through Chart::take_storage_error.
Trait Implementations§
Source§impl Debug for LocalCopiesDialog
impl Debug for LocalCopiesDialog
Source§impl Default for LocalCopiesDialog
impl Default for LocalCopiesDialog
Source§fn default() -> LocalCopiesDialog
fn default() -> LocalCopiesDialog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LocalCopiesDialog
impl RefUnwindSafe for LocalCopiesDialog
impl Send for LocalCopiesDialog
impl Sync for LocalCopiesDialog
impl Unpin for LocalCopiesDialog
impl UnsafeUnpin for LocalCopiesDialog
impl UnwindSafe for LocalCopiesDialog
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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