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
37
39
40////////////////////////////////////////////////////////////////////////////////
41/// Constructor for volume editor
42
44 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
45{
46 fShape = nullptr;
47 fRmini1 = fRmaxi1 = fRmini2 = fRmaxi2 = fDzi = 0.0;
48 fNamei = "";
51
52 // TextEntry for shape name
53 MakeTitle("Name");
54 fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kCONE_NAME);
56 fShapeName->SetToolTipText("Enter the cone name");
57 fShapeName->Associate(this);
59
60 TGTextEntry *nef;
61 MakeTitle("Cone dimensions");
62 TGCompositeFrame *compxyz = new TGCompositeFrame(this, 118, 30, kVerticalFrame | kRaisedFrame);
63
64 // Number entry for Rmin1
66 f1->AddFrame(new TGLabel(f1, "Rmin1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
67 fERmin1 = new TGNumberEntry(f1, 0., 5, kCONE_RMIN1);
70 nef->SetToolTipText("Enter the inner radius");
71 fERmin1->Associate(this);
73 f1->AddFrame(fERmin1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
74 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
75
76 // Number entry for Rmax1
77 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
78 f1->AddFrame(new TGLabel(f1, "Rmax1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
79 fERmax1 = new TGNumberEntry(f1, 0., 5, kCONE_RMAX1);
82 nef->SetToolTipText("Enter the outer radius");
83 fERmax1->Associate(this);
85 f1->AddFrame(fERmax1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
86 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
87
88 // Number entry for Rmin2
89 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
90 f1->AddFrame(new TGLabel(f1, "Rmin2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
91 fERmin2 = new TGNumberEntry(f1, 0., 5, kCONE_RMIN2);
94 nef->SetToolTipText("Enter the inner radius");
95 fERmin2->Associate(this);
97 f1->AddFrame(fERmin2, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
98 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
99
100 // Number entry for Rmax2
101 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
102 f1->AddFrame(new TGLabel(f1, "Rmax2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
103 fERmax2 = new TGNumberEntry(f1, 0., 5, kCONE_RMAX2);
106 nef->SetToolTipText("Enter the outer radius");
107 fERmax2->Associate(this);
109 f1->AddFrame(fERmax2, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
110 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
111
112 // Number entry for dz
113 f1 = new TGCompositeFrame(compxyz, 155, 30, kHorizontalFrame | kFixedWidth);
114 f1->AddFrame(new TGLabel(f1, "DZ"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
115 fEDz = new TGNumberEntry(f1, 0., 5, kCONE_Z);
117 nef = (TGTextEntry *)fEDz->GetNumberEntry();
118 nef->SetToolTipText("Enter the cone half-lenth in Z");
119 fEDz->Associate(this);
121 f1->AddFrame(fEDz, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
122 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
123
124 compxyz->Resize(150, 30);
125 AddFrame(compxyz, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
126
127 // Delayed draw
129 fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
131 AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
132
133 // Buttons
135 fApply = new TGTextButton(fBFrame, "Apply");
136 fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
137 fApply->Associate(this);
138 fUndo = new TGTextButton(fBFrame, "Undo");
139 fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
140 fUndo->Associate(this);
141 AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
143}
144
145////////////////////////////////////////////////////////////////////////////////
146/// Destructor
147
149{
150 TGFrameElement *el;
151 TIter next(GetList());
152 while ((el = (TGFrameElement *)next())) {
153 if (el->fFrame->IsComposite())
155 }
156 Cleanup();
157}
158
159////////////////////////////////////////////////////////////////////////////////
160/// Connect signals to slots.
161
163{
164 fApply->Connect("Clicked()", "TGeoConeEditor", this, "DoApply()");
165 fUndo->Connect("Clicked()", "TGeoConeEditor", this, "DoUndo()");
166 fShapeName->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoModified()");
167 fERmin1->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmin1()");
168 fERmin2->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmin2()");
169 fERmax1->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmax1()");
170 fERmax2->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoRmax2()");
171 fEDz->Connect("ValueSet(Long_t)", "TGeoConeEditor", this, "DoDz()");
172 fERmin1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmin1()");
173 fERmin2->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmin2()");
174 fERmax1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmax1()");
175 fERmax2->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoRmax2()");
176 fEDz->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoConeEditor", this, "DoDz()");
177 fInit = kFALSE;
178}
179
180////////////////////////////////////////////////////////////////////////////////
181/// Connect to the selected object.
182
184{
185 if (obj == nullptr || (obj->IsA() != TGeoCone::Class())) {
187 return;
188 }
189 fShape = (TGeoCone *)obj;
194 fDzi = fShape->GetDz();
195 fNamei = fShape->GetName();
204
205 if (fInit)
207 SetActive();
208}
209
210////////////////////////////////////////////////////////////////////////////////
211/// Check if shape drawing is delayed.
212
214{
215 return (fDelayed->GetState() == kButtonDown);
216}
217
218////////////////////////////////////////////////////////////////////////////////
219/// Slot for name.
220
222{
223 DoModified();
224}
225
226////////////////////////////////////////////////////////////////////////////////
227/// Slot for applying current parameters.
228
230{
232 const char *name = fShapeName->GetText();
233 if (strcmp(name, fShape->GetName()))
235 Double_t rmin1 = fERmin1->GetNumber();
236 Double_t rmin2 = fERmin2->GetNumber();
237 Double_t rmax1 = fERmax1->GetNumber();
238 Double_t rmax2 = fERmax2->GetNumber();
239 Double_t dz = fEDz->GetNumber();
240 if (rmin1 < 0 || rmin1 > rmax1)
241 return;
242 if (rmin2 < 0 || rmin2 > rmax2)
243 return;
244 if (dz <= 0)
245 return;
246 if (rmin1 == rmax1 && rmin2 == rmax2)
247 return;
248 fShape->SetConeDimensions(dz, rmin1, rmax1, rmin2, rmax2);
250 fUndo->SetEnabled();
251 if (fPad) {
253 fShape->Draw();
254 fPad->GetView()->ShowAxis();
255 } else
256 Update();
257 }
258}
259
260////////////////////////////////////////////////////////////////////////////////
261/// Slot for modifying current parameters.
262
264{
266}
267
268////////////////////////////////////////////////////////////////////////////////
269/// Slot for undoing current operation.
270
272{
278 DoApply();
281}
282
283////////////////////////////////////////////////////////////////////////////////
284/// Slot for Rmin1
285
287{
288 Double_t rmin1 = fERmin1->GetNumber();
289 Double_t rmax1 = fERmax1->GetNumber();
290 if (rmin1 < 0) {
291 rmin1 = 0;
292 fERmin1->SetNumber(rmin1);
293 }
294 if (rmin1 > rmax1) {
295 rmin1 = rmax1;
296 fERmin1->SetNumber(rmin1);
297 }
298 DoModified();
299 if (!IsDelayed())
300 DoApply();
301}
302
303////////////////////////////////////////////////////////////////////////////////
304/// Slot for Rmax1
305
307{
308 Double_t rmin1 = fERmin1->GetNumber();
309 Double_t rmax1 = fERmax1->GetNumber();
310 if (rmax1 < rmin1) {
311 rmax1 = rmin1;
312 fERmax1->SetNumber(rmax1);
313 }
314 DoModified();
315 if (!IsDelayed())
316 DoApply();
317}
318
319////////////////////////////////////////////////////////////////////////////////
320/// Slot for Rmin2
321
323{
324 Double_t rmin2 = fERmin2->GetNumber();
325 Double_t rmax2 = fERmax2->GetNumber();
326 if (rmin2 < 0) {
327 rmin2 = 0;
328 fERmin2->SetNumber(rmin2);
329 }
330 if (rmin2 > rmax2) {
331 rmin2 = rmax2;
332 fERmin2->SetNumber(rmin2);
333 }
334 DoModified();
335 if (!IsDelayed())
336 DoApply();
337}
338
339////////////////////////////////////////////////////////////////////////////////
340/// Slot for Rmax2
341
343{
344 Double_t rmin2 = fERmin2->GetNumber();
345 Double_t rmax2 = fERmax2->GetNumber();
346 if (rmax2 < rmin2) {
347 rmax2 = rmin2;
348 fERmax2->SetNumber(rmax2);
349 }
350 DoModified();
351 if (!IsDelayed())
352 DoApply();
353}
354
355////////////////////////////////////////////////////////////////////////////////
356/// Slot for Dz
357
359{
360 Double_t dz = fEDz->GetNumber();
361 if (dz <= 0) {
362 dz = 0.1;
363 fEDz->SetNumber(dz);
364 }
365 DoModified();
366 if (!IsDelayed())
367 DoApply();
368}
369
370/** \class TGeoConeSegEditor
371\ingroup Geometry_builder
372
373Editor for a cone segment.
374
375\image html geom_cons_pic.png
376
377\image html geom_cons_ed.png
378
379*/
380
382
384
385////////////////////////////////////////////////////////////////////////////////
386/// Constructor for cone segment editor
387
389 : TGeoConeEditor(p, width, height, options | kVerticalFrame, back)
390{
391 fLock = kFALSE;
392 MakeTitle("Phi range");
393 TGTextEntry *nef;
394 TGCompositeFrame *compxyz =
396 // Vertical slider
397 fSPhi = new TGDoubleVSlider(compxyz, 100);
398 fSPhi->SetRange(0., 720.);
400 compxyz->AddFrame(fSPhi, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
402 f1->AddFrame(new TGLabel(f1, "Phi min."), new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 6, 0));
403 fEPhi1 = new TGNumberEntry(f1, 0., 5, kCONESEG_PHI1);
407 nef->SetToolTipText("Enter the phi1 value");
408 fEPhi1->Associate(this);
409 f1->AddFrame(fEPhi1, new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 2, 2, 2));
410
411 fEPhi2 = new TGNumberEntry(f1, 0., 5, kCONESEG_PHI2);
415 nef->SetToolTipText("Enter the phi2 value");
416 fEPhi2->Associate(this);
417 f1->AddFrame(fEPhi2, new TGLayoutHints(kLHintsBottom | kLHintsRight, 2, 2, 2, 2));
418 f1->AddFrame(new TGLabel(f1, "Phi max."), new TGLayoutHints(kLHintsBottom, 0, 0, 6, 2));
419 compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
420
421 // compxyz->Resize(150,150);
422 AddFrame(compxyz, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
425}
426
427////////////////////////////////////////////////////////////////////////////////
428/// Destructor
429
431{
432 TGFrameElement *el;
433 TIter next(GetList());
434 while ((el = (TGFrameElement *)next())) {
435 if (el->fFrame->IsComposite())
437 }
438 Cleanup();
439}
440
441////////////////////////////////////////////////////////////////////////////////
442/// Connect signals to slots.
443
445{
447 Disconnect(fApply, "Clicked()", (TGeoConeEditor *)this, "DoApply()");
448 Disconnect(fUndo, "Clicked()", (TGeoConeEditor *)this, "DoUndo()");
449 fApply->Connect("Clicked()", "TGeoConeSegEditor", this, "DoApply()");
450 fUndo->Connect("Clicked()", "TGeoConeSegEditor", this, "DoUndo()");
451 fEPhi1->Connect("ValueSet(Long_t)", "TGeoConeSegEditor", this, "DoPhi1()");
452 fEPhi2->Connect("ValueSet(Long_t)", "TGeoConeSegEditor", this, "DoPhi2()");
453 // fEPhi1->GetNumberEntry()->Connect("TextChanged(const char *)","TGeoConeSegEditor", this, "DoPhi1()");
454 // fEPhi2->GetNumberEntry()->Connect("TextChanged(const char *)","TGeoConeSegEditor", this, "DoPhi2()");
455 fSPhi->Connect("PositionChanged()", "TGeoConeSegEditor", this, "DoPhi()");
456}
457
458////////////////////////////////////////////////////////////////////////////////
459/// Connect to the selected object.
460
462{
463 if (obj == nullptr || (obj->IsA() != TGeoConeSeg::Class())) {
465 return;
466 }
467 fShape = (TGeoCone *)obj;
472 fDzi = fShape->GetDz();
473 fNamei = fShape->GetName();
474 fPmini = ((TGeoConeSeg *)fShape)->GetPhi1();
475 fPmaxi = ((TGeoConeSeg *)fShape)->GetPhi2();
487
488 if (fInit)
490 SetActive();
491}
492
493////////////////////////////////////////////////////////////////////////////////
494/// Slot for Phi1
495
497{
498 Double_t phi1 = fEPhi1->GetNumber();
499 Double_t phi2 = fEPhi2->GetNumber();
500 if (phi1 > 360 - 1.e-10) {
501 phi1 = 0.;
502 fEPhi1->SetNumber(phi1);
503 }
504 if (phi2 < phi1 + 1.e-10) {
505 phi1 = phi2 - 0.1;
506 fEPhi1->SetNumber(phi1);
507 }
508 if (!fLock) {
509 DoModified();
510 fLock = kTRUE;
511 fSPhi->SetPosition(phi1, phi2);
512 } else
513 fLock = kFALSE;
514 if (!IsDelayed())
515 DoApply();
516}
517
518////////////////////////////////////////////////////////////////////////////////
519/// Slot for Phi2
520
522{
523 Double_t phi1 = fEPhi1->GetNumber();
524 Double_t phi2 = fEPhi2->GetNumber();
525 if (phi2 - phi1 > 360.) {
526 phi2 -= 360.;
527 fEPhi2->SetNumber(phi2);
528 }
529 if (phi2 < phi1 + 1.e-10) {
530 phi2 = phi1 + 0.1;
531 fEPhi2->SetNumber(phi2);
532 }
533 if (!fLock) {
534 DoModified();
535 fLock = kTRUE;
536 fSPhi->SetPosition(phi1, phi2);
537 } else
538 fLock = kFALSE;
539 if (!IsDelayed())
540 DoApply();
541}
542
543////////////////////////////////////////////////////////////////////////////////
544/// Slot for Phi
545
547{
548 if (!fLock) {
549 DoModified();
550 fLock = kTRUE;
552 fLock = kTRUE;
554 } else
555 fLock = kFALSE;
556 if (!IsDelayed())
557 DoApply();
558}
559
560////////////////////////////////////////////////////////////////////////////////
561/// Slot for applying current parameters.
562
564{
566 const char *name = fShapeName->GetText();
567 if (strcmp(name, fShape->GetName()))
569 Double_t rmin1 = fERmin1->GetNumber();
570 Double_t rmax1 = fERmax1->GetNumber();
571 if (rmin1 < 0 || rmax1 < rmin1)
572 return;
573 Double_t rmin2 = fERmin2->GetNumber();
574 Double_t rmax2 = fERmax2->GetNumber();
575 if (rmin2 < 0 || rmax2 < rmin2)
576 return;
577 Double_t dz = fEDz->GetNumber();
578 Double_t phi1 = fEPhi1->GetNumber();
579 Double_t phi2 = fEPhi2->GetNumber();
580 if ((phi2 - phi1) > 360.001) {
581 phi1 = 0.;
582 phi2 = 360.;
583 fEPhi1->SetNumber(phi1);
584 fEPhi2->SetNumber(phi2);
585 fLock = kTRUE;
586 fSPhi->SetPosition(phi1, phi2);
587 fLock = kFALSE;
588 }
589 ((TGeoConeSeg *)fShape)->SetConsDimensions(dz, rmin1, rmax1, rmin2, rmax2, phi1, phi2);
591 fUndo->SetEnabled();
592 if (fPad) {
594 fShape->Draw();
595 fPad->GetView()->ShowAxis();
596 } else
597 Update();
598 }
599}
600
601////////////////////////////////////////////////////////////////////////////////
602/// Slot for undoing last operation.
603
605{
614 DoApply();
617}
@ kRaisedFrame
Definition GuiTypes.h:384
@ kSunkenFrame
Definition GuiTypes.h:383
@ kVerticalFrame
Definition GuiTypes.h:381
@ kFixedWidth
Definition GuiTypes.h:387
@ kHorizontalFrame
Definition GuiTypes.h:382
@ kFixedHeight
Definition GuiTypes.h:389
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassImp(name)
Definition Rtypes.h:377
@ 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
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
char name[80]
Definition TGX11.cxx:110
ETGeoConeWid
@ kCONE_RMAX2
@ kCONE_NAME
@ kCONE_RMIN2
@ kCONE_Z
@ kCONE_RMAX1
@ kCONE_RMIN1
@ kCONE_APPLY
@ kCONE_UNDO
ETGeoConeSegWid
@ kCONESEG_PHI
@ kCONESEG_PHI2
@ kCONESEG_PHI1
R__EXTERN TGeoManager * gGeoManager
virtual EButtonState GetState() const
Definition TGButton.h:112
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition TGButton.cxx:459
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
virtual TList * GetList() const
Definition TGFrame.h:310
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:967
virtual Float_t GetMaxPosition() const
virtual Float_t GetMinPosition() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetPosition(Float_t min, Float_t max)
Dragging the slider will generate the event:
TGFrame * fFrame
Definition TGLayout.h:112
virtual void SetSize(const TGDimension &s)
Definition TGFrame.h:252
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:190
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
TGDimension GetSize() const
Definition TGFrame.h:230
virtual Bool_t IsComposite() const
Definition TGFrame.h:212
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.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
void Associate(const TGWindow *w) override
Make w the window that will receive the generated messages.
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
UInt_t GetDefaultHeight() const override
@ 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
const char * GetText() const
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
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:95
Editor for a TGeoCone.
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.
Editor for a cone segment.
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.
A cone segment is a cone having a range in phi.
Definition TGeoCone.h:99
static TClass * Class()
The cones are defined by 5 parameters:
Definition TGeoCone.h:17
virtual Double_t GetRmax2() const
Definition TGeoCone.h:79
void SetConeDimensions(Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Set cone dimensions.
Definition TGeoCone.cxx:994
virtual Double_t GetDz() const
Definition TGeoCone.h:71
void ComputeBBox() override
compute bounding box of the sphere
Definition TGeoCone.cxx:181
virtual Double_t GetRmin2() const
Definition TGeoCone.h:78
virtual Double_t GetRmin1() const
Definition TGeoCone.h:76
static TClass * Class()
virtual Double_t GetRmax1() const
Definition TGeoCone.h:77
Common base class for geombuilder editors.
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
TVirtualPad * fPad
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TVirtualGeoPainter * GetPainter() const
void Draw(Option_t *option="") override
Draw this shape.
const char * GetName() const override
Get the shape name.
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.
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:140
Mother of all ROOT objects.
Definition TObject.h:41
virtual TClass * IsA() const
Definition TObject.h:243
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:869
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
virtual void ShowAxis()=0
virtual Bool_t IsPaintingShape() const =0
virtual TView * GetView() const =0
TF1 * f1
Definition legend1.C:11