#ifndef ROOT_TQCommand
#define ROOT_TQCommand
#ifndef ROOT_TList
#include "TList.h"
#endif
#ifndef ROOT_TQObject
#include "TQObject.h"
#endif
class TQCommand : public TList, public TQObject {
friend class TQUndoManager;
protected:
TQConnection *fRedo;
TQConnection *fUndo;
Long_t *fRedoArgs;
Long_t *fUndoArgs;
Int_t fNRargs;
Int_t fNUargs;
Int_t fState;
Int_t fStatus;
Bool_t fNewDelete;
TString fName;
TString fTitle;
void *fObject;
virtual void Init(const char *cl, void *object,
const char *redo, const char *undo);
virtual void PrintCollectionHeader(Option_t* option) const;
public:
TQCommand(const char *cl = 0, void *object = 0,
const char *redo = 0, const char *undo = 0);
TQCommand(TObject *obj, const char *redo = 0, const char *undo = 0);
TQCommand(const TQCommand &com);
virtual ~TQCommand();
virtual void Redo(Option_t *option="");
virtual void Undo(Option_t *option="");
virtual void SetArgs(Int_t nargs, ...);
virtual void SetUndoArgs(Int_t nargs, ...);
virtual void SetRedoArgs(Int_t nargs, ...);
virtual Bool_t CanMerge(TQCommand *c) const;
virtual void Merge(TQCommand *c);
virtual Bool_t CanCompress(TQCommand *c) const;
virtual void Compress(TQCommand *c);
virtual Bool_t IsEqual(const TObject* obj) const;
virtual Bool_t IsSetter() const;
virtual Bool_t CanRedo() const;
virtual Bool_t CanUndo() const;
const char *GetRedoName() const;
const char *GetUndoName() const;
TQConnection *GetRedo() const { return fRedo; }
TQConnection *GetUndo() const { return fUndo; }
Long_t *GetRedoArgs() const;
Long_t *GetUndoArgs() const;
Int_t GetNRargs() const;
Int_t GetNUargs() const;
void *GetObject() const;
Int_t GetStatus() const;
Bool_t IsMacro() const;
Bool_t IsUndoing() const;
Bool_t IsRedoing() const;
Bool_t IsExecuting() const;
virtual void SetName(const char *name);
virtual void SetTitle(const char *title);
virtual void ls(Option_t *option="") const;
virtual void Add(TObject *obj, Option_t *opt);
virtual void Add(TObject *obj) { Add(obj, 0); }
virtual void Delete(Option_t *option="");
virtual const char *GetName() const;
virtual const char *GetTitle() const;
static TQCommand *GetCommand();
ClassDef(TQCommand,0)
};
class TQUndoManager : public TQCommand {
protected:
TObjLink *fCursor;
TQCommand *fCurrent;
UInt_t fLimit;
TList *fLogBook;
Bool_t fLogging;
virtual void PrintCollectionEntry(TObject* entry, Option_t* option, Int_t recurse) const;
public:
TQUndoManager();
virtual ~TQUndoManager();
virtual void Add(TObject *obj, Option_t *opt);
virtual void Add(TObject *obj) { Add(obj, 0); }
virtual void Redo(Option_t *option="");
virtual void Undo(Option_t *option="");
virtual Bool_t CanRedo() const;
virtual Bool_t CanUndo() const;
virtual void SetLogging(Bool_t on = kTRUE);
Bool_t IsLogging() const;
TQCommand *GetCurrent() const;
TQCommand *GetCursor() const;
UInt_t GetLimit() const;
virtual void SetLimit(UInt_t limit);
virtual void CurrentChanged(TQCommand *c);
virtual void ls(Option_t *option="") const;
ClassDef(TQUndoManager,0)
};
#endif
Last change: Wed Aug 13 08:19:45 2008
Last generated: 2008-08-13 08:19
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.