X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f510b7b2f386afe6c3705c2cdbc9208435984dac..c266eff98c5e44012647f54f38a1e29ecabd8759:/docs/latex/wx/cmdproc.tex?ds=sidebyside diff --git a/docs/latex/wx/cmdproc.tex b/docs/latex/wx/cmdproc.tex index 41dd71b4cd..f5ae20501d 100644 --- a/docs/latex/wx/cmdproc.tex +++ b/docs/latex/wx/cmdproc.tex @@ -12,12 +12,17 @@ if you want different behaviour. +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{See also} \helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand} \latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxCommandProcessor::wxCommandProcessor}\label{wxcommandprocessorctor} \func{}{wxCommandProcessor}{\param{int}{ maxCommands = $-1$}} @@ -28,23 +33,27 @@ Constructor. commands stored to it, otherwise (and by default) the list of commands can grow arbitrarily. + \membersection{wxCommandProcessor::\destruct{wxCommandProcessor}}\label{wxcommandprocessordtor} \func{}{\destruct{wxCommandProcessor}}{\void} Destructor. + \membersection{wxCommandProcessor::CanUndo}\label{wxcommandprocessorcanundo} \func{virtual bool}{CanUndo}{\void} Returns true if the currently-active command can be undone, false otherwise. + \membersection{wxCommandProcessor::ClearCommands}\label{wxcommandprocessorclearcommands} \func{virtual void}{ClearCommands}{\void} -Deletes all the commands in the list and sets the current command pointer to NULL. +Deletes all commands in the list and sets the current command pointer to \NULL. + \membersection{wxCommandProcessor::Redo}\label{wxcommandprocessorredo} @@ -52,48 +61,56 @@ Deletes all the commands in the list and sets the current command pointer to NUL Executes (redoes) the current command (the command that has just been undone if any). + \membersection{wxCommandProcessor::GetCommands}\label{wxcommandprocessorgetcommands} \constfunc{wxList\&}{GetCommands}{\void} Returns the list of commands. + \membersection{wxCommandProcessor::GetMaxCommands}\label{wxcommandprocessorgetmaxcommands} \constfunc{int}{GetMaxCommands}{\void} Returns the maximum number of commands that the command processor stores. + \membersection{wxCommandProcessor::GetEditMenu}\label{wxcommandprocessorgeteditmenu} \constfunc{wxMenu*}{GetEditMenu}{\void} Returns the edit menu associated with the command processor. + \membersection{wxCommandProcessor::GetRedoAccelerator}\label{wxcommandprocessorgetredoaccelerator} \constfunc{const wxString\&}{GetRedoAccelerator}{\void} Returns the string that will be appended to the Redo menu item. + \membersection{wxCommandProcessor::GetRedoMenuLabel}\label{wxcommandprocessorgetredomenulabel} \constfunc{wxString}{GetRedoMenuLabel}{\void} Returns the string that will be shown for the redo menu item. + \membersection{wxCommandProcessor::GetUndoAccelerator}\label{wxcommandprocessorgetundoaccelerator} \constfunc{const wxString\&}{GetUndoAccelerator}{\void} Returns the string that will be appended to the Undo menu item. + \membersection{wxCommandProcessor::GetUndoMenuLabel}\label{wxcommandprocessorgetundomenulabel} \constfunc{wxString}{GetUndoMenuLabel}{\void} Returns the string that will be shown for the undo menu item. + \membersection{wxCommandProcessor::Initialize}\label{wxcommandprocessorinitialize} \func{virtual void}{Initialize}{\void} @@ -102,6 +119,25 @@ Initializes the command processor, setting the current command to the last in the list (if any), and updating the edit menu (if one has been specified). + +\membersection{wxCommandProcessor::IsDirty}\label{wxcommandprocessorisdirty} + +\func{virtual bool}{IsDirty}{\void} + +Returns a boolean value that indicates if changes have been made since +the last save operation. This only works if +\helpref{wxCommandProcessor::MarkAsSaved}{wxcommandprocessormarkassaved} +is called whenever the project is saved. + + +\membersection{wxCommandProcessor::MarkAsSaved}\label{wxcommandprocessormarkassaved} + +\func{virtual void}{MarkAsSaved}{\void} + +You must call this method whenever the project is saved if you plan to use +\helpref{wxCommandProcessor::IsDirty}{wxcommandprocessorisdirty}. + + \membersection{wxCommandProcessor::SetEditMenu}\label{wxcommandprocessorseteditmenu} \func{void}{SetEditMenu}{\param{wxMenu* }{menu}} @@ -111,6 +147,7 @@ menu as appropriate. Set this to NULL if the menu is about to be destroyed and command operations may still be performed, or the command processor may try to access an invalid pointer. + \membersection{wxCommandProcessor::SetMenuStrings}\label{wxcommandprocessorsetmenustrings} \func{void}{SetMenuStrings}{\void} @@ -118,18 +155,21 @@ processor may try to access an invalid pointer. Sets the menu labels according to the currently set menu and the current command state. + \membersection{wxCommandProcessor::SetRedoAccelerator}\label{wxcommandprocessorsetredoaccelerator} \func{void}{SetRedoAccelerator}{\param{const wxString\&}{accel}} Sets the string that will be appended to the Redo menu item. + \membersection{wxCommandProcessor::SetUndoAccelerator}\label{wxcommandprocessorsetundoaccelerator} \func{void}{SetUndoAccelerator}{\param{const wxString\&}{accel}} Sets the string that will be appended to the Undo menu item. + \membersection{wxCommandProcessor::Submit}\label{wxcommandprocessorsubmit} \func{virtual bool}{Submit}{\param{wxCommand *}{command}, \param{bool}{ storeIt = true}} @@ -144,6 +184,7 @@ be deleted directly by the application. {\it storeIt} indicates whether the successful command should be stored in the history list. + \membersection{wxCommandProcessor::Undo}\label{wxcommandprocessorundo} \func{virtual bool}{Undo}{\void}