18 #include "trg/cdc/Display.h"
19 #include "trg/cdc/DisplayDrawingArea.h"
29 Gtk::Main* GtkMain = 0;
30 bool TRGCDCDisplay::_skipEvent =
false;
31 bool TRGCDCDisplay::_endOfEvent =
false;
32 bool TRGCDCDisplay::_endOfEventFlag =
false;
33 bool TRGCDCDisplay::_nonStop =
false;
35 TRGCDCDisplay::TRGCDCDisplay(
const string& name,
42 _menuButtons(true, 2),
43 _buttonNext(
"Next Step"),
44 _buttonEndOfEvent(
"End of Event"),
45 _buttonNextEvent(
"Next Event"),
46 _buttonNonStop(
"Non Stop"),
47 _label(
"Stage : TRGing not started\nInformation :",
50 _buttonPositionReset(
"Reset position"),
51 _buttonWireName(
"Wire Name"),
57 _buttonWireName.set_active(
false);
58 _wireName = _buttonWireName.get_active();
62 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_next));
63 _menuButtons.pack_start(_buttonNext, Gtk::PACK_EXPAND_WIDGET, 2);
66 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_endOfEvent));
67 _menuButtons.pack_start(_buttonEndOfEvent, Gtk::PACK_EXPAND_WIDGET, 2);
70 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_nextEvent));
71 _menuButtons.pack_start(_buttonNextEvent, Gtk::PACK_EXPAND_WIDGET, 2);
75 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_nonStop));
76 _menuButtons.pack_start(_buttonNonStop, Gtk::PACK_EXPAND_WIDGET, 2);
80 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_positionReset));
83 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_wireName));
86 TRGCDCDisplay::~TRGCDCDisplay()
91 TRGCDCDisplay::on_positionReset(
void)
93 area().resetPosition();
94 area().on_expose_event((GdkEventExpose*) NULL);
98 TRGCDCDisplay::on_next(
void)
104 TRGCDCDisplay::on_endOfEvent(
void)
106 _endOfEventFlag =
true;
112 TRGCDCDisplay::on_nextEvent(
void)
119 TRGCDCDisplay::on_nonStop(
void)
126 TRGCDCDisplay::on_wireName(
void)
128 _wireName = _buttonWireName.get_active();
129 area().wireName(_wireName);
130 area().on_expose_event((GdkEventExpose*) NULL);
134 TRGCDCDisplay::run(
void)
138 Gtk::Main main_instance(argc, argv);
142 else if (((! _skip) && (! _skipEvent)) || (_endOfEventFlag && _endOfEvent))
147 TRGCDCDisplay::clear(
void)
150 const string id =
"unknown";
156 TRGCDCDisplay::stop(
void)