File indexing completed on 2025-01-18 09:55:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef DDEVE_EVENTCONTROL_H
0014 #define DDEVE_EVENTCONTROL_H
0015
0016
0017 #include "DDEve/FrameControl.h"
0018 #include "DDEve/GenericEventHandler.h"
0019
0020
0021 class TGPictureButton;
0022 class TGLabel;
0023
0024
0025 namespace dd4hep {
0026
0027
0028 class Display;
0029
0030
0031
0032
0033
0034
0035
0036
0037 class EventControl : public FrameControl, public EventConsumer {
0038 enum { NUM_DATA_LINES = 40 };
0039
0040 Display *m_display;
0041
0042 TGGroupFrame *m_dataGroup;
0043 TGCompositeFrame *m_dataFrame;
0044
0045 TGGroupFrame *m_eventGroup;
0046 TGCompositeFrame *m_numEvtFrame;
0047 TGLabel *m_input1, *m_input2;
0048 TGLabel *m_numEvtLabel;
0049 TGPictureButton *m_open, *m_prev, *m_next, *m_goto;
0050 typedef std::pair<TGLabel*,TGLabel*> Labels;
0051 typedef std::pair<TGCompositeFrame*,Labels> Line;
0052 typedef std::vector<Line > Lines;
0053 Lines m_lines;
0054
0055 public:
0056
0057 EventControl(Display* disp, unsigned int width, unsigned int height);
0058
0059 virtual ~EventControl();
0060
0061
0062 virtual void OnBuild() override;
0063
0064 TGCompositeFrame* CreateFrame() override;
0065
0066
0067 virtual bool Open();
0068
0069 virtual void NextEvent();
0070
0071 virtual void PreviousEvent();
0072
0073 virtual void GotoEvent();
0074
0075
0076
0077 virtual void OnNewEvent(EventHandler& handler) override;
0078
0079
0080 virtual void OnFileOpen(EventHandler& handler) override;
0081
0082 ClassDefOverride(EventControl,0)
0083 };
0084 }
0085 #endif
0086