de.sciss.lucre.edit.UndoableEdit.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lucre-core_3 Show documentation
Show all versions of lucre-core_3 Show documentation
Extension of Scala-STM, adding optional durability layer, and providing API for confluent and reactive event layers
The newest version!
/*
* UndoableEdit.scala
* (Lucre 4)
*
* Copyright (c) 2009-2024 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* [email protected]
*/
package de.sciss.lucre
package edit
trait UndoableEdit[T <: Exec[T]] extends Disposable[T] {
def undo()(implicit tx: T): Unit
def redo()(implicit tx: T): Unit
/** Tries to merge this edit with a successive edit.
*
* @return `Some` new edit containing both this and the successive edit, if possible,
* `None` if merging is not possible
*/
def tryMerge(succ: UndoableEdit[T])(implicit tx: T): Option[UndoableEdit[T]]
/** Whether this edit is destructive to the document model or not. */
def significant: Boolean
def name: String
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy