X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76e9224eb2edea8afe45faa6a1cd1b2894d245c2..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/interface/wx/cmdproc.h?ds=sidebyside diff --git a/interface/wx/cmdproc.h b/interface/wx/cmdproc.h index eda822251c..5d948d6c27 100644 --- a/interface/wx/cmdproc.h +++ b/interface/wx/cmdproc.h @@ -3,7 +3,7 @@ // Purpose: interface of wxCommandProcessor and wxCommand // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -75,7 +75,7 @@ public: know the ordering of Undos; the user can never Undo at an arbitrary position in the command history. - Restore the entire document state (perhaps using document - transactioning). Potentially very inefficient, but possibly easier to + transacting). Potentially very inefficient, but possibly easier to code if the user interface and data are complex, and an "inverse execute" operation is hard to write. The docview sample uses the first method, to remove or restore segments in the drawing. @@ -126,6 +126,12 @@ public: */ virtual bool CanUndo() const; + /** + Returns @true if the currently-active command can be redone, @false + otherwise. + */ + virtual bool CanRedo() const; + /** Deletes all commands in the list and sets the current command pointer to @NULL. @@ -137,6 +143,11 @@ public: */ wxList& GetCommands(); + /** + Returns the current command. + */ + wxCommand *GetCurrentCommand() const; + /** Returns the edit menu associated with the command processor. */ @@ -235,6 +246,12 @@ public: */ virtual bool Submit(wxCommand* command, bool storeIt = true); + /** + Just store the command without executing it. The command is stored in the + history list, and the associated edit menu (if any) updated appropriately. + */ + virtual void Store(wxCommand *command); + /** Undoes the last command executed. */