pub trait LocalScope {
// Required methods
fn info(&self) -> ScopeInfo;
fn line(&self, app: &AppHandle) -> Line;
fn undo(
&self,
app: &AppHandle,
origin: &Origin,
) -> Result<Option<StepInfo>, Refusal>;
fn redo(
&self,
app: &AppHandle,
origin: &Origin,
) -> Result<Option<StepInfo>, Refusal>;
// Provided method
fn in_progress(&self, _app: &AppHandle) -> Option<Label> { ... }
}Expand description
A component’s own history, kept in the interface (ADR 0014): the
theme editor’s draft, the settings window’s values. Registered for a
focus surface with Ctx::local_scope:
while the focus is in that surface, Ctrl+Z undoes here.
Required Methods§
Provided Methods§
Sourcefn in_progress(&self, _app: &AppHandle) -> Option<Label>
fn in_progress(&self, _app: &AppHandle) -> Option<Label>
A gesture still going: undo and redo wait for it.