12 #ifndef ROOT_TQCommand 13 #define ROOT_TQCommand 47 virtual void Init(
const char *cl,
void *
object,
48 const char *redo,
const char *undo);
55 TQCommand(
const char *cl = 0,
void *
object = 0,
56 const char *redo = 0,
const char *undo = 0);
90 virtual void SetTitle(
const char *title);
95 virtual const char *
GetName()
const;
96 virtual const char *
GetTitle()
const;
131 virtual void SetLimit(
UInt_t limit);
virtual void Add(TObject *obj)
virtual void Add(TObject *obj)
virtual void SetUndoArgs(Int_t nargs,...)
Set undo parameters.
virtual void Merge(TQCommand *c)
Add command to the list of merged commands.
Long_t * GetUndoArgs() const
Returns a pointer to array of undo arguments.
Bool_t IsUndoing() const
Undo action is in progress.
Bool_t IsRedoing() const
Redo action is in progress.
const char * GetUndoName() const
Returns the name of undo command.
virtual void Compress(TQCommand *c)
Compress command.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www...
Long_t * GetRedoArgs() const
Returns a pointer to array of redo arguments.
virtual Bool_t CanMerge(TQCommand *c) const
Two commands can be merged if they can be composed into a single command (Macro command).
virtual void Init(const char *cl, void *object, const char *redo, const char *undo)
Common protected method used in several constructors.
TQConnection * GetRedo() const
virtual Bool_t IsEqual(const TObject *obj) const
Equal comparison.
virtual Bool_t IsSetter() const
Returns kTRUE is command if Redo is the same as Undo function and is the setter action.
virtual Bool_t CanRedo() const
Returns kTRUE if Redo action is possible, kFALSE if it's not.
virtual ~TQCommand()
dtor.
virtual void Redo(Option_t *option="")
Execute command and then merge commands.
TQConnection * GetUndo() const
Int_t GetNRargs() const
Returns a number of redo arguments.
Int_t GetNUargs() const
Returns a number of undo arguments.
virtual void SetArgs(Int_t nargs,...)
Set do/redo and undo parameters.
#define ClassDef(name, id)
virtual void PrintCollectionEntry(TObject *entry, Option_t *option, Int_t recurse) const
Print the collection entry.
TQCommand(const char *cl=0, void *object=0, const char *redo=0, const char *undo=0)
Constructor.
Bool_t IsExecuting() const
Returns kTRUE if command execution is in progress.
void * GetObject() const
Returns an object for which undo redo actions are applied.
TQConnection class is an internal class, used in the object communication mechanism.
Collection abstract base class.
TQCommand & operator=(const TQCommand &)
virtual Bool_t CanCompress(TQCommand *c) const
By default, commands can be compressed if they are:
virtual void Delete(Option_t *option="")
If "opt" is not zero delete every merged command which option string is equal to "opt".
Int_t GetStatus() const
Returns a number of sequential undo or redo operations.
virtual Bool_t CanUndo() const
Returns kTRUE if Undo action is possible, kFALSE if it's not.
friend class TQUndoManager
virtual void SetTitle(const char *title)
Sets description of the command.
virtual void ls(Option_t *option="") const
ls this command and merged commands
Bool_t IsMacro() const
Returns kTRUE if neither redo nor undo action specified.
Wrapper around a TObject so it can be stored in a TList.
virtual void SetName(const char *name)
Sets name of the command.
virtual void Add(TObject *obj, Option_t *opt)
Add command to the list of merged commands.
virtual const char * GetTitle() const
Returns command description.
virtual void SetRedoArgs(Int_t nargs,...)
Set redo parameters.
virtual void Undo(Option_t *option="")
Un-execute all merged commands and the command.
Mother of all ROOT objects.
Recorder of operations for undo and redo.
static TQCommand * GetCommand()
Return a command which is doing redo/undo action.
virtual const char * GetName() const
Returns the command name.
The Command design pattern is based on the idea, that all editing in an application is done by creati...
const char * GetRedoName() const
Returns the name of redo command.
virtual void PrintCollectionHeader(Option_t *option) const
Print collection header.