7 #include "nutools/EventDisplayBase/ButtonBar.h" 17 #include "TGTextEntry.h" 18 #include "TGPicture.h" 23 #include "nutools/EventDisplayBase/EventDisplay.h" 24 #include "nutools/EventDisplayBase/evdb.h" 25 #include "nutools/EventDisplayBase/PrintDialog.h" 26 #include "nutools/EventDisplayBase/NavState.h" 35 fButtonBar =
new TGCompositeFrame(frame, 60, 20,
36 kSunkenFrame|kHorizontalFrame);
37 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 1, 0);
41 fPrevEvt->SetToolTipText(
"Go to previous event");
42 fPrevEvt->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"PrevEvt()");
44 new TGLayoutHints(kLHintsTop | kLHintsLeft,
49 fNextEvt->SetToolTipText(
"Go to next event");
50 fNextEvt->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"NextEvt()");
52 new TGLayoutHints(kLHintsTop | kLHintsLeft,
58 fAutoAdvance->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"AutoAdvance()");
60 new TGLayoutHints(kLHintsTop | kLHintsLeft,
65 fReload->SetToolTipText(
"Reload current event");
66 fReload->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"ReloadEvt()");
68 new TGLayoutHints(kLHintsTop | kLHintsLeft,
75 new TGLayoutHints(kLHintsTop | kLHintsLeft,
80 GContext_t
norm = TGPictureButton::GetDefaultGC()();
83 fFileList->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"FileList()");
85 new TGLayoutHints(kLHintsCenterY,
90 fPrint->SetToolTipText(
"Print display to a file");
91 fPrint->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"PrintToFile()");
93 new TGLayoutHints(kLHintsTop|kLHintsRight,
98 fGoTo->SetToolTipText(
"Go to event");
99 fGoTo->Connect(
"Clicked()",
"evdb::ButtonBar",
this,
"GoTo()");
100 fButtonBar->AddFrame(
fGoTo,
new TGLayoutHints(kLHintsTop|kLHintsRight, 2, 0, 2, 2));
104 fEventTextEntry->Connect(
"ReturnPressed()",
"evdb::ButtonBar",
this,
"GoTo()");
109 fRunTextEntry->Connect(
"ReturnPressed()",
"evdb::ButtonBar",
this,
"GoTo()");
234 sprintf(runtxt,
"%d",run);
235 sprintf(evttxt,
"%d",evt);
245 s =
"Sorry action '"; s += method; s+=
"' is not implemented.\n";
247 "No implementation",s.c_str(),kMBIconExclamation);
static void Set(int which)
unsigned int fAutoAdvanceInterval
Wait time in milliseconds.
Manage all things related to colors for the event display.
auto norm(Vector const &v)
Return norm of the specified vector.
static void SetTarget(int run, int event)
const TGWindow * TopWindow()
TGPicturePool * PicturePool()