ContentEditingNativeChangeEdit

class ContentEditingNativeChangeEdit(pageIndex: Int, textBlockId: String, undoData: UndoData, redoData: UndoData, val externalControlState: ExternalControlState, deleted: Boolean? = null) : ContentEditingEdit

Any content changes made by the NativeContentEditor (which is text-change and change of style (font, textcolor, textsize)) can simply be un-/redone by calling NativeContentEditingCommand.RESTORE with a specific HistoryIndex and the id of the textblock. Additionally the isDeleted flag of the textblock is by this class, too (since deletion of a textblock always goes in context with deleting all the block's text).

Parameters

pageIndex

The zero-based index of the page containing the text block.

textBlockId

The unique identifier of the text block.

undoData

The data needed to restore the text block to its previous state.

redoData

The data needed to restore the text block to its new state.

deleted

Whether the text block was deleted, or null if deletion state was not changed.

Constructors

Link copied to clipboard
constructor(pageIndex: Int, textBlockId: String, undoData: UndoData, redoData: UndoData, externalControlState: ExternalControlState, deleted: Boolean? = null)

Properties

Link copied to clipboard
val externalControlState: ExternalControlState

The external control state at the time of this edit.

Functions

Link copied to clipboard
fun isDeleted(forUndo: Boolean): Boolean?

Returns whether the text block was deleted for undo or redo operations.

Link copied to clipboard
fun selEnd(forUndo: Boolean): Cluster?

Returns the selection end position for undo or redo operations.

Link copied to clipboard
fun selStart(forUndo: Boolean): Int?

Returns the selection start position for undo or redo operations.

Link copied to clipboard
fun version(forUndo: Boolean): HistoryIndex

Returns the history version for undo or redo operations.