Public Member Functions | Protected Member Functions | Protected Attributes

px_ChangeHistory Class Reference

#include <px_ChangeHistory.h>

List of all members.

Public Member Functions

 px_ChangeHistory (pt_PieceTable *pT)
 ~px_ChangeHistory ()
bool addChangeRecord (PX_ChangeRecord *pcr)
bool canDo (bool bUndo) const
void setSavePosition (UT_sint32 savePosition)
UT_sint32 getSavePosition (void) const
UT_uint32 getUndoPos (void) const
bool getUndo (PX_ChangeRecord **ppcr, bool bStatic=false) const
bool getNthUndo (PX_ChangeRecord **ppcr, UT_uint32 undoNdx) const
bool getRedo (PX_ChangeRecord **ppcr) const
bool didUndo (void)
bool didRedo (void)
void coalesceHistory (const PX_ChangeRecord *pcr)
void setClean (void)
bool isDirty (void) const
void clearHistory ()
PD_DocumentgetDoc (void) const
bool getCRRange (PX_ChangeRecord *pcr, PT_DocPosition &posLow, PT_DocPosition &posHigh) const
bool doesOverlap (PX_ChangeRecord *pcr, PT_DocPosition low, PT_DocPosition high) const
void setScanningUndoGLOB (bool bTrue) const
bool isScanningUndoGLOB (void) const

Protected Member Functions

void _invalidateRedo (void)
void _invalidateHistory (void)
void _printHistory (UT_sint32 i) const

Protected Attributes

< PX_ChangeRecord * > 
UT_sint32 m_undoPosition
UT_sint32 m_savePosition
UT_sint32 m_iAdjustOffset
bool m_bOverlap
UT_sint32 m_iMinUndo
bool m_bScanUndoGLOB

Constructor & Destructor Documentation

px_ChangeHistory::px_ChangeHistory ( pt_PieceTable pT  ) 
px_ChangeHistory::~px_ChangeHistory (  ) 

Member Function Documentation

void px_ChangeHistory::_invalidateHistory ( void   )  [protected]
void px_ChangeHistory::_invalidateRedo ( void   )  [protected]
void px_ChangeHistory::_printHistory ( UT_sint32  i  )  const [protected]
bool px_ChangeHistory::addChangeRecord ( PX_ChangeRecord pcr  ) 
bool px_ChangeHistory::canDo ( bool  bUndo  )  const
void px_ChangeHistory::clearHistory (  ) 
void px_ChangeHistory::coalesceHistory ( const PX_ChangeRecord pcr  ) 
bool px_ChangeHistory::didRedo ( void   ) 
bool px_ChangeHistory::didUndo ( void   ) 
bool px_ChangeHistory::doesOverlap ( PX_ChangeRecord pcr,
PT_DocPosition  low,
PT_DocPosition  high 
) const

References getCRRange().

Referenced by getRedo(), and getUndo().

bool px_ChangeHistory::getCRRange ( PX_ChangeRecord pcr,
PT_DocPosition posLow,
PT_DocPosition posHigh 
) const
PD_Document * px_ChangeHistory::getDoc ( void   )  const
bool px_ChangeHistory::getNthUndo ( PX_ChangeRecord **  ppcr,
UT_uint32  undoNdx 
) const

This method returns the nth element off the undo stack. 0 returns the top element 1 returns the next element etc The result is not adjusted for undo's in the presence of remote changerecords and no attempt is made to see if an undo is legal (ie doesn't overlap with a later remote CR) or not.

References UT_GenericVector< T >::getNthItem(), PX_ChangeRecord::isFromThisDoc(), m_iAdjustOffset, m_iMinUndo, m_undoPosition, m_vecChangeRecords, and UT_return_val_if_fail.

Referenced by pt_PieceTable::_lastUndoIsThisFmtMark().

bool px_ChangeHistory::getRedo ( PX_ChangeRecord **  ppcr  )  const
UT_sint32 px_ChangeHistory::getSavePosition ( void   )  const
bool px_ChangeHistory::getUndo ( PX_ChangeRecord **  ppcr,
bool  bStatic = false 
) const
UT_uint32 px_ChangeHistory::getUndoPos ( void   )  const
bool px_ChangeHistory::isDirty ( void   )  const
bool px_ChangeHistory::isScanningUndoGLOB ( void   )  const [inline]

Referenced by getUndo().

void px_ChangeHistory::setClean ( void   ) 

References m_savePosition, and m_undoPosition.

Referenced by pt_PieceTable::setClean().

void px_ChangeHistory::setSavePosition ( UT_sint32  savePosition  ) 
void px_ChangeHistory::setScanningUndoGLOB ( bool  bTrue  )  const [inline]

Member Data Documentation

bool px_ChangeHistory::m_bOverlap [mutable, protected]
bool px_ChangeHistory::m_bScanUndoGLOB [mutable, protected]

Referenced by clearHistory().

Referenced by addChangeRecord(), and getDoc().

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