17#include "trg/cdc/Display.h"
18#include "trg/cdc/DisplayDrawingArea.h"
28 Gtk::Main* GtkMain = 0;
29 bool TRGCDCDisplay::_skipEvent =
false;
30 bool TRGCDCDisplay::_endOfEvent =
false;
31 bool TRGCDCDisplay::_endOfEventFlag =
false;
32 bool TRGCDCDisplay::_nonStop =
false;
34 TRGCDCDisplay::TRGCDCDisplay(
const string& name,
41 _menuButtons(true, 2),
42 _buttonNext(
"Next Step"),
43 _buttonEndOfEvent(
"End of Event"),
44 _buttonNextEvent(
"Next Event"),
45 _buttonNonStop(
"Non Stop"),
46 _label(
"Stage : TRGing not started\nInformation :",
49 _buttonPositionReset(
"Reset position"),
50 _buttonWireName(
"Wire Name"),
56 _buttonWireName.set_active(
false);
57 _wireName = _buttonWireName.get_active();
61 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_next));
62 _menuButtons.pack_start(_buttonNext, Gtk::PACK_EXPAND_WIDGET, 2);
65 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_endOfEvent));
66 _menuButtons.pack_start(_buttonEndOfEvent, Gtk::PACK_EXPAND_WIDGET, 2);
69 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_nextEvent));
70 _menuButtons.pack_start(_buttonNextEvent, Gtk::PACK_EXPAND_WIDGET, 2);
74 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_nonStop));
75 _menuButtons.pack_start(_buttonNonStop, Gtk::PACK_EXPAND_WIDGET, 2);
79 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_positionReset));
82 .connect(sigc::mem_fun(*
this, & TRGCDCDisplay::on_wireName));
85 TRGCDCDisplay::~TRGCDCDisplay()
90 TRGCDCDisplay::on_positionReset(
void)
92 area().resetPosition();
93 area().on_expose_event((GdkEventExpose*) NULL);
97 TRGCDCDisplay::on_next(
void)
103 TRGCDCDisplay::on_endOfEvent(
void)
105 _endOfEventFlag =
true;
111 TRGCDCDisplay::on_nextEvent(
void)
118 TRGCDCDisplay::on_nonStop(
void)
125 TRGCDCDisplay::on_wireName(
void)
127 _wireName = _buttonWireName.get_active();
128 area().wireName(_wireName);
129 area().on_expose_event((GdkEventExpose*) NULL);
133 TRGCDCDisplay::run(
void)
137 Gtk::Main main_instance(argc, argv);
141 else if (((! _skip) && (! _skipEvent)) || (_endOfEventFlag && _endOfEvent))
146 TRGCDCDisplay::clear(
void)
149 const string id =
"unknown";
155 TRGCDCDisplay::stop(
void)
Abstract base class for different kinds of events.