All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

pdftron::SDF::UndoManager::UndoManager ( const UndoManager other)
pdftron::SDF::UndoManager::UndoManager ( TRN_UndoManager  impl)
pdftron::SDF::UndoManager::~UndoManager ( )

Member Function Documentation

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.
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.
void pdftron::SDF::UndoManager::Destroy ( )
DocSnapshot pdftron::SDF::UndoManager::DiscardAllSnapshots ( )

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

Returns
An invalid DocSnapshot.
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.
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.
UndoManager& pdftron::SDF::UndoManager::operator= ( const UndoManager other)
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.
ResultSnapshot pdftron::SDF::UndoManager::TakeSnapshot ( )

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

Returns
A representation of the transition.
ResultSnapshot pdftron::SDF::UndoManager::Undo ( )

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

Returns
The resulting snapshot id.

Member Data Documentation

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: