#include <TridUndoable.h>
Public Member Functions | |
| TridUndoable (int max=100) | |
| ~TridUndoable () | |
| void | Push () |
| void | Change () |
| void | Undo () |
| void | Redo () |
Protected Attributes | |
| unsigned int | fIndex |
| unsigned int | fMax |
| std::deque< STATECLASS > | fStack |
Definition at line 13 of file TridUndoable.h.
| TridUndoable< STATECLASS >::TridUndoable | ( | int | max = 100 |
) | [inline] |
| TridUndoable< STATECLASS >::~TridUndoable | ( | ) | [inline] |
| void TridUndoable< STATECLASS >::Change | ( | ) | [inline] |
| void TridUndoable< STATECLASS >::Push | ( | ) | [inline] |
Definition at line 20 of file TridUndoable.h.
Referenced by TridUndoable< TridPOV >::Change(), TridGLFrame::HandleMotion(), TridFlatGLFrame::HandleMotion(), and TridGLFrame::SetPOV().
00020 { 00021 while(fIndex>0) { fStack.pop_front(); fIndex--; }; // Get rid of history after this one. 00022 fStack.push_front(STATECLASS(*this)); // Push it on. 00023 while(fStack.size()>fMax) { fStack.pop_back(); }; // Clean up if we're too big. 00024 };
| void TridUndoable< STATECLASS >::Redo | ( | void | ) | [inline] |
| void TridUndoable< STATECLASS >::Undo | ( | void | ) | [inline] |
unsigned int TridUndoable< STATECLASS >::fIndex [protected] |
Definition at line 46 of file TridUndoable.h.
Referenced by TridUndoable< TridPOV >::Change(), TridUndoable< TridPOV >::Push(), TridUndoable< TridPOV >::Redo(), TridUndoable< TridPOV >::TridUndoable(), and TridUndoable< TridPOV >::Undo().
unsigned int TridUndoable< STATECLASS >::fMax [protected] |
Definition at line 47 of file TridUndoable.h.
Referenced by TridUndoable< TridPOV >::Push(), and TridUndoable< TridPOV >::TridUndoable().
std::deque<STATECLASS> TridUndoable< STATECLASS >::fStack [protected] |
Definition at line 48 of file TridUndoable.h.
Referenced by TridUndoable< TridPOV >::Change(), TridUndoable< TridPOV >::Push(), TridUndoable< TridPOV >::Redo(), and TridUndoable< TridPOV >::Undo().
1.4.7