Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXUndoList Class Reference

#include <FXUndoList.h>

Inheritance diagram for FXUndoList:

FXObject List of all members.

Public Types

enum  {
  ID_CLEAR = FXWindow::ID_LAST,
  ID_REVERT,
  ID_UNDO,
  ID_REDO,
  ID_UNDO_ALL,
  ID_REDO_ALL,
  ID_LAST
}

Public Methods

 FXUndoList ()
 Make new empty undo list, initially unmarked.

void cut ()
 Cut the redo list.

FXbool add (FXCommand *command, FXbool doit=FALSE)
 Add new command, executing if desired.

FXbool undo ()
 Undo last command.

FXbool redo ()
 Redo next command.

FXbool undoAll ()
 Undo all commands.

FXbool redoAll ()
 Redo all commands.

FXbool revert ()
 Revert to marked.

FXbool canUndo () const
 Can we undo more commands.

FXbool canRedo () const
 Can we redo more commands.

FXbool canRevert () const
 Can revert to marked.

FXCommandcurrent () const
 Current undo command.

FXint undoCount () const
 Number of undo records.

FXuint undoSize () const
 Size of undo information.

void clear ()
 Clear list, and unmark all states.

void trimCount (FXint nc)
 Trim undo list down to at most nc commands.

void trimSize (FXuint sz)
 Trim undo list down to at most size sz.

void mark ()
void unmark ()
FXbool marked () const
 ~FXUndoList ()
 Clean up.


Detailed Description

The Undo List class manages a list of undoable commands.


Member Function Documentation

void FXUndoList::mark  
 

Mark the current state of the undo list, which is initially unmarked. There can be only one active mark at any time.

void FXUndoList::unmark  
 

Unmark all states in the undo list.

FXbool FXUndoList::marked   const
 

Check if the current state was marked, if the application has returned to the previously marked state.