00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ROOT_TGeoMaterialEditor
00012 #define ROOT_TGeoMaterialEditor
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 TGeoMaterial;
00030 class TGeoTabManager;
00031 class TGTextEntry;
00032 class TGNumberEntry;
00033 class TGTab;
00034 class TGComboBox;
00035 class TGTextButton;
00036 class TGCanvas;
00037 class TString;
00038
00039 class TGeoMaterialEditor : public TGeoGedFrame {
00040
00041 protected:
00042
00043 Double_t fAi;
00044 Int_t fZi;
00045 Int_t fStatei;
00046 Double_t fDensityi;
00047 Double_t fTempi;
00048 Double_t fPresi;
00049 TString fNamei;
00050 TGeoMaterial *fMaterial;
00051 Bool_t fIsModified;
00052 Bool_t fIsMaterialEditable;
00053
00054 TGTextEntry *fMaterialName;
00055 TGNumberEntry *fMatA;
00056 TGNumberEntry *fMatZ;
00057 TGComboBox *fMatState;
00058 TGNumberEntry *fMatDensity;
00059 TGNumberEntry *fMatTemperature;
00060 TGNumberEntry *fMatPressure;
00061 TGNumberEntry *fMatRadLen;
00062 TGNumberEntry *fMatAbsLen;
00063 TGCompositeFrame *f23;
00064 TGTextButton *fApply;
00065 TGTextButton *fUndo;
00066
00067 virtual void ConnectSignals2Slots();
00068
00069 public:
00070 TGeoMaterialEditor(const TGWindow *p = 0,
00071 Int_t width = 140, Int_t height = 30,
00072 UInt_t options = kChildFrame,
00073 Pixel_t back = GetDefaultFrameBackground());
00074 virtual ~TGeoMaterialEditor();
00075 virtual void SetModel(TObject *obj);
00076
00077 void DoA();
00078 void DoZ();
00079 void DoDensity();
00080 void DoModified();
00081 void DoName();
00082 void DoRadAbs();
00083 void DoState(Int_t state);
00084 void DoTemperature();
00085 void DoPressure();
00086 void DoApply();
00087 void DoUndo();
00088
00089 ClassDef(TGeoMaterialEditor,0)
00090 };
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 class TGCheckButton;
00101 class TGeoMixture;
00102
00103 class TGeoMixtureEditor : public TGeoMaterialEditor {
00104
00105 protected:
00106
00107 TGeoMixture *fMixture;
00108
00109 TGComboBox *fMixElem;
00110 TGLabel *fNelem;
00111 TGLabel *fAelem;
00112 TGLabel *fZelem;
00113 TGCheckButton *fChkFraction;
00114 TGNumberEntry *fNEFraction;
00115 TGCheckButton *fChkNatoms;
00116 TGNumberEntry *fNENatoms;
00117 TGTextButton *fBAddElem;
00118 TGCompositeFrame *fComps;
00119
00120 virtual void ConnectSignals2Slots();
00121
00122 public:
00123 TGeoMixtureEditor(const TGWindow *p = 0,
00124 Int_t width = 140, Int_t height = 30,
00125 UInt_t options = kChildFrame,
00126 Pixel_t back = GetDefaultFrameBackground());
00127 virtual ~TGeoMixtureEditor() {}
00128 virtual void SetModel(TObject *obj);
00129 void UpdateElements();
00130
00131 void DoApply1();
00132 void DoUndo1();
00133 void DoChkFraction();
00134 void DoChkNatoms();
00135 void DoFraction();
00136 void DoNatoms();
00137 void DoSelectElement(Int_t iel);
00138 void DoAddElem();
00139
00140 ClassDef(TGeoMixtureEditor,0)
00141 };
00142
00143 #endif