12 #ifndef ROOT_TRecorder
13 #define ROOT_TRecorder
121 #ifndef ROOT_Riostream
124 #ifndef ROOT_TApplication
133 #ifndef ROOT_TGClient
142 #ifndef ROOT_THashList
237 std::cout <<
GetText() << std::endl;
832 #endif // ROOT_TRecorder
void RegisterWindow(Window_t w)
This method is called when RegisteredWindow(Window_t) is emitted from TGClient.
void RecordCmdEvent(const char *line)
Records commandline event (text and time) ans saves the previous commandline event This 1 event delay...
TGPictureButton * fReplay
TRecorder & operator=(const TRecorder &)
TRecExtraEvent * fExtraEvent
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
Process a single command line, either a C++ statement or an interpreter command starting with a "...
void CopyEvent(Event_t *e, Window_t wid)
Copies all items of given event to fGuiEvent.
void RecordText(const TObject *obj)
Records TLatex object created in TCreatePrimitives::Text()
void FilterEventPave()
Change the state of the flag to kTRUE when you are recording a pavelabel.
void ListGui(const char *filename)
Prints out recorded GUI events.
static long DisplayValid(Long_t n)
void RecordExtraEvent(TString line, TTime extTime)
Records TLatex or TPaveLabel object created in TCreatePrimitives, ExtTime is needed for the correct r...
virtual void ListCmd(const char *)
TGRecorder(const TGWindow *p=0, UInt_t w=230, UInt_t h=150)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TGCheckButton * fCursorCheckBox
void ChangeState(TRecorder *r, TRecorderState *s, Bool_t deletePreviousState)
static const char * filename()
virtual void Pause(TRecorder *)
virtual TTime GetTime() const
TSeqCollection * fCollect
virtual Bool_t Replay(TRecorder *, const char *, Bool_t, TRecorder::EReplayModes)
virtual void SetTime(TTime t)
R__EXTERN TApplication * gApplication
Bool_t FilterEvent(TRecGuiEvent *e)
Basic time type with millisecond precision.
virtual TRecorder::ERecorderState GetState() const
void Start(const char *filename, Option_t *option="RECREATE", Window_t *w=0, Int_t winCount=0)
Starts recording events.
TRecWinPair(Window_t key, Window_t value)
void RecordPave(const TObject *obj)
Records TPaveLabel object created in TCreatePrimitives::Pave()
TRecorderPaused(TRecorderReplaying *state)
virtual void ReplayStop(TRecorder *)
virtual void ReplayStop(TRecorder *r)
Replaying is cancelled.
TRecorderReplaying * fReplayingState
const char * Data() const
virtual void Start(TRecorder *, const char *, Option_t *, Window_t *, Int_t)
Sequenceable collection abstract base class.
void Update()
Called when fTimer timeouts (every 0.025 second) Updates GUI of recorder.
#define ClassDef(name, id)
TRecorder()
Creates initial INACTIVE state for the recorder.
virtual void Stop(TRecorder *, Bool_t)
void RecordGuiCNEvent(Event_t *e)
Records GUI Event_t *e of type kConfigureNotify.
virtual ERecEventType GetType() const
void RecordMousePosition()
Try to record all mouse moves...
virtual void ListGui(const char *filename)
Prints out GUI events recorded in given file.
void Replay()
Handles push of fReplay button according to the current recorder state.
Bool_t Initialize(TRecorder *r, Bool_t showMouseCursor, TRecorder::EReplayModes mode)
Initialization of data structures for replaying.
void ListCmd(const char *filename)
Prints out recorded commandline events.
TRecExtraEvent * fExtraEvent
TRecorderRecording(TRecorder *r, const char *filename, Option_t *option, Window_t *w, Int_t winCount)
virtual ERecEventType GetType() const
virtual ~TGRecorder()
Destructor. Cleanup the GUI.
virtual TRecorder::ERecorderState GetState() const
virtual TRecorder::ERecorderState GetState() const
void SetText(const char *text)
Using a TBrowser one can browse all ROOT objects.
virtual TRecorder::ERecorderState GetState() const
virtual Bool_t Replay(TRecorder *r, const char *filename, Bool_t showMouseCursor, TRecorder::EReplayModes mode)
Switches from INACTIVE state of recorder to REPLAYING Return kTRUE if replaying has started or kFALSE...
const char * GetText() const
virtual void Stop(TRecorder *r, Bool_t guiCommand)
Disconnects all slots and stopps recording.
void Resume()
Resumes replaying.
void ChangeState(TRecorderState *newstate, Bool_t deletePreviousState=kTRUE)
Changes state from the current to the passed one (newstate) Deletes the old state if delPreviousState...
void RegisterWindow(Window_t w)
Creates mapping for the newly registered window w and adds this mapping to fWindowList.
void SetTypeOfConfigureNotify(Event_t *e)
Sets type of kConfigureNotify event to one of EConfigureNotify.
virtual void Continue()
Continues previously paused replaying.
static void DumpRootEvent(TRecGuiEvent *e, Int_t n)
Prints out attributes of one GUI event TRecGuiEvent *e Int_n n is number of event if called in cycle...
void ReplayRealtime()
Replays the next event.
virtual ~TRecorderState()
Handles synchronous and a-synchronous timer events.
virtual ~TRecorderInactive()
virtual ~TRecorderPaused()
virtual ERecEventType GetType() const =0
Bool_t PrepareNextEvent()
Finds the next event in log file to replay and sets it to fNextEvent.
static const Int_t fgWidgetsCount
void PrevCanvases(const char *filename, Option_t *option)
Save previous canvases in a .root file.
void RecordGuiEvent(Event_t *e, Window_t wid)
Records GUI Event_t *e different from kConfigureNotify (they are recorded in TRecorderRecording::Reco...
virtual void ReplayEvent(Bool_t showMouseCursor=kTRUE)=0
TRecorderState * fRecorderState
virtual void ListCmd(const char *filename)
Prints out commandline events recorded in given file.
void StartStop()
Handles push of the fStartStop button according to the current recorder state.
unsigned long long ULong64_t
void RecordGuiBldEvent(Event_t *e)
Special case for the gui builder, having a timer handling some of the events.
void ReplayStop()
Cancells replaying.
void SetDefault()
Sets GUI to the default inactive state.
virtual void Start(TRecorder *r, const char *filename, Option_t *option, Window_t *w=0, Int_t winCount=0)
void StartEditing()
Memorize the starting time of editinga TLatex or a TPaveLabel.
Mother of all ROOT objects.
Window_t fFilteredIds[fgWidgetsCount]
virtual void ReplayEvent(Bool_t)
Bool_t StartRecording()
Connects appropriate signals and slots in order to gain all registered windows and processed events i...
virtual void PrevCanvases(const char *, Option_t *)
void Stop(Bool_t guiCommand=kFALSE)
Stopps recording events.
virtual void ReplayStop(TRecorder *r)
Cancels replaying.
virtual void Resume(TRecorder *)
Bool_t IsFiltered(Window_t id)
Returns kTRUE if passed id belongs to window IDs of recorder GUI itself.
virtual void Resume(TRecorder *r)
Continues replaying.
static Event_t * CreateEvent(TRecGuiEvent *ge)
Converts TRecGuiEvent type to Event_t type.
virtual ~TRecorderReplaying()
Closes all signal-slot connections Frees all memory allocated in contructor.
void Pause()
Pauses replaying.
virtual ~TRecorder()
Destructor.
A TTree object has a header with a name and a title.
virtual void ListGui(const char *)
virtual TRecorder::ERecorderState GetState() const =0
virtual void Pause(TRecorder *r)
Pauses replaying.
virtual void ReplayEvent(Bool_t showMouseCursor=kTRUE)
virtual ~TRecorderRecording()
Freeing of allocated memory.
virtual TRecorder::ERecorderState GetState() const
Get current state of recorder.
TGPictureButton * fStartStop
void PrevCanvases(const char *filename, Option_t *option)
Save previous canvases in a .root file.
void Browse(TBrowser *)
Browse the recorder from a ROOT file.
Bool_t RemapWindowReferences()
All references to the old windows (IDs) in fNextEvent are replaced by new ones according to the mappi...
TRecorderReplaying(const char *filename)
Bool_t CanOverlap()
ButtonPress and ButtonRelease must be sometimes replayed more times Example: pressing of a button ope...