21 #include <TGNumberEntry.h>
22 #include <TGedFrame.h>
34 TGCompositeFrame *Frame =
new TGCompositeFrame(
fTab,
fWidth, 20, kHorizontalFrame | kFixedWidth);
35 TGTextButton *UpdateButton =
new TGTextButton(Frame,
"Update");
36 UpdateButton->Connect(
"Clicked()",
fParent->ClassName(),
fParent,
"Repaint()");
37 Frame->AddFrame(UpdateButton,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 1, 1, 2, 1));
38 fTab->AddFrame(Frame,
new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
52 TGGroupFrame *cuts =
new TGGroupFrame(
fTab, Form(
"%s Cut",
fName.Data()));
53 cuts->SetTitlePos(TGGroupFrame::kCenter);
55 TString label = Form(
"Use %s cut",
fName.Data());
56 TString labelMin = Form(
"%s min:",
fName.Data());
57 TString labelMax = Form(
"%s max:",
fName.Data());
59 TGCompositeFrame *frameUse =
new TGCompositeFrame(cuts,
fWidth, 30, kHorizontalFrame | kFixedWidth);
60 TGLabel *label_use =
new TGLabel(frameUse, label);
61 frameUse->AddFrame(label_use,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 2, 1));
62 fUseCut =
new TGCheckButton(frameUse);
63 frameUse->AddFrame(fUseCut,
new TGLayoutHints(kLHintsRight | kLHintsExpandX));
64 cuts->AddFrame(frameUse,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX));
66 TGCompositeFrame *frameMin =
new TGCompositeFrame(cuts,
fWidth, 30, kHorizontalFrame | kFixedWidth);
67 TGLabel *gLabelMin =
new TGLabel(frameMin, labelMin);
68 frameMin->AddFrame(gLabelMin,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 2, 1));
69 fLow =
new TGNumberEntry(frameMin, 0, 6, -1, TGNumberFormat::kNESRealTwo);
70 frameMin->AddFrame(fLow,
new TGLayoutHints(kLHintsRight | kLHintsExpandX));
71 cuts->AddFrame(frameMin,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX));
73 TGCompositeFrame *frameMax =
new TGCompositeFrame(cuts,
fWidth, 30, kHorizontalFrame | kFixedWidth);
74 TGLabel *gLabelMax =
new TGLabel(frameMax, labelMax);
75 frameMax->AddFrame(gLabelMax,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 2, 1));
76 fHigh =
new TGNumberEntry(frameMax, 10, 6, -1, TGNumberFormat::kNESRealTwo);
77 frameMax->AddFrame(fHigh,
new TGLayoutHints(kLHintsRight | kLHintsExpandX));
78 cuts->AddFrame(frameMax,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX));
80 fTab->AddFrame(cuts,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 2, 1));
85 min = fLow->GetNumber();
86 max = fHigh->GetNumber();
87 return fUseCut->IsOn();
101 fHasCut =
new TGCheckButton(
fTab,
fName, 1);
103 fHasCut->Connect(
"Clicked()",
fParent->ClassName(),
fParent,
"Repaint()");
106 fHasCut->SetState(kButtonDown);
108 fHasCut->SetState(kButtonUp);
110 fTab->AddFrame(fHasCut,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 2, 1));
123 TGGroupFrame *cuts =
new TGGroupFrame(
fTab, Form(
"%s Cut",
fName.Data()));
124 cuts->SetTitlePos(TGGroupFrame::kCenter);
125 cuts->SetLayoutManager(
new TGMatrixLayout(cuts, 3, 2));
126 TString label = Form(
"Use %s cut",
fName.Data());
127 TString labelMin = Form(
"%s:",
fName.Data());
128 TGLabel *label_use =
new TGLabel(cuts, label);
129 cuts->AddFrame(label_use,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 2, 1));
130 fUseCut =
new TGCheckButton(cuts);
131 cuts->AddFrame(fUseCut,
new TGLayoutHints(kLHintsRight | kLHintsExpandX));
132 TGLabel *gLabelMin =
new TGLabel(cuts, labelMin);
133 cuts->AddFrame(gLabelMin,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 2, 1));
134 fCut =
new TGNumberEntry(cuts, 0, 6, -1, TGNumberFormat::kNESInteger);
135 cuts->AddFrame(fCut,
new TGLayoutHints(kLHintsRight | kLHintsExpandX));
136 fTab->AddFrame(cuts,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 2, 1));
141 val = fCut->GetIntNumber();
142 return fUseCut->IsOn();
virtual ~FairEveMinMaxCut()
FairEveCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
FairEveMinMaxCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
FairEveBoolCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
Bool_t GetValue(Int_t &val) const
Bool_t GetValues(Double_t &min, Double_t &max) const
virtual ~FairEveBoolCut()
FairEveIntCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)