Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
#include <FXUndoList.h>
Inheritance diagram for FX::FXUndoList:
Public Types | |
enum | { ID_CLEAR = FXWindow::ID_LAST, ID_REVERT, ID_UNDO, ID_REDO, ID_UNDO_ALL, ID_REDO_ALL, ID_UNDO_COUNT, ID_REDO_COUNT, ID_LAST } |
Public Member Functions | |
FXUndoList () | |
void | cut () |
void | add (FXCommand *command, FXbool doit=FALSE, FXbool merge=TRUE) |
void | begin (FXCommandGroup *command) |
void | end () |
void | abort () |
virtual void | undo () |
virtual void | redo () |
void | undoAll () |
void | redoAll () |
void | revert () |
FXbool | canUndo () const |
FXbool | canRedo () const |
FXbool | canRevert () const |
FXbool | busy () const |
FXCommand * | current () const |
virtual FXString | undoName () const |
virtual FXString | redoName () const |
FXint | undoCount () const |
FXint | redoCount () const |
virtual FXuint | size () const |
void | clear () |
void | trimCount (FXint nc) |
void | trimSize (FXuint sz) |
void | mark () |
void | unmark () |
FXbool | marked () const |
|
Make new empty undo list, initially unmarked.
|
|
Cut the redo list. This is automatically invoked when a new undo command is added. |
|
Add new command, executing it if desired. The new command will be merged with the previous command if merge is TRUE and we're not at a marked position and the commands are mergeable. Otherwise the new command will be appended after the last undo command in the currently active undo group. If the new command is successfully merged, it will be deleted. Furthermore, all redo commands will be deleted since it is no longer possible to redo from this point. |
|
Begin undo command sub-group. This begins a new group of commands that are treated as a single command. Must eventually be followed by a matching end() after recording the sub-commands. The new sub-group will be appended to its parent group's undo list when end() is called. |
|
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously. |
|
Abort the current command sub-group being compiled. All commands already added to the sub-groups undo list will be discarded. Intermediate command groups will be left intact. |
|
Undo last command. This will move the command to the redo list. Reimplemented from FX::FXCommandGroup. |
|
Redo next command. This will move the command back to the undo list. Reimplemented from FX::FXCommandGroup. |
|
Undo all commands.
|
|
Redo all commands.
|
|
Revert to marked.
|
|
Can we undo more commands.
|
|
Can we redo more commands.
|
|
Can revert to marked.
|
|
Return TRUE if currently inside undo or redo operation; this is useful to avoid generating another undo command while inside an undo operation.
|
|
Current top level undo command.
|
|
Return name of the first undo command available; if no undo command available this will return the empty string.
Reimplemented from FX::FXCommand. |
|
Return name of the first redo command available; if no Redo command available this will return the empty string.
Reimplemented from FX::FXCommand. |
|
Number of undo records.
|
|
Number of redo records.
|
|
Size of undo information.
Reimplemented from FX::FXCommandGroup. |
|
Clear list, and unmark all states. All undo and redo information will be destroyed. |
|
Trim undo list down to at most nc commands. Call this periodically to prevent the undo-list from growing beyond a certain number of records. |
|
Trim undo list down to at most size sz. Call this periodically to prevent the undo-list from growing beyond a certain amount of memory. |
|
Mark the current state of the undo list, which is initially unmarked. There can be only one active mark at any time. Call mark() at any time when you know the document to be "clean"; for example when you save the document to disk. |
|
Unmark all states in the undo list.
|
|
Check if the current state was marked, if the application has returned to the previously marked state.
|
Copyright © 1997-2005 Jeroen van der Zijp |