Loading...
Searching...
No Matches
pdftron::SDF::UndoManager Class Reference

#include <UndoManager.h>

Public Member Functions

 UndoManager (const UndoManager &other)
 UndoManager (TRN_UndoManager impl)
UndoManageroperator= (const UndoManager &other)
 ~UndoManager ()
void Destroy ()
DocSnapshot DiscardAllSnapshots ()
ResultSnapshot Undo ()
bool CanUndo () const
DocSnapshot GetNextUndoSnapshot () const
ResultSnapshot Redo ()
bool CanRedo () const
DocSnapshot GetNextRedoSnapshot () const
ResultSnapshot TakeSnapshot ()

Public Attributes

TRN_UndoManager m_impl

Detailed Description

The class UndoManager. Undo-redo interface; one-to-one mapped to document

Definition at line 25 of file UndoManager.h.

Constructor & Destructor Documentation

◆ UndoManager() [1/2]

pdftron::SDF::UndoManager::UndoManager ( const UndoManager & other)

◆ UndoManager() [2/2]

pdftron::SDF::UndoManager::UndoManager ( TRN_UndoManager impl)

◆ ~UndoManager()

pdftron::SDF::UndoManager::~UndoManager ( )

Member Function Documentation

◆ CanRedo()

bool pdftron::SDF::UndoManager::CanRedo ( ) const

Returns a boolean indicating whether it is possible to redo from the current snapshot.

Returns
A boolean indicating whether it is possible to redo from the current snapshot.

◆ CanUndo()

bool pdftron::SDF::UndoManager::CanUndo ( ) const

Returns whether it is possible to undo from the current snapshot.

Returns
Whether it is possible to undo from the current snapshot.

◆ Destroy()

void pdftron::SDF::UndoManager::Destroy ( )

◆ DiscardAllSnapshots()

DocSnapshot pdftron::SDF::UndoManager::DiscardAllSnapshots ( )

Forget all changes in this manager (without changing the document).

Returns
An invalid DocSnapshot.

◆ GetNextRedoSnapshot()

DocSnapshot pdftron::SDF::UndoManager::GetNextRedoSnapshot ( ) const

Gets the next state of the document. This state may be invalid if it is impossible to redo.

Returns
The next state of the document. This state may be invalid if it is impossible to redo.

◆ GetNextUndoSnapshot()

DocSnapshot pdftron::SDF::UndoManager::GetNextUndoSnapshot ( ) const

Gets the previous state of the document. This state may be invalid if it is impossible to undo.

Returns
The previous state of the document. This state may be invalid if it is impossible to undo.

◆ operator=()

UndoManager & pdftron::SDF::UndoManager::operator= ( const UndoManager & other)

◆ Redo()

ResultSnapshot pdftron::SDF::UndoManager::Redo ( )

Restores to the next snapshot, if there is one.

Returns
A representation of the transition to the next snapshot, if there is one.

◆ TakeSnapshot()

ResultSnapshot pdftron::SDF::UndoManager::TakeSnapshot ( )

Creates a snapshot of document state, transitions to the new snapshot.

Returns
A representation of the transition.

◆ Undo()

ResultSnapshot pdftron::SDF::UndoManager::Undo ( )

Restores to the previous snapshot point, if there is one.

Returns
The resulting snapshot id.

Member Data Documentation

◆ m_impl

TRN_UndoManager pdftron::SDF::UndoManager::m_impl

Definition at line 98 of file UndoManager.h.


The documentation for this class was generated from the following file: