Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGeoConeEditor.h
Go to the documentation of this file.
1 // @(#):$Id$
2 // Author: M.Gheata
3 /*************************************************************************
4  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_TGeoConeEditor
12 #define ROOT_TGeoConeEditor
13 
14 #include "TGWidget.h"
15 #include "TGeoGedFrame.h"
16 
17 class TGeoCone;
18 class TGeoConeSeg;
19 class TGeoTabManager;
20 class TGTextEntry;
21 class TGNumberEntry;
22 class TGTab;
23 class TGComboBox;
24 class TGTextButton;
25 class TGCheckButton;
26 class TString;
27 
28 class TGeoConeEditor : public TGeoGedFrame {
29 
30 protected:
31 
32  Double_t fRmini1; // Initial inner radius at -dz
33  Double_t fRmaxi1; // Initial outer radius at -dz
34  Double_t fRmini2; // Initial inner radius at +dz
35  Double_t fRmaxi2; // Initial outer radius at +dz
36  Double_t fDzi; // Initial box dz
37  TString fNamei; // Initial name
38  TGeoCone *fShape; // Shape object
39  Bool_t fIsModified; // Flag that volume was modified
40  Bool_t fIsShapeEditable; // Flag that the shape can be changed
41  TGTextEntry *fShapeName; // Shape name text entry
42  TGNumberEntry *fERmin1; // Number entry for rmin1
43  TGNumberEntry *fERmin2; // Number entry for rmin2
44  TGNumberEntry *fERmax1; // Number entry for rmax1
45  TGNumberEntry *fERmax2; // Number entry for rmax2
46  TGNumberEntry *fEDz; // Number entry for DZ
47  TGTextButton *fApply; // Apply-Button to accept changes
48  TGTextButton *fUndo; // Undo-Button
49  TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
50  TGCheckButton *fDelayed; // Check button for delayed draw
51  TGCompositeFrame *fDFrame; // Frame containing Delayed draw
52 
53  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
54  Bool_t IsDelayed() const;
55 
56 public:
57  TGeoConeEditor(const TGWindow *p = 0,
58  Int_t width = 140, Int_t height = 30,
59  UInt_t options = kChildFrame,
60  Pixel_t back = GetDefaultFrameBackground());
61  virtual ~TGeoConeEditor();
62  virtual void SetModel(TObject *obj);
63 
64  void DoRmin1();
65  void DoRmin2();
66  void DoRmax1();
67  void DoRmax2();
68  void DoDz();
69  void DoModified();
70  void DoName();
71  virtual void DoApply();
72  virtual void DoUndo();
73 
74  ClassDef(TGeoConeEditor,0) // TGeoCone editor
75 };
76 
77 
78 class TGDoubleVSlider;
79 
80 class TGeoConeSegEditor : public TGeoConeEditor {
81 
82 protected:
83 
84  Bool_t fLock; // Phi lock
85  Double_t fPmini; // Initial phi min
86  Double_t fPmaxi; // Initial phi max
87  TGDoubleVSlider *fSPhi; // Phi slider
88  TGNumberEntry *fEPhi1; // Number entry for phi1
89  TGNumberEntry *fEPhi2; // Number entry for phi2
90 
91  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
92 
93 public:
94  TGeoConeSegEditor(const TGWindow *p = 0,
95  Int_t width = 140, Int_t height = 30,
96  UInt_t options = kChildFrame,
97  Pixel_t back = GetDefaultFrameBackground());
98  virtual ~TGeoConeSegEditor();
99  virtual void SetModel(TObject *obj);
100 
101  void DoPhi();
102  void DoPhi1();
103  void DoPhi2();
104  virtual void DoApply();
105  virtual void DoUndo();
106 
107  ClassDef(TGeoConeSegEditor,0) // TGeoConeSeg editor
108 };
109 
110 #endif