ButtonBar.h
Go to the documentation of this file.
1 ///
2 /// \file ButtonBar.h
3 /// \brief A bar containing the next event and related buttons
4 // \version $Id: ButtonBar.h,v 1.4 2011-07-12 15:53:25 messier Exp $
5 /// \author messier@indiana.edu
6 ///
7 #ifndef EVDB_BUTTONBAR_H
8 #define EVDB_BUTTONBAR_H
9 #include "TQObject.h"
10 #include "RQ_OBJECT.h"
11 #include "TGButton.h"
12 #include "TGTextEntry.h"
13 class TGMainFrame;
14 class TGCompositeFrame;
15 class TGPictureButton;
16 class TGLayoutHints;
17 class TGLabel;
18 
19 namespace evdb {
20  class ButtonBar : public TObject {
21  RQ_OBJECT("evdb::ButtonBar")
22 
23  public:
24  ButtonBar(TGMainFrame* frame);
25  virtual ~ButtonBar();
26 
27  public:
28  void PrevEvt();
29  void NextEvt();
30  void ReloadEvt();
31  void AutoAdvance();
32  void FileList();
33  void GoTo();
34  void PrintToFile();
35  int NoImpl(const char* c);
36 
37  void SetRunEvent(int run, int event);
38 
39  Bool_t HandleTimer(TTimer* t);
40 
41  private:
42  TTimer* fTimer; ///< Timer to handle auto advancing
43 
44  private:
45  TGCompositeFrame* fButtonBar; ///< The top button bar
46  TGLayoutHints* fLayout; ///< Layout for button bar
47  TGTextButton* fPrevEvt; ///< Goto to previous event
48  TGTextButton* fNextEvt; ///< Goto to next event
49  TGTextButton* fAutoAdvance; ///< Start to auto advance
50  TGTextButton* fReload; ///< Reload current event
51  TGTextEntry* fCurrentFile; ///< Currently loaded file
52  TGPictureButton* fFileList; ///< Access to the list of files attached
53 
54  TGLabel* fRunEvtLabel; ///< Run/Event number label
55  TGTextEntry* fRunTextEntry; ///< Run number text entry
56  TGTextEntry* fEventTextEntry; ///< Event number text entry
57 
58  TGTextButton* fGoTo; ///< Go To event button
59  TGTextButton* fPrint; ///< Print button
60 
61  ClassDef(ButtonBar, 0);
62  };
63 }
64 
65 #endif // EVDB_BUTTONBAR_H
66 ////////////////////////////////////////////////////////////////////////
TGTextButton * fNextEvt
Goto to next event.
Definition: ButtonBar.h:48
void PrintToFile()
Definition: ButtonBar.cxx:215
TGPictureButton * fFileList
Access to the list of files attached.
Definition: ButtonBar.h:52
TGCompositeFrame * fButtonBar
The top button bar.
Definition: ButtonBar.h:45
TGTextButton * fPrint
Print button.
Definition: ButtonBar.h:59
TGLayoutHints * fLayout
Layout for button bar.
Definition: ButtonBar.h:46
TGTextButton * fPrevEvt
Goto to previous event.
Definition: ButtonBar.h:47
Manage all things related to colors for the event display.
TGTextButton * fAutoAdvance
Start to auto advance.
Definition: ButtonBar.h:49
Bool_t HandleTimer(TTimer *t)
Definition: ButtonBar.cxx:159
TGTextButton * fGoTo
Go To event button.
Definition: ButtonBar.h:58
ClassDef(ButtonBar, 0)
TTimer * fTimer
Timer to handle auto advancing.
Definition: ButtonBar.h:42
TGTextButton * fReload
Reload current event.
Definition: ButtonBar.h:50
void SetRunEvent(int run, int event)
Definition: ButtonBar.cxx:229
int NoImpl(const char *c)
Definition: ButtonBar.cxx:242
TGTextEntry * fEventTextEntry
Event number text entry.
Definition: ButtonBar.h:56
TGTextEntry * fRunTextEntry
Run number text entry.
Definition: ButtonBar.h:55
ButtonBar(TGMainFrame *frame)
Definition: ButtonBar.cxx:32
TGLabel * fRunEvtLabel
Run/Event number label.
Definition: ButtonBar.h:54
TGTextEntry * fCurrentFile
Currently loaded file.
Definition: ButtonBar.h:51
virtual ~ButtonBar()
Definition: ButtonBar.cxx:122
Event finding and building.
void AutoAdvance()
Definition: ButtonBar.cxx:171
unsigned int run