29 ClassImp(TEveGridStepperSubEditor);
34 TEveGridStepperSubEditor::TEveGridStepperSubEditor(
const TGWindow *p) :
37 fNx(0), fNy(0), fNz(0),
38 fDx(0), fDy(0), fDz(0)
42 TGHorizontalFrame* hf =
new TGHorizontalFrame(
this);
45 TGGroupFrame* f =
new TGGroupFrame(hf,
"NumRows", kVerticalFrame);
47 hf->AddFrame(f,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 0));
49 fNx =
new TEveGValuator(f,
"X:", 200, 0);
51 fNx->SetLabelWidth(labelW);
52 fNx->SetShowSlider(kFALSE);
54 fNx->SetLimits(1, 15);
55 fNx->Connect(
"ValueSet(Double_t)",
56 "TEveGridStepperSubEditor",
this,
"DoNs()");
57 f->AddFrame(fNx,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
59 fNy =
new TEveGValuator(f,
"Y:", 200, 0);
61 fNy->SetLabelWidth(labelW);
62 fNy->SetShowSlider(kFALSE);
64 fNy->SetLimits(1, 15);
65 fNy->Connect(
"ValueSet(Double_t)",
66 "TEveGridStepperSubEditor",
this,
"DoNs()");
67 f->AddFrame(fNy,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
69 fNz =
new TEveGValuator(f,
"Z:", 200, 0);
71 fNz->SetLabelWidth(labelW);
72 fNz->SetShowSlider(kFALSE);
74 fNz->SetLimits(1, 15);
75 fNz->Connect(
"ValueSet(Double_t)",
76 "TEveGridStepperSubEditor",
this,
"DoNs()");
77 f->AddFrame(fNz,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
82 TGGroupFrame* f =
new TGGroupFrame(hf,
"Step", kVerticalFrame);
84 hf->AddFrame(f,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 0));
86 fDx =
new TEveGValuator(f,
"X:", 200, 0);
88 fDx->SetLabelWidth(labelW);
89 fDx->SetShowSlider(kFALSE);
91 fDx->SetLimits(0.1, 100, 101, TGNumberFormat::kNESRealOne);
92 fDx->Connect(
"ValueSet(Double_t)",
93 "TEveGridStepperSubEditor",
this,
"DoDs()");
94 f->AddFrame(fDx,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
96 fDy =
new TEveGValuator(f,
"Y:", 200, 0);
98 fDy->SetLabelWidth(labelW);
99 fDy->SetShowSlider(kFALSE);
101 fDy->SetLimits(0.1, 100, 101, TGNumberFormat::kNESRealOne);
102 fDy->Connect(
"ValueSet(Double_t)",
103 "TEveGridStepperSubEditor",
this,
"DoDs()");
104 f->AddFrame(fDy,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
106 fDz =
new TEveGValuator(f,
"Z:", 200, 0);
108 fDz->SetLabelWidth(labelW);
109 fDz->SetShowSlider(kFALSE);
111 fDz->SetLimits(0.1, 100, 101, TGNumberFormat::kNESRealOne);
112 fDz->Connect(
"ValueSet(Double_t)",
113 "TEveGridStepperSubEditor",
this,
"DoDs()");
114 f->AddFrame(fDz,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
118 AddFrame(hf,
new TGLayoutHints(kLHintsExpandX, 2, 0, 0, 0));
124 void TEveGridStepperSubEditor::SetModel(TEveGridStepper* m)
128 fNx->SetValue(fM->fNx);
129 fNy->SetValue(fM->fNy);
130 fNz->SetValue(fM->fNz);
132 fDx->SetValue(fM->fDx);
133 fDy->SetValue(fM->fDy);
134 fDz->SetValue(fM->fDz);
140 void TEveGridStepperSubEditor::Changed()
148 void TEveGridStepperSubEditor::DoNs()
150 fM->SetNs((Int_t)fNx->GetValue(), (Int_t)fNy->GetValue(), (Int_t)fNz->GetValue());
157 void TEveGridStepperSubEditor::DoDs()
159 fM->SetDs(fDx->GetValue(), fDy->GetValue(), fDz->GetValue());
168 ClassImp(TEveGridStepperEditor);
173 TEveGridStepperEditor::TEveGridStepperEditor(
const TGWindow *p, Int_t width, Int_t height,
174 UInt_t options, Pixel_t back) :
175 TGedFrame(p, width, height, options | kVerticalFrame, back),
179 MakeTitle(
"TEveGridStepper");
181 fSE =
new TEveGridStepperSubEditor(
this);
182 AddFrame(fSE,
new TGLayoutHints(kLHintsTop, 2, 0, 2, 2));
183 fSE->Connect(
"Changed()",
"TEveGridStepperEditor",
this,
"Update()");
189 void TEveGridStepperEditor::SetModel(TObject* obj)
191 fM =
dynamic_cast<TEveGridStepper*
>(obj);