trait UndoManager[T <: Exec[T]] extends Disposable[T] with Observable[T, Update[T]]
- Alphabetic
- By Inheritance
- UndoManager
- Observable
- Disposable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def addEdit(edit: UndoableEdit[T])(implicit tx: T): Unit
Add another edit to the history.
Add another edit to the history. Unless merging is blocked, it tries to merge this edit with the most recent edit. Afterwards, the internal merge-block flag is cleared.
- abstract def blockMerge()(implicit tx: T): Unit
Disallow the merging of the next edit to be added.
Disallow the merging of the next edit to be added. This can be used to avoid merging edits if the editor component was temporarily unfocused, for example.
- abstract def canRedo(implicit tx: T): Boolean
Whether there are edits that can be redone, and thus whether
redo
andredoName
may be called. - abstract def canUndo(implicit tx: T): Boolean
Whether there are undoable edits and thus
undo
andundoName
may be called. - abstract def capture[A](name: String)(block: => A)(implicit tx: T): A
Creates a compound capture if during the execution of
block
more than one edit is added.Creates a compound capture if during the execution of
block
more than one edit is added. If exactly one edit is added, it will be directly added without a wrapping compound.Note: this wraps the call in
UndoManager.using
, so this manager is found by agnostic code. - abstract def clear()(implicit tx: T): Unit
Clears the history, removing all edits.
Clears the history, removing all edits. Afterwards,
canUndo
andcanRedo
will returnfalse
. - abstract def dispose()(implicit tx: T): Unit
- Definition Classes
- Disposable
- abstract def react(fun: (T) => (Update[T]) => Unit)(implicit tx: T): Disposable[T]
Registers a live observer with this observable.
Registers a live observer with this observable. The method is called with the observing function which receives the observable's update message of type
A
, and the method generates an opaqueDisposable
instance, which may be used to remove the observer eventually (through thedispose
method).- Definition Classes
- Observable
- abstract def redo()(implicit tx: T): Unit
Throws an exception if
!canRedo
- abstract def redoName(implicit tx: T): String
Throws an exception if
!canRedo
- abstract def undo()(implicit tx: T): Unit
Throws an exception if
!canUndo
- abstract def undoName(implicit tx: T): String
Throws an exception if
!canUndo
- abstract def use[A](block: => A)(implicit tx: T): A
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ack(): Unit
A no-op that can be used to acknowledge the presence of the undo manager.
A no-op that can be used to acknowledge the presence of the undo manager.
This is useful to avoid warnings about an unused undo manager argument, when the code proceeds to call undo manager agnostic implementations.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def reactNow(fun: (T) => (Update[T]) => Unit)(implicit tx: T): Disposable[T]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated