30 #include <TGButtonGroup.h>
38 : TGHorizontalFrame(p,w,h),
46 fCathode =
new TGButtonGroup(
this,
"Cathode",kHorizontalFrame);
48 fAttributes.SetCathode(kTRUE,kFALSE);
50 fAttributes.SetCathode(kFALSE,kTRUE);
53 fPlane =
new TGButtonGroup(
this,
"Plane",kHorizontalFrame);
55 fAttributes.SetPlane(kTRUE,kFALSE);
57 fAttributes.SetPlane(kFALSE,kTRUE);
60 fViewPoint =
new TGButtonGroup(
this,
"ViewPoint",kHorizontalFrame);
62 fAttributes.SetViewPoint(kTRUE,kFALSE);
64 fAttributes.SetViewPoint(kFALSE,kTRUE);
67 fViewPoint->SetState(kFALSE);
73 fCathode->Connect(
"Clicked(Int_t)",
"AliMUONAttPainterSelectorFrame",
this,
"CathodeClicked(Int_t)");
74 fPlane->Connect(
"Clicked(Int_t)",
"AliMUONAttPainterSelectorFrame",
this,
"PlaneClicked(Int_t)");
75 fViewPoint->Connect(
"Clicked(Int_t)",
"AliMUONAttPainterSelectorFrame",
this,
"ViewClicked(Int_t)");
92 TGButton* button =
fCathode->GetButton(buttonId);
94 Long_t i =
reinterpret_cast<Long_t
>(button->GetUserData());
120 TGButton* button =
fPlane->GetButton(buttonId);
122 Long_t i =
reinterpret_cast<Long_t
> (button->GetUserData());
147 TGButton* button =
fViewPoint->GetButton(buttonId);
149 Long_t i =
reinterpret_cast<Long_t
> (button->GetUserData());
174 Long_t params[] = { (Long_t)newValues };
176 Emit(
"Clicked(AliMUONAttPainter*)",params);
Widget to select the painter(s) view type.
TString CathodeName() const
static void AddRadioButton(TGButtonGroup &bg, const TString &name, void *userData=0x0, Bool_t select=kFALSE)
TGButtonGroup * fPlane
plane selection buttons
TString PlaneName() const
Bool_t IsPlaneDefined() const
Whether we are defined by plane.
Bool_t IsCathodeDefined() const
Whether we are defined by cathode.
void SetViewPoint(Bool_t front, Bool_t back)
void Clicked(const AliMUONAttPainter *newValues)
void SetCathode(Bool_t cath0, Bool_t cath1)
Bool_t IsCathodeAndPlaneDisabled() const
Whether cathode & plane are disabled.
virtual ~AliMUONAttPainterSelectorFrame()
AliMUONAttPainter fAttributes
attributes
void CathodeClicked(Int_t buttonId)
TGButtonGroup * fViewPoint
viewpoint selection buttons
static void Unselect(TGButtonGroup &bg, const TString &buttonName, Bool_t emit=kFALSE)
void PlaneClicked(Int_t buttonId)
static void Select(TGButtonGroup &bg, const TString &buttonName, Bool_t emit=kFALSE)
TString ViewPointName() const
void ViewClicked(Int_t buttonId)
Basic attributes shared by all painters.
TGButtonGroup * fCathode
cathode selection buttons
void SetPlane(Bool_t bending, Bool_t nonBending)
void Update(const AliMUONAttPainter &att)