180 class TGCursorWindow :
public TGFrame {
187 virtual ~TGCursorWindow();
197 TGCursorWindow::TGCursorWindow() :
205 gVirtualX->ShapeCombineMask(fId, 0, 0, fMask);
206 SetBackgroundPixmap(fPic);
212 gVirtualX->ChangeWindowAttributes(fId, &wattr);
218 TGCursorWindow::~TGCursorWindow()
241 if ((opt ==
"NEW") || (opt ==
"RECREATE"))
242 Start(filename, option);
336 if (delPreviousState)
373 fEventReplayed =
kTRUE;
375 fExtraTreeCounter = 0;
376 fFilterStatusBar =
kFALSE;
382 fShowMouseCursor =
kTRUE;
383 fWaitingForWindow =
kFALSE;
391 fWindowList =
new TList();
395 gCursorWin =
new TGCursorWindow();
404 fTimer->Disconnect(fTimer,
"Timeout()",
this,
"ReplayRealtime()");
409 "RegisterWindow(Window_t)");
422 gCursorWin->DeleteWindow();
440 fExtraTreeCounter = 0;
444 fFilterStatusBar =
kFALSE;
446 fWaitingForWindow =
kFALSE;
451 fShowMouseCursor = showMouseCursor;
453 if (!fFile || fFile->IsZombie() || !fFile->IsOpen())
461 if (!fCmdTree || !fWinTree || ! fGuiTree || ! fExtraTree) {
462 Error(
"TRecorderReplaying::Initialize",
463 "The ROOT file is not valid event logfile.");
468 fCmdTree->SetBranchAddress(
kBranchName, &fCmdEvent);
470 fGuiTree->SetBranchAddress(
kBranchName, &fGuiEvent);
471 fExtraTree->SetBranchAddress(
kBranchName, &fExtraEvent);
474 Error(
"TRecorderReplaying::Initialize",
475 "The ROOT file is not valid event logfile");
480 if (!PrepareNextEvent()) {
481 Info(
"TRecorderReplaying::Initialize",
482 "Log file empty. No event to replay.");
487 fWinTreeEntries = fWinTree->GetEntries();
491 gClient->Connect(
"RegisteredWindow(Window_t)",
"TRecorderReplaying",
492 this,
"RegisterWindow(Window_t)");
494 Info(
"TRecorderReplaying::Initialize",
"Replaying of file %s started",
498 if (f && !f->IsZombie()) {
499 TIter nextkey(f->GetListOfKeys());
502 while ((key = (
TKey*)nextkey())) {
503 fFilterStatusBar =
kTRUE;
504 obj = key->ReadObj();
512 while ((canvas = (
TCanvas*)nextc())) {
516 fFilterStatusBar =
kFALSE;
522 fTimer->Connect(
"Timeout()",
"TRecorderReplaying",
this,
"ReplayRealtime()");
541 if (fFilterStatusBar) {
545 fFilterStatusBar =
kFALSE;
552 if (fWinTreeEntries > fRegWinCounter) {
553 fWinTree->GetEntry(fRegWinCounter);
558 Error(
"TRecorderReplaying::RegisterWindow",
559 "More windows registered than expected");
564 if ((
gDebug > 0) && (fWaitingForWindow)) {
565 std::ios::fmtflags
f = std::cout.flags();
566 std::cout <<
" Window registered: new ID: " << std::hex << w <<
567 " previous ID: " << fWin << std::dec << std::endl;
568 std::cout.flags( f );
580 fWindowList->Add(ids);
584 if (fWaitingForWindow && fGuiEvent->fWindow == fWin) {
587 std::ios::fmtflags
f = std::cout.flags();
588 std::cout <<
" Window " << std::hex << fGuiEvent->fWindow <<
589 " registered." << std::dec << std::endl;
590 std::cout.flags( f );
593 fNextEvent = fGuiEvent;
595 fWaitingForWindow =
kFALSE;
620 if (!found && fGuiEvent->fWindow == 0) {
621 fGuiEvent->fWindow =
gVirtualX->GetDefaultRootWindow();
624 else if (!found && ids->
fKey == fGuiEvent->fWindow) {
625 fGuiEvent->fWindow = ids->
fValue;
628 for (
Int_t i = 0; i < 5; ++i) {
629 if ((
Long_t) ids->
fKey == fGuiEvent->fUser[i])
630 fGuiEvent->fUser[i] = ids->
fValue;
632 if (fGuiEvent->fMasked && ids->
fKey == fGuiEvent->fMasked) {
633 fGuiEvent->fMasked = ids->
fValue;
637 if (!found && fGuiEvent->fWindow == 0) {
638 fGuiEvent->fWindow =
gVirtualX->GetDefaultRootWindow();
649 std::ios_base::fmtflags org_flags = std::cout.flags();
650 std::cout <<
"fGuiTreeCounter = " << std::dec << fGuiTreeCounter <<
651 " No mapping found for ID " << std::hex << fGuiEvent->fWindow << std::endl;
654 std::cout.flags(org_flags);
659 fWaitingForWindow =
kTRUE;
730 if (fCmdTree->GetEntries() > fCmdTreeCounter)
731 fCmdTree->GetEntry(fCmdTreeCounter);
734 if (fExtraTree->GetEntries() > fExtraTreeCounter)
735 fExtraTree->GetEntry(fExtraTreeCounter);
739 while (fGuiTree->GetEntries() > fGuiTreeCounter) {
740 fGuiTree->GetEntry(fGuiTreeCounter);
741 if (!fGuiEvent || !FilterEvent(fGuiEvent))
747 if (fCmdEvent && fGuiEvent && fExtraEvent) {
750 if ((fCmdEvent->GetTime() <= fGuiEvent->GetTime()) &&
751 (fCmdEvent->GetTime() <= fExtraEvent->GetTime()))
752 fNextEvent = fCmdEvent;
754 if (fGuiEvent->GetTime() <= fExtraEvent->GetTime())
755 fNextEvent = fGuiEvent;
757 fNextEvent = fExtraEvent;
760 else if (fCmdEvent && fGuiEvent) {
763 if (fCmdEvent->GetTime() <= fGuiEvent->GetTime())
764 fNextEvent = fCmdEvent;
766 fNextEvent = fGuiEvent;
768 else if (fCmdEvent && fExtraEvent ) {
771 if (fCmdEvent->GetTime() <= fExtraEvent->GetTime())
772 fNextEvent = fCmdEvent;
774 fNextEvent = fExtraEvent;
776 else if (fGuiEvent && fExtraEvent) {
779 if (fExtraEvent->GetTime() <= fGuiEvent->GetTime())
780 fNextEvent = fExtraEvent;
782 fNextEvent = fGuiEvent;
786 else if (!fCmdEvent && !fGuiEvent && !fExtraEvent)
790 fNextEvent = fGuiEvent;
793 fNextEvent = fCmdEvent;
795 fNextEvent = fExtraEvent;
802 if (fNextEvent == fCmdEvent)
806 if (fNextEvent == fExtraEvent)
810 if (fNextEvent == fGuiEvent) {
812 if (RemapWindowReferences())
830 Error(
"TRecorderReplaying::CanOverlap()",
"fGuiEvent = 0");
840 std::cout <<
"Event overlapping " <<
878 gROOT->SetEditorMode();
890 if (!fEventReplayed && !CanOverlap())
900 fPreviousEventTime = fNextEvent->GetTime();
907 gVirtualX->LookupString(e, str,
sizeof(str), keysym);
909 if ((keysym & ~0x20) ==
kKey_S) {
919 fNextEvent->ReplayEvent(fShowMouseCursor);
926 if (!PrepareNextEvent()) {
930 Info(
"TRecorderReplaying::ReplayRealtime",
"Replaying finished");
941 fTimer->Start(
Long_t(fNextEvent->GetTime() - fPreviousEventTime));
952 Info(
"TRecorderReplaying::Pause",
"Replaying paused.");
960 Info(
"TRecorderReplaying::ReplayStop",
"Replaying cancelled");
970 fTimer->Start(
Long_t(fNextEvent->GetTime() - fPreviousEventTime));
1014 if (replay->
Initialize(r, showMouseCursor, mode)) {
1045 Error(
"TRecorderInactive::List",
1046 "The ROOT file is not valid event logfile.");
1055 for (
Int_t i = 0; i < entries; ++i) {
1057 std::cout <<
"[" << i <<
"] " <<
"fTime=" <<
1059 fCmdEvent->
GetText() << std::endl;
1061 std::cout << std::endl;
1088 Error(
"TRecorderInactive::ListGui",
1089 "The ROOT file is not valid event logfile.");
1099 for (
Int_t i = 0; i < entries ; ++i) {
1101 DumpRootEvent(guiEvent, i);
1114 std::ios::fmtflags
f = std::cout.flags();
1115 std::cout <<
"[" << n <<
"] " << std::dec << std::setw(10)
1117 <<
" fW:" << std::hex << e->
fWindow 1118 <<
" t:" << std::dec << e->
fTime 1119 <<
" x:" << DisplayValid(e->
fX)
1120 <<
" y:" << DisplayValid(e->
fY)
1121 <<
" fXR:" << DisplayValid(e->
fXRoot)
1122 <<
" fYR:" << DisplayValid(e->
fYRoot)
1123 <<
" c:" << DisplayValid(e->
fCode)
1124 <<
" s:" << DisplayValid(e->
fState)
1125 <<
" w:" << DisplayValid(e->
fWidth)
1126 <<
" h:" << DisplayValid(e->
fHeight)
1127 <<
" cnt:" << DisplayValid(e->
fCount)
1130 <<
" fF:" << DisplayValid(e->
fFormat)
1133 for (
Int_t i=0; i<5; ++i)
1134 if (DisplayValid(e->
fUser[i]) != -1)
1135 std::cout <<
"[" << i <<
"]=" << DisplayValid(e->
fUser[i]);
1138 std::cout <<
" | fM:" << std::hex << e->
fMasked;
1140 std::cout << std::endl;
1141 std::cout.flags( f );
1149 fCollect =
gROOT->GetListOfCanvases();
1168 fReplayingState = state;
1176 fReplayingState->Continue();
1177 Info(
"TRecorderPaused::Resume",
"Replaying resumed");
1188 delete fReplayingState;
1190 Info(
"TRecorderReplaying::ReplayStop",
"Reaplying cancelled");
1213 fFilteredIdsCount = winCount;
1214 fFilteredIds =
new Window_t[fFilteredIdsCount];
1215 for(
Int_t i=0; i < fFilteredIdsCount; ++i)
1216 fFilteredIds[i] = w[i];
1219 fCmdEventPending =
kFALSE;
1222 fFilterEventPave =
kFALSE;
1231 fMouseTimer->Connect(
"Timeout()",
"TRecorderRecording",
this,
1232 "RecordMousePosition()");
1254 delete[] fFilteredIds;
1271 if (!fFile || fFile->IsZombie() || !fFile->IsOpen())
1277 this,
"RecordCmdEvent(const char*)");
1281 gClient->Connect(
"RegisteredWindow(Window_t)",
"TRecorderRecording",
this,
1282 "RegisterWindow(Window_t)");
1287 gClient->Connect(
"ProcessedEvent(Event_t*, Window_t)",
"TRecorderRecording",
1288 this,
"RecordGuiEvent(Event_t*, Window_t)");
1293 "TRecorderRecording",
this,
"RecordGuiCNEvent(Event_t*)");
1298 this,
"RecordPave(const TObject*)");
1302 "TRecorderRecording",
this,
"RecordText(const TObject*)");
1307 "FilterEventPave()");
1316 "TRecorderRecording",
this,
"RecordGuiBldEvent(Event_t*)");
1321 fCmdTree->Branch(
kBranchName,
" TRecCmdEvent", &fCmdEvent);
1322 fGuiTree->Branch(
kBranchName,
"TRecGuiEvent", &fGuiEvent);
1323 fExtraTree->Branch(
kBranchName,
"TRecExtraEvent", &fExtraEvent);
1325 Int_t numCanvases =
gROOT->GetListOfCanvases()->LastIndex();
1327 if (numCanvases >= 0){
1333 while ((twin = (
TGWindow*) nextwindow())) {
1335 if (IsFiltered(twin2)) {
1337 std::cout <<
"WindowID "<< twin2 <<
" filtered" << std::endl;
1340 else if (twin !=
gClient->GetRoot()) {
1341 RegisterWindow(twin2);
1352 fMouseTimer->Start(50);
1354 Info(
"TRecorderRecording::StartRecording",
"Recording started. Log file: %s",
1366 "RecordGuiBldEvent(Event_t*)");
1368 "RecordGuiCNEvent(Event_t*)");
1370 "RecordPave(const TObject*)");
1372 "RecordText(const TObject*)");
1375 gClient->Disconnect(
gClient,
"ProcessedEvent(Event_t*, Window_t)",
this,
1376 "RecordGuiEvent(Event_t*, Window_t)");
1378 "RegisterWindow(Window_t)");
1380 "RecordCmdEvent(const char*)");
1384 if (fCmdEventPending && guiCommand)
1387 fRecorder->Write(
"recorder");
1392 fMouseTimer->TurnOff();
1394 Info(
"TRecorderRecording::Stop",
"Recording finished.");
1419 if (fCmdEventPending)
1424 fCmdEvent->SetTime(fTimer->GetAbsTime());
1425 fCmdEvent->SetText((
char*)line);
1429 fCmdEventPending =
kTRUE;
1448 if (fFilteredIdsCount && IsFiltered(e->
fWindow))
1452 if (fFilterEventPave && (e->
fCode == 1)) {
1453 fFilterEventPave =
kFALSE;
1456 fFilterEventPave =
kFALSE;
1468 fGuiEvent->SetTime(fTimer->GetAbsTime());
1487 fGuiEvent->SetTime(fTimer->GetAbsTime());
1518 RecordGuiEvent(&ev, 0);
1519 fMouseTimer->Reset();
1530 if (fFilteredIdsCount && IsFiltered(e->
fWindow))
1535 SetTypeOfConfigureNotify(e);
1541 fGuiEvent->SetTime(fTimer->GetAbsTime());
1559 cad =
"TPaveLabel *p = new TPaveLabel(";
1560 cad += pavel->
GetX1();
1562 cad += pavel->
GetY1();
1564 cad += pavel->
GetX2();
1566 cad += pavel->
GetY2();
1567 cad +=
",\"\"); p->Draw(); gPad->Modified(); gPad->Update();";
1569 interval /= (len + 2);
1570 RecordExtraEvent(cad, extratime);
1571 for (i=0; i < len; ++i) {
1572 cad =
"p->SetLabel(\"";
1573 cad += (aux += label[i]);
1576 cad +=
" p->SetTextFont(83); p->SetTextSizePixels(14); ";
1578 cad +=
" gPad->Modified(); gPad->Update();";
1579 extratime += interval;
1580 RecordExtraEvent(cad, extratime);
1582 cad =
"p->SetTextFont(";
1584 cad +=
"); p->SetTextSize(";
1586 cad +=
"); gPad->Modified(); gPad->Update();";
1587 extratime += interval;
1588 RecordExtraEvent(cad, extratime);
1603 cad =
"TLatex *l = new TLatex(";
1604 cad += texto->
GetX();
1606 cad += texto->
GetY();
1607 cad +=
",\"\"); l->Draw(); gPad->Modified(); gPad->Update();";
1609 interval /= (len + 2);
1610 RecordExtraEvent(cad, extratime);
1611 for (i=0; i < len; ++i) {
1612 cad =
"l->SetTitle(\"";
1613 cad += (aux += label[i]);
1616 cad +=
" l->SetTextFont(83); l->SetTextSizePixels(14); ";
1618 cad +=
" gPad->Modified(); gPad->Update();";
1619 extratime += interval;
1620 RecordExtraEvent(cad, extratime);
1622 cad =
"l->SetTextFont(";
1624 cad +=
"); l->SetTextSize(";
1626 cad +=
"); gPad->Modified(); gPad->Update();";
1627 cad +=
" TVirtualPad *spad = gPad->GetCanvas()->GetSelectedPad();";
1628 cad +=
" gPad->GetCanvas()->Selected(spad, l, kButton1Down);";
1629 extratime += interval;
1630 RecordExtraEvent(cad, extratime);
1638 fFilterEventPave =
kTRUE;
1646 fBeginPave = fTimer->GetAbsTime();
1655 fExtraEvent->SetTime(extTime);
1656 fExtraEvent->SetText(line);
1665 fGuiEvent->fType = e->
fType;
1666 fGuiEvent->fWindow = e->
fWindow;
1667 fGuiEvent->fTime = e->
fTime;
1669 fGuiEvent->fX = e->
fX;
1670 fGuiEvent->fY = e->
fY;
1671 fGuiEvent->fXRoot = e->
fXRoot;
1672 fGuiEvent->fYRoot = e->
fYRoot;
1674 fGuiEvent->fCode = e->
fCode;
1675 fGuiEvent->fState = e->
fState;
1677 fGuiEvent->fWidth = e->
fWidth;
1678 fGuiEvent->fHeight = e->
fHeight;
1680 fGuiEvent->fCount = e->
fCount;
1682 fGuiEvent->fHandle = e->
fHandle;
1683 fGuiEvent->fFormat = e->
fFormat;
1688 for(
Int_t i=0; i<5; ++i)
1689 fGuiEvent->fUser[i] = e->
fUser[i];
1697 gVirtualX->LookupString(e, tmp,
sizeof(tmp), keysym);
1698 fGuiEvent->fCode = keysym;
1701 fGuiEvent->fMasked = wid;
1709 for(
Int_t i=0; i < fFilteredIdsCount; ++i)
1710 if (
id == fFilteredIds[i])
1730 if ((e->
fX == 0 && e->
fY == 0)) {
1784 fFilteredIds[0] = GetId();
1789 fFilteredIds[1] = hframe->
GetId();
1795 fFilteredIds[2] = vframe->
GetId();
1802 fFilteredIds[3] = fStatusLabel->
GetId();
1809 fFilteredIds[4] = fTimeLabel->
GetId();
1815 fFilteredIds[5] = vframe->
GetId();
1817 fStatus =
new TGLabel(vframe,
"Inactive");
1818 fStatus->SetTextColor(0x7cffff);
1819 fStatus->SetBackgroundColor((
Pixel_t)0x000000);
1822 fFilteredIds[6] = fStatus->GetId();
1824 fTimeDisplay =
new TGLabel(vframe,
"00:00:00");
1825 fTimeDisplay->SetTextColor(0x7cffff);
1826 fTimeDisplay->SetTextFont(
"Helvetica -34",
kFALSE);
1827 fTimeDisplay->SetBackgroundColor((
Pixel_t)0x000000);
1830 fFilteredIds[7] = fTimeDisplay->GetId();
1838 fFilteredIds[8] = hframe->
GetId();
1843 fStartStop->Connect(
"Clicked()",
"TGRecorder",
this,
"StartStop()");
1846 fStartStop->Resize(40,40);
1847 fFilteredIds[9] = fStartStop->GetId();
1852 fReplay->Connect(
"Clicked()",
"TGRecorder",
this,
"Replay()");
1855 fReplay->Resize(40,40);
1856 fFilteredIds[10] = fReplay->GetId();
1859 fCursorCheckBox =
new TGCheckButton(
this,
"Show mouse cursor");
1861 fFilteredIds[11] = fCursorCheckBox->GetId();
1865 fTimer->Connect(
"Timeout()",
"TGRecorder",
this,
"Update()");
1869 SetEditDisabled(kEditDisable | kEditDisableGrab);
1870 SetWindowName(
"ROOT Event Recorder");
1883 fTimeDisplay->SetText(
"00:00:00");
1885 fReplay->SetPicture(
gClient->GetPicture(
"replay.png"));
1886 fReplay->SetEnabled(
kTRUE);
1888 fCursorCheckBox->SetEnabled(
kTRUE);
1889 fCursorCheckBox->SetOn(
kTRUE);
1891 fStartStop->SetPicture(
gClient->GetPicture(
"record.png"));
1892 fStartStop->SetEnabled(
kTRUE);
1905 time_t elapsed_time = (time_t)difftime( fElapsed, fStart );
1906 running = gmtime( &elapsed_time );
1908 switch(fRecorder->GetState()) {
1918 fStatus->SetText(
"Replaying");
1920 fStatus->SetText(
"Recording");
1921 stime.
Form(
"%02d:%02d:%02d", running->tm_hour,
1922 running->tm_min, running->tm_sec);
1923 fTimeDisplay->SetText(stime.
Data());
1927 fStatus->SetText(
"Waiting...");
1928 fStatus->SetTextColor((
Pixel_t)0xff0000);
1931 fStatus->SetTextColor((
Pixel_t)0x7cffff);
1934 fTimeDisplay->Resize();
1945 fStatus->SetText(
"Inactive");
1946 fStatus->SetTextColor((
Pixel_t)0x7cffff);
1964 "All files",
"*",
"Text files",
"*.txt",
"ROOT files",
"*.root", 0, 0
1968 switch(fRecorder->GetState()) {
1982 if (!
gROOT->GetListOfCanvases()->IsEmpty()) {
1983 fRecorder->PrevCanvases(fi.
fFilename,
"RECREATE");
1984 fRecorder->Start(fi.
fFilename,
"UPDATE", fFilteredIds,
1988 fRecorder->Start(fi.
fFilename,
"RECREATE", fFilteredIds,
1991 fCursorCheckBox->SetDisabledAndSelected(
kTRUE);
1992 fStartStop->SetPicture(
gClient->GetPicture(
"stop.png"));
1993 fReplay->SetEnabled(
kFALSE);
2001 fRecorder->Stop(
kTRUE);
2007 fStartStop->SetPicture(
gClient->GetPicture(
"replay.png"));
2012 fRecorder->Resume();
2013 fStartStop->SetPicture(
gClient->GetPicture(
"pause.png"));
2029 switch(fRecorder->GetState()) {
2039 if (fRecorder->Replay(fi.
fFilename, fCursorCheckBox->IsOn())) {
2044 fReplay->SetPicture(
gClient->GetPicture(
"stop.png"));
2045 fStartStop->SetPicture(
gClient->GetPicture(
"pause.png"));
2047 if (fCursorCheckBox->IsOn())
2048 fStartStop->SetEnabled(
kFALSE);
2050 fCursorCheckBox->SetEnabled(
kFALSE);
2058 fRecorder->ReplayStop();
2088 Int_t px, py, dx, dy;
2116 if ((e->
fX - attr.
fX > 0) && (e->
fY - attr.
fY > 0))
2131 Error(
"TRecGuiEvent::ReplayEvent",
2132 "kConfigureNotify: Unknown value: fUser[4] = %ld ",
2141 Error(
"TRecGuiEvent::ReplayEvent",
2142 "kConfigureNotify: Window does not exist anymore ");
2151 e->
fX, e->
fY, px, py, wtarget);
2152 dx = px - gCursorWin->GetX();
2153 dy = py - gCursorWin->GetY();
2160 if (!gCursorWin->IsMapped()) {
2161 gCursorWin->MapRaised();
2166 gCursorWin->RaiseWindow();
2188 gClient->HandleMaskEvent(e, fMasked);
2226 for(
Int_t i=0; i<5; ++i)
void RegisterWindow(Window_t w)
This method is called when RegisteredWindow(Window_t) is emitted from TGClient.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
void RecordCmdEvent(const char *line)
Records commandline event (text and time) ans saves the previous commandline event This 1 event delay...
const char * kRecEventNames[]
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
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.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
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 *)
const char * kCmdEventTree
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void Pause(TRecorder *)
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
R__EXTERN Atom_t gWM_DELETE_WINDOW
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual Bool_t Replay(TRecorder *, const char *, Bool_t, TRecorder::EReplayModes)
R__EXTERN TApplication * gApplication
Bool_t FilterEvent(TRecGuiEvent *e)
Basic time type with millisecond precision.
TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
void Start(const char *filename, Option_t *option="RECREATE", Window_t *w=0, Int_t winCount=0)
Starts recording events.
void RecordPave(const TObject *obj)
Records TPaveLabel object created in TCreatePrimitives::Pave()
virtual void ReplayStop(TRecorder *)
R__EXTERN TVirtualDragManager * gDragManager
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual void ReplayStop(TRecorder *r)
Replaying is cancelled.
virtual void Start(TRecorder *, const char *, Option_t *, Window_t *, Int_t)
void Update()
Called when fTimer timeouts (every 0.025 second) Updates GUI of recorder.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
virtual Float_t GetTextSize() const
Return the text size.
TRecorder()
Creates initial INACTIVE state for the recorder.
UInt_t GetWindowHeight() const
To draw Mathematical Formula.
virtual void Stop(TRecorder *, Bool_t)
void RecordGuiCNEvent(Event_t *e)
Records GUI Event_t *e of type kConfigureNotify.
void RecordMousePosition()
Try to record all mouse moves...
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
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.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
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.
virtual ~TGRecorder()
Destructor. Cleanup the GUI.
A Pave (see TPave) with a text centered in the Pave.
Pixmap_t GetPicture() const
const char * GetLabel() const
Using a TBrowser one can browse all ROOT objects.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
friend class TRecorderReplaying
virtual void Resize(UInt_t w, UInt_t h)
Resize the window.
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...
virtual void Stop(TRecorder *r, Bool_t guiCommand)
Disconnects all slots and stopps recording.
R__EXTERN TSystem * gSystem
const Mask_t kWASaveUnder
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...
static const char * gFiletypes[]
virtual Font_t GetTextFont() const
Return the text font.
void RegisterWindow(Window_t w)
Creates mapping for the newly registered window w and adds this mapping to fWindowList.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
void SetTypeOfConfigureNotify(Event_t *e)
Sets type of kConfigureNotify event to one of EConfigureNotify.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
Handles synchronous and a-synchronous timer events.
const char * AsString() const
Return the time as a string.
static Int_t gDecorHeight
const char * kGuiEventTree
Bool_t PrepareNextEvent()
Finds the next event in log file to replay and sets it to fNextEvent.
virtual void Move(Int_t x, Int_t y)
Move the window.
const char * kExtraEventTree
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 Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
TRecorderState * fRecorderState
virtual void ReplayEvent(Bool_t showMouseCursor=kTRUE)
Replays stored GUI event.
virtual void ListCmd(const char *filename)
Prints out commandline events recorded in given file.
UInt_t GetWindowWidth() const
void StartStop()
Handles push of the fStartStop button according to the current recorder state.
unsigned long long ULong64_t
const Mask_t kWAOverrideRedirect
void RecordGuiBldEvent(Event_t *e)
Special case for the gui builder, having a timer handling some of the events.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void ReplayStop()
Cancells replaying.
void SetWindowSize(UInt_t ww, UInt_t wh)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
void SetDefault()
Sets GUI to the default inactive state.
const TGWindow * GetParent() const
void StartEditing()
Memorize the starting time of editinga TLatex or a TPaveLabel.
virtual Long64_t GetEntries() const
virtual TRecorder::ERecorderState GetState() const
Get current state of recorder.
Mother of all ROOT objects.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the window.
Bool_t StartRecording()
Connects appropriate signals and slots in order to gain all registered windows and processed events i...
typedef void((*Func_t)())
virtual void PrevCanvases(const char *, Option_t *)
void Stop(Bool_t guiCommand=kFALSE)
Stopps recording events.
RooCmdArg Layout(Double_t xmin, Double_t xmax=0.99, Double_t ymin=0.95)
friend class TRecorderRecording
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 TGCursorWindow * gCursorWin
virtual Bool_t HandleTimerEvent(Event_t *, TTimer *)
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.
const char * GetText() const
friend class TRecorderPaused
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.
const Mask_t kKeyControlMask
virtual ~TRecorderRecording()
Freeing of allocated memory.
virtual TTime GetTime() const
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.
friend class TRecorderInactive
const char * kWindowsTree
R__EXTERN Atom_t gROOT_MESSAGE
if(line.BeginsWith("/*"))
virtual const char * GetTitle() const
Returns title of object.
Bool_t RemapWindowReferences()
All references to the old windows (IDs) in fNextEvent are replaced by new ones according to the mappi...
virtual void Close(Option_t *option="")
Close a file.
Bool_t CanOverlap()
ButtonPress and ButtonRelease must be sometimes replayed more times Example: pressing of a button ope...
const char * Data() const