Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGeoConeEditor.cxx
Go to the documentation of this file.
1// @(#):$Id$
2// Author: M.Gheata
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TGeoConeEditor
13\ingroup Geometry_builder
14
15Editor for a TGeoCone.
16
17\image html geom_cone_pic.png
18
19\image html geom_cone_ed.png
20
21*/
22
23#include "TGeoConeEditor.h"
24#include "TGeoTabManager.h"
25#include "TGeoCone.h"
26#include "TGeoManager.h"
27#include "TVirtualGeoPainter.h"
28#include "TVirtualPad.h"
29#include "TView.h"
30#include "TGButton.h"
31#include "TGTextEntry.h"
32#include "TGNumberEntry.h"
33#include "TGLabel.h"
34#include "TGDoubleSlider.h"
35
36
38
39////////////////////////////////////////////////////////////////////////////////
40/// Constructor for volume editor
41
42TGeoConeEditor::TGeoConeEditor(const TGWindow *p, Int_t width, Int_t height, UInt_t options, Pixel_t back)
43 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
44{
45 fShape = nullptr;
46 fRmini1 = fRmaxi1 = fRmini2 = fRmaxi2 = fDzi = 0.0;
47 fNamei = "";
50
51 // TextEntry for shape name
52 MakeTitle("Name");
53 fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kCONE_NAME);
54 fShapeName->Resize(135, fShapeName->GetDefaultHeight());
55 fShapeName->SetToolTipText("Enter the cone name");
56 fShapeName->Associate(this);
58
59 TGTextEntry *nef;
60 MakeTitle("Cone dimensions");
61 TGCompositeFrame *compxyz = new TGCompositeFrame(this, 118, 30, kVerticalFrame | kRaisedFrame);
62
63 // Number entry for Rmin1
65 f1->AddFrame(new TGLabel(f1, "Rmin1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
66 fERmin1 = new TGNumberEntry(f1, 0., 5, kCONE_RMIN1);
68 nef = (TGTextEntry *)fERmin1->GetNumberEntry();
69 nef->SetToolTipText("Enter the inner radius");
70 fERmin1->Associate(this);
71 fERmin1->Resize(100, fERmin1->GetDefaultHeight());
72 f1->AddFrame(fERmin1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
73 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
74
75 // Number entry for Rmax1
76 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
77 f1->AddFrame(new TGLabel(f1, "Rmax1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
78 fERmax1 = new TGNumberEntry(f1, 0., 5, kCONE_RMAX1);
80 nef = (TGTextEntry *)fERmax1->GetNumberEntry();
81 nef->SetToolTipText("Enter the outer radius");
82 fERmax1->Associate(this);
83 fERmax1->Resize(100, fERmax1->GetDefaultHeight());
84 f1->AddFrame(fERmax1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
85 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
86
87 // Number entry for Rmin2
88 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
89 f1->AddFrame(new TGLabel(f1, "Rmin2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
90 fERmin2 = new TGNumberEntry(f1, 0., 5, kCONE_RMIN2);
92 nef = (TGTextEntry *)fERmin2->GetNumberEntry();
93 nef->SetToolTipText("Enter the inner radius");
94 fERmin2->Associate(this);
95 fERmin2->Resize(100, fERmin2->GetDefaultHeight());
96 f1->AddFrame(fERmin2, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
97 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
98
99 // Number entry for Rmax2
100 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
101 f1->AddFrame(new TGLabel(f1, "Rmax2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
102 fERmax2 = new TGNumberEntry(f1, 0., 5, kCONE_RMAX2);
104 nef = (TGTextEntry *)fERmax1->GetNumberEntry();
105 nef->SetToolTipText("Enter the outer radius");
106 fERmax2->Associate(this);
107 fERmax2->Resize(100, fERmax2->GetDefaultHeight());
108 f1->AddFrame(fERmax2, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
109 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
110
111 // Number entry for dz
112 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
113 f1->AddFrame(new TGLabel(f1, "DZ"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
114 fEDz = new TGNumberEntry(f1, 0., 5, kCONE_Z);
116 nef = (TGTextEntry *)fEDz->GetNumberEntry();
117 nef->SetToolTipText("Enter the cone half-lenth in Z");
118 fEDz->Associate(this);
119 fEDz->Resize(100, fEDz->GetDefaultHeight());
120 f1->AddFrame(fEDz, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
121 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
122
123 compxyz->Resize(150, 30);
124 AddFrame(compxyz, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
125
126 // Delayed draw
128 fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
129 fDFrame->AddFrame(fDelayed, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
130 AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
131
132 // Buttons
134 fApply = new TGTextButton(fBFrame, "Apply");
135 fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
136 fApply->Associate(this);
137 fUndo = new TGTextButton(fBFrame, "Undo");
138 fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
139 fUndo->Associate(this);
140 AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
141 fUndo->SetSize(fApply->GetSize());
142}
143
144////////////////////////////////////////////////////////////////////////////////
145/// Destructor
146
148{
149 TGFrameElement *el;
150 TIter next(GetList());
151 while ((el = (TGFrameElement *)next())) {
152 if (el->fFrame->IsComposite())
154 }
155 Cleanup();
156}
157
158////////////////////////////////////////////////////////////////////////////////
159/// Connect signals to slots.
160
162{
163 fApply->Connect("Clicked()", "TGeoConeEditor", this, "DoApply()");
164 fUndo->Connect("Clicked()", "TGeoConeEditor", this, "DoUndo()");
165 fShapeName->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoModified()");
166 fERmin1->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmin1()");
167 fERmin2->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmin2()");
168 fERmax1->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmax1()");
169 fERmax2->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmax2()");
170 fEDz->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoDz()");
171 fERmin1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmin1()");
172 fERmin2->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmin2()");
173 fERmax1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmax1()");
174 fERmax2->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmax2()");
175 fEDz->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoDz()");
176 fInit = kFALSE;
177}
178
179////////////////////////////////////////////////////////////////////////////////
180/// Connect to the selected object.
181
183{
184 if (obj == nullptr || (obj->IsA() != TGeoCone::Class())) {
186 return;
187 }
188 fShape = (TGeoCone *)obj;
189 fRmini1 = fShape->GetRmin1();
190 fRmini2 = fShape->GetRmin2();
191 fRmaxi1 = fShape->GetRmax1();
192 fRmaxi2 = fShape->GetRmax2();
193 fDzi = fShape->GetDz();
194 fNamei = fShape->GetName();
195 fShapeName->SetText(fShape->GetName());
196 fERmin1->SetNumber(fRmini1);
197 fERmin2->SetNumber(fRmini2);
198 fERmax1->SetNumber(fRmaxi1);
199 fERmax2->SetNumber(fRmaxi2);
200 fEDz->SetNumber(fDzi);
201 fApply->SetEnabled(kFALSE);
202 fUndo->SetEnabled(kFALSE);
203
204 if (fInit)
206 SetActive();
207}
208
209////////////////////////////////////////////////////////////////////////////////
210/// Check if shape drawing is delayed.
211
213{
214 return (fDelayed->GetState() == kButtonDown);
215}
216
217////////////////////////////////////////////////////////////////////////////////
218/// Slot for name.
219
221{
222 DoModified();
223}
224
225////////////////////////////////////////////////////////////////////////////////
226/// Slot for applying current parameters.
227
229{
230 fApply->SetEnabled(kFALSE);
231 const char *name = fShapeName->GetText();
232 if (strcmp(name, fShape->GetName()))
233 fShape->SetName(name);
234 Double_t rmin1 = fERmin1->GetNumber();
235 Double_t rmin2 = fERmin2->GetNumber();
236 Double_t rmax1 = fERmax1->GetNumber();
237 Double_t rmax2 = fERmax2->GetNumber();
238 Double_t dz = fEDz->GetNumber();
239 if (rmin1 < 0 || rmin1 > rmax1)
240 return;
241 if (rmin2 < 0 || rmin2 > rmax2)
242 return;
243 if (dz <= 0)
244 return;
245 if (rmin1 == rmax1 && rmin2 == rmax2)
246 return;
247 fShape->SetConeDimensions(dz, rmin1, rmax1, rmin2, rmax2);
248 fShape->ComputeBBox();
249 fUndo->SetEnabled();
250 if (fPad) {
251 if (gGeoManager && gGeoManager->GetPainter() && gGeoManager->GetPainter()->IsPaintingShape()) {
252 fShape->Draw();
253 fPad->GetView()->ShowAxis();
254 } else
255 Update();
256 }
257}
258
259////////////////////////////////////////////////////////////////////////////////
260/// Slot for modifying current parameters.
261
263{
264 fApply->SetEnabled();
265}
266
267////////////////////////////////////////////////////////////////////////////////
268/// Slot for undoing current operation.
269
271{
272 fERmin1->SetNumber(fRmini1);
273 fERmin2->SetNumber(fRmini2);
274 fERmax1->SetNumber(fRmaxi1);
275 fERmax2->SetNumber(fRmaxi2);
276 fEDz->SetNumber(fDzi);
277 DoApply();
278 fUndo->SetEnabled(kFALSE);
279 fApply->SetEnabled(kFALSE);
280}
281
282////////////////////////////////////////////////////////////////////////////////
283/// Slot for Rmin1
284
286{
287 Double_t rmin1 = fERmin1->GetNumber();
288 Double_t rmax1 = fERmax1->GetNumber();
289 if (rmin1 < 0) {
290 rmin1 = 0;
291 fERmin1->SetNumber(rmin1);
292 }
293 if (rmin1 > rmax1) {
294 rmin1 = rmax1;
295 fERmin1->SetNumber(rmin1);
296 }
297 DoModified();
298 if (!IsDelayed())
299 DoApply();
300}
301
302////////////////////////////////////////////////////////////////////////////////
303/// Slot for Rmax1
304
306{
307 Double_t rmin1 = fERmin1->GetNumber();
308 Double_t rmax1 = fERmax1->GetNumber();
309 if (rmax1 < rmin1) {
310 rmax1 = rmin1;
311 fERmax1->SetNumber(rmax1);
312 }
313 DoModified();
314 if (!IsDelayed())
315 DoApply();
316}
317
318////////////////////////////////////////////////////////////////////////////////
319/// Slot for Rmin2
320
322{
323 Double_t rmin2 = fERmin2->GetNumber();
324 Double_t rmax2 = fERmax2->GetNumber();
325 if (rmin2 < 0) {
326 rmin2 = 0;
327 fERmin2->SetNumber(rmin2);
328 }
329 if (rmin2 > rmax2) {
330 rmin2 = rmax2;
331 fERmin2->SetNumber(rmin2);
332 }
333 DoModified();
334 if (!IsDelayed())
335 DoApply();
336}
337
338////////////////////////////////////////////////////////////////////////////////
339/// Slot for Rmax2
340
342{
343 Double_t rmin2 = fERmin2->GetNumber();
344 Double_t rmax2 = fERmax2->GetNumber();
345 if (rmax2 < rmin2) {
346 rmax2 = rmin2;
347 fERmax2->SetNumber(rmax2);
348 }
349 DoModified();
350 if (!IsDelayed())
351 DoApply();
352}
353
354////////////////////////////////////////////////////////////////////////////////
355/// Slot for Dz
356
358{
359 Double_t dz = fEDz->GetNumber();
360 if (dz <= 0) {
361 dz = 0.1;
362 fEDz->SetNumber(dz);
363 }
364 DoModified();
365 if (!IsDelayed())
366 DoApply();
367}
368
369/** \class TGeoConeSegEditor
370\ingroup Geometry_builder
371
372Editor for a cone segment.
373
374\image html geom_cons_pic.png
375
376\image html geom_cons_ed.png
377
378*/
379
380
382
383////////////////////////////////////////////////////////////////////////////////
384/// Constructor for cone segment editor
385
387 : TGeoConeEditor(p, width, height, options | kVerticalFrame, back)
388{
389 fLock = kFALSE;
390 MakeTitle("Phi range");
391 TGTextEntry *nef;
392 TGCompositeFrame *compxyz =
394 // Vertical slider
395 fSPhi = new TGDoubleVSlider(compxyz, 100);
396 fSPhi->SetRange(0., 720.);
397 fSPhi->Resize(fSPhi->GetDefaultWidth(), 100);
398 compxyz->AddFrame(fSPhi, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
400 f1->AddFrame(new TGLabel(f1, "Phi min."), new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 6, 0));
401 fEPhi1 = new TGNumberEntry(f1, 0., 5, kCONESEG_PHI1);
402 fEPhi1->Resize(100, fEPhi1->GetDefaultHeight());
404 nef = (TGTextEntry *)fEPhi1->GetNumberEntry();
405 nef->SetToolTipText("Enter the phi1 value");
406 fEPhi1->Associate(this);
407 f1->AddFrame(fEPhi1, new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 2, 2, 2));
408
409 fEPhi2 = new TGNumberEntry(f1, 0., 5, kCONESEG_PHI2);
410 fEPhi2->Resize(100, fEPhi2->GetDefaultHeight());
412 nef = (TGTextEntry *)fEPhi2->GetNumberEntry();
413 nef->SetToolTipText("Enter the phi2 value");
414 fEPhi2->Associate(this);
415 f1->AddFrame(fEPhi2, new TGLayoutHints(kLHintsBottom | kLHintsRight, 2, 2, 2, 2));
416 f1->AddFrame(new TGLabel(f1, "Phi max."), new TGLayoutHints(kLHintsBottom, 0, 0, 6, 2));
417 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
418
419 // compxyz->Resize(150,150);
420 AddFrame(compxyz, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
423}
424
425////////////////////////////////////////////////////////////////////////////////
426/// Destructor
427
429{
430 TGFrameElement *el;
431 TIter next(GetList());
432 while ((el = (TGFrameElement *)next())) {
433 if (el->fFrame->IsComposite())
435 }
436 Cleanup();
437}
438
439////////////////////////////////////////////////////////////////////////////////
440/// Connect signals to slots.
441
443{
445 Disconnect(fApply, "Clicked()", (TGeoConeEditor *)this, "DoApply()");
446 Disconnect(fUndo, "Clicked()", (TGeoConeEditor *)this, "DoUndo()");
447 fApply->Connect("Clicked()", "TGeoConeSegEditor", this, "DoApply()");
448 fUndo->Connect("Clicked()", "TGeoConeSegEditor", this, "DoUndo()");
449 fEPhi1->Connect("ValueSet(Long_t)", "TGeoConeSegEditor", this, "DoPhi1()");
450 fEPhi2->Connect("ValueSet(Long_t)", "TGeoConeSegEditor", this, "DoPhi2()");
451 // fEPhi1->GetNumberEntry()->Connect("TextChanged(const char *)","TGeoConeSegEditor", this, "DoPhi1()");
452 // fEPhi2->GetNumberEntry()->Connect("TextChanged(const char *)","TGeoConeSegEditor", this, "DoPhi2()");
453 fSPhi->Connect("PositionChanged()", "TGeoConeSegEditor", this, "DoPhi()");
454}
455
456////////////////////////////////////////////////////////////////////////////////
457/// Connect to the selected object.
458
460{
461 if (obj == nullptr || (obj->IsA() != TGeoConeSeg::Class())) {
463 return;
464 }
465 fShape = (TGeoCone *)obj;
466 fRmini1 = fShape->GetRmin1();
467 fRmaxi1 = fShape->GetRmax1();
468 fRmini2 = fShape->GetRmin2();
469 fRmaxi2 = fShape->GetRmax2();
470 fDzi = fShape->GetDz();
471 fNamei = fShape->GetName();
472 fPmini = ((TGeoConeSeg *)fShape)->GetPhi1();
473 fPmaxi = ((TGeoConeSeg *)fShape)->GetPhi2();
474 fShapeName->SetText(fShape->GetName());
475 fEPhi1->SetNumber(fPmini);
476 fEPhi2->SetNumber(fPmaxi);
477 fSPhi->SetPosition(fPmini, fPmaxi);
478 fERmin1->SetNumber(fRmini1);
479 fERmax1->SetNumber(fRmaxi1);
480 fERmin2->SetNumber(fRmini2);
481 fERmax2->SetNumber(fRmaxi2);
482 fEDz->SetNumber(fDzi);
483 fApply->SetEnabled(kFALSE);
484 fUndo->SetEnabled(kFALSE);
485
486 if (fInit)
488 SetActive();
489}
490
491////////////////////////////////////////////////////////////////////////////////
492/// Slot for Phi1
493
495{
496 Double_t phi1 = fEPhi1->GetNumber();
497 Double_t phi2 = fEPhi2->GetNumber();
498 if (phi1 > 360 - 1.e-10) {
499 phi1 = 0.;
500 fEPhi1->SetNumber(phi1);
501 }
502 if (phi2 < phi1 + 1.e-10) {
503 phi1 = phi2 - 0.1;
504 fEPhi1->SetNumber(phi1);
505 }
506 if (!fLock) {
507 DoModified();
508 fLock = kTRUE;
509 fSPhi->SetPosition(phi1, phi2);
510 } else
511 fLock = kFALSE;
512 if (!IsDelayed())
513 DoApply();
514}
515
516////////////////////////////////////////////////////////////////////////////////
517/// Slot for Phi2
518
520{
521 Double_t phi1 = fEPhi1->GetNumber();
522 Double_t phi2 = fEPhi2->GetNumber();
523 if (phi2 - phi1 > 360.) {
524 phi2 -= 360.;
525 fEPhi2->SetNumber(phi2);
526 }
527 if (phi2 < phi1 + 1.e-10) {
528 phi2 = phi1 + 0.1;
529 fEPhi2->SetNumber(phi2);
530 }
531 if (!fLock) {
532 DoModified();
533 fLock = kTRUE;
534 fSPhi->SetPosition(phi1, phi2);
535 } else
536 fLock = kFALSE;
537 if (!IsDelayed())
538 DoApply();
539}
540
541////////////////////////////////////////////////////////////////////////////////
542/// Slot for Phi
543
545{
546 if (!fLock) {
547 DoModified();
548 fLock = kTRUE;
549 fEPhi1->SetNumber(fSPhi->GetMinPosition());
550 fLock = kTRUE;
551 fEPhi2->SetNumber(fSPhi->GetMaxPosition());
552 } else
553 fLock = kFALSE;
554 if (!IsDelayed())
555 DoApply();
556}
557
558////////////////////////////////////////////////////////////////////////////////
559/// Slot for applying current parameters.
560
562{
563 fApply->SetEnabled(kFALSE);
564 const char *name = fShapeName->GetText();
565 if (strcmp(name, fShape->GetName()))
566 fShape->SetName(name);
567 Double_t rmin1 = fERmin1->GetNumber();
568 Double_t rmax1 = fERmax1->GetNumber();
569 if (rmin1 < 0 || rmax1 < rmin1)
570 return;
571 Double_t rmin2 = fERmin2->GetNumber();
572 Double_t rmax2 = fERmax2->GetNumber();
573 if (rmin2 < 0 || rmax2 < rmin2)
574 return;
575 Double_t dz = fEDz->GetNumber();
576 Double_t phi1 = fEPhi1->GetNumber();
577 Double_t phi2 = fEPhi2->GetNumber();
578 if ((phi2 - phi1) > 360.001) {
579 phi1 = 0.;
580 phi2 = 360.;
581 fEPhi1->SetNumber(phi1);
582 fEPhi2->SetNumber(phi2);
583 fLock = kTRUE;
584 fSPhi->SetPosition(phi1, phi2);
585 fLock = kFALSE;
586 }
587 ((TGeoConeSeg *)fShape)->SetConsDimensions(dz, rmin1, rmax1, rmin2, rmax2, phi1, phi2);
588 fShape->ComputeBBox();
589 fUndo->SetEnabled();
590 if (fPad) {
591 if (gGeoManager && gGeoManager->GetPainter() && gGeoManager->GetPainter()->IsPaintingShape()) {
592 fShape->Draw();
593 fPad->GetView()->ShowAxis();
594 } else
595 Update();
596 }
597}
598
599////////////////////////////////////////////////////////////////////////////////
600/// Slot for undoing last operation.
601
603{
604 fERmin1->SetNumber(fRmini1);
605 fERmin2->SetNumber(fRmini2);
606 fERmax1->SetNumber(fRmaxi1);
607 fERmax2->SetNumber(fRmaxi2);
608 fEDz->SetNumber(fDzi);
609 fEPhi1->SetNumber(fPmini);
610 fEPhi2->SetNumber(fPmaxi);
611 fSPhi->SetPosition(fPmini, fPmaxi);
612 DoApply();
613 fUndo->SetEnabled(kFALSE);
614 fApply->SetEnabled(kFALSE);
615}
@ kRaisedFrame
Definition GuiTypes.h:385
@ kSunkenFrame
Definition GuiTypes.h:384
@ kVerticalFrame
Definition GuiTypes.h:382
@ kFixedWidth
Definition GuiTypes.h:388
@ kHorizontalFrame
Definition GuiTypes.h:383
@ kFixedHeight
Definition GuiTypes.h:390
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:41
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
@ kButtonDown
Definition TGButton.h:54
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
char name[80]
Definition TGX11.cxx:148
ETGeoConeWid
@ kCONE_RMAX2
@ kCONE_NAME
@ kCONE_RMIN2
@ kCONE_Z
@ kCONE_RMAX1
@ kCONE_RMIN1
@ kCONE_APPLY
@ kCONE_UNDO
ETGeoConeSegWid
@ kCONESEG_PHI
@ kCONESEG_PHI2
@ kCONESEG_PHI1
externTGeoManager * gGeoManager
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
virtual TList * GetList() const
Definition TGFrame.h:312
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:959
TGCompositeFrame(const TGCompositeFrame &)=delete
Dragging the slider will generate the event:
TGFrame * fFrame
Definition TGLayout.h:112
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
virtual Bool_t IsComposite() const
Definition TGFrame.h:214
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGNumberEntry is a number entry input widget with up/down buttons.
@ kNEAPositive
Positive number.
@ kNEANonNegative
Non-negative number.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
ROOT GUI Window base class.
Definition TGWindow.h:23
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
TGNumberEntry * fERmin1
TGeoCone * fShape
Bool_t fIsShapeEditable
TGCompositeFrame * fDFrame
void DoModified()
Slot for modifying current parameters.
TGTextButton * fUndo
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGCheckButton * fDelayed
~TGeoConeEditor() override
Destructor.
TGNumberEntry * fEDz
TGNumberEntry * fERmax1
void DoRmin2()
Slot for Rmin2.
virtual void DoUndo()
Slot for undoing current operation.
TGeoConeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoName()
Slot for name.
TGNumberEntry * fERmax2
TGCompositeFrame * fBFrame
void DoRmin1()
Slot for Rmin1.
void DoRmax1()
Slot for Rmax1.
TGTextEntry * fShapeName
void SetModel(TObject *obj) override
Connect to the selected object.
TGNumberEntry * fERmin2
void DoDz()
Slot for Dz.
void DoRmax2()
Slot for Rmax2.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TGTextButton * fApply
virtual void DoApply()
Slot for applying current parameters.
void DoPhi1()
Slot for Phi1.
TGNumberEntry * fEPhi2
~TGeoConeSegEditor() override
Destructor.
TGeoConeSegEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for cone segment editor.
void SetModel(TObject *obj) override
Connect to the selected object.
void ConnectSignals2Slots() override
Connect signals to slots.
void DoUndo() override
Slot for undoing last operation.
TGDoubleVSlider * fSPhi
void DoPhi2()
Slot for Phi2.
void DoApply() override
Slot for applying current parameters.
TGNumberEntry * fEPhi1
void DoPhi()
Slot for Phi.
static TClass * Class()
static TClass * Class()
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
TVirtualPad * fPad
TGeoGedFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
Move frame fr at the end of the list of parent p.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
Mother of all ROOT objects.
Definition TObject.h:42
virtual TClass * IsA() const
Definition TObject.h:248
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
TF1 * f1
Definition legend1.C:11