16#include "trg/cdc/DisplayRphi.h"
31 TRGCDCDisplayRphi::TRGCDCDisplayRphi(
const string& name,
35 : TRGCDCDisplay(name, size, int(outerR)),
38 _w(* this, size, innerR, outerR),
39 _adjustment(double(size) / outerR / 2,
40 double(size) / outerR / 2,
44 _buttonAxial(
"Axial"),
45 _buttonStereo(
"Stereo"),
46 _buttonBelleCDC(
"Belle CDC")
49 _w.set_size_request(size, size);
51 _buttonAxial.set_active();
52 _axial = _buttonAxial.get_active();
53 _buttonStereo.set_active(
false);
54 _stereo = _buttonStereo.get_active();
55 _buttonBelleCDC.set_active(
false);
59 .connect(sigc::mem_fun(*
this, & TRGCDCDisplayRphi::on_axial));
62 .connect(sigc::mem_fun(*
this, & TRGCDCDisplayRphi::on_stereo));
65 .connect(sigc::mem_fun(*
this, & TRGCDCDisplayRphi::on_BelleCDC));
67 _scaler.set_update_policy(Gtk::UPDATE_CONTINUOUS);
68 _scaler.set_digits(3);
69 _scaler.set_value_pos(Gtk::POS_LEFT);
70 _scaler.set_draw_value();
71 _scaler.set_size_request(200, 30);
73 .signal_value_changed()
74 .connect(sigc::mem_fun(*
this,
75 & TRGCDCDisplayRphi::on_scale_value_changed));
77 _bottom.pack_start(_scaler, Gtk::PACK_SHRINK, 5);
78 _bottom.pack_start(_buttonPositionReset, Gtk::PACK_EXPAND_WIDGET, 2);
79 _bottom.pack_start(_buttonAxial, Gtk::PACK_SHRINK, 2);
80 _bottom.pack_start(_buttonStereo, Gtk::PACK_SHRINK, 2);
81 _bottom.pack_start(_buttonWireName, Gtk::PACK_SHRINK, 2);
82 _bottom.pack_start(_buttonBelleCDC, Gtk::PACK_SHRINK, 2);
84 _box0.pack_start(_menuButtons, Gtk::PACK_SHRINK, 5);
85 _box0.pack_start(_label, Gtk::PACK_EXPAND_WIDGET, 5);
86 _box0.pack_start(_w, Gtk::PACK_EXPAND_WIDGET, 5);
87 _box0.pack_start(_bottom, Gtk::PACK_SHRINK, 5);
94 TRGCDCDisplayRphi::~TRGCDCDisplayRphi()
99 TRGCDCDisplayRphi::on_scale_value_changed(
void)
101 const double val = scale();
104 _w.on_expose_event((GdkEventExpose*) NULL);
108 TRGCDCDisplayRphi::on_axial(
void)
110 _axial = _buttonAxial.get_active();
112 _w.on_expose_event((GdkEventExpose*) NULL);
116 TRGCDCDisplayRphi::on_stereo(
void)
118 _stereo = _buttonStereo.get_active();
120 _w.on_expose_event((GdkEventExpose*) NULL);
124 TRGCDCDisplayRphi::on_wireName(
void)
126 _wireName = _buttonWireName.get_active();
127 _w.wireName(_wireName);
128 _w.on_expose_event((GdkEventExpose*) NULL);
132 TRGCDCDisplayRphi::on_BelleCDC(
void)
134 _oldCDC = _buttonBelleCDC.get_active();
136 _w.on_expose_event((GdkEventExpose*) NULL);
140 TRGCDCDisplayRphi::on_positionReset(
void)
143 const double val = _w.scale();
145 _w.on_expose_event((GdkEventExpose*) NULL);
Abstract base class for different kinds of events.