00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ROOT_TGeoPconEditor
00012 #define ROOT_TGeoPconEditor
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ROOT_TGButton
00023 #include "TGWidget.h"
00024 #endif
00025 #ifndef ROOT_TGeoGedFrame
00026 #include "TGeoGedFrame.h"
00027 #endif
00028
00029 class TGeoPcon;
00030 class TGeoPconSection;
00031 class TGeoTabManager;
00032 class TGTextEntry;
00033 class TGNumberEntry;
00034 class TGTab;
00035 class TGComboBox;
00036 class TGTextButton;
00037 class TGCheckButton;
00038 class TGCanvas;
00039 class TString;
00040
00041 class TGeoPconEditor : public TGeoGedFrame {
00042
00043 protected:
00044 Int_t fNsecti;
00045 Double_t fPhi1i;
00046 Double_t fDPhii;
00047 Double_t *fZi;
00048 Double_t *fRmini;
00049 Double_t *fRmaxi;
00050 Int_t fNsections;
00051 TObjArray *fSections;
00052 TGCanvas *fCan;
00053 TGeoPcon *fShape;
00054 Bool_t fIsModified;
00055 Bool_t fIsShapeEditable;
00056
00057 TGLayoutHints *fLHsect;
00058 TGTextEntry *fShapeName;
00059 TGNumberEntry *fENz;
00060 TGNumberEntry *fEPhi1;
00061 TGNumberEntry *fEDPhi;
00062 TGTextButton *fApply;
00063 TGTextButton *fUndo;
00064 TGCompositeFrame *fBFrame;
00065 TGCheckButton *fDelayed;
00066 TGCompositeFrame *fDFrame;
00067
00068 virtual void ConnectSignals2Slots();
00069 Bool_t CheckSections(Bool_t change=kFALSE);
00070 Bool_t IsDelayed() const;
00071 void CreateSections(Int_t inew);
00072 void UpdateSections();
00073 virtual void CreateEdges() {;}
00074 public:
00075 TGeoPconEditor(const TGWindow *p = 0,
00076 Int_t width = 140, Int_t height = 30,
00077 UInt_t options = kChildFrame,
00078 Pixel_t back = GetDefaultFrameBackground());
00079 virtual ~TGeoPconEditor();
00080 virtual void SetModel(TObject *obj);
00081
00082 void DoModified();
00083 void DoName();
00084 void DoNz();
00085 void DoPhi();
00086 void DoSectionChange(Int_t i);
00087 virtual void DoApply();
00088 virtual void DoUndo();
00089
00090 ClassDef(TGeoPconEditor,0)
00091 };
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 class TGeoPconSection : public TGCompositeFrame, public TGWidget {
00102
00103 protected:
00104 Int_t fNumber;
00105 TGNumberEntry *fEZ;
00106 TGNumberEntry *fERmin;
00107 TGNumberEntry *fERmax;
00108
00109 virtual void ConnectSignals2Slots();
00110
00111 public:
00112 TGeoPconSection(const TGWindow *p, UInt_t w, UInt_t h, Int_t id);
00113 virtual ~TGeoPconSection();
00114 void HideDaughters();
00115 Double_t GetZ() const;
00116 Double_t GetRmin() const;
00117 Double_t GetRmax() const;
00118 void SetZ(Double_t z);
00119 void SetRmin(Double_t rmin);
00120 void SetRmax(Double_t rmax);
00121
00122 void DoZ();
00123 void DoRmin();
00124 void DoRmax();
00125
00126 virtual void Changed(Int_t i);
00127
00128 ClassDef(TGeoPconSection,0)
00129 };
00130 #endif