File indexing completed on 2025-01-18 10:11:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TGeoMaterialEditor
0012 #define ROOT_TGeoMaterialEditor
0013
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016
0017 class TGeoMaterial;
0018 class TGeoTabManager;
0019 class TGTextEntry;
0020 class TGNumberEntry;
0021 class TGTab;
0022 class TGComboBox;
0023 class TGTextButton;
0024 class TGCanvas;
0025 class TString;
0026
0027 class TGeoMaterialEditor : public TGeoGedFrame {
0028
0029 protected:
0030 Double_t fAi;
0031 Int_t fZi;
0032 Int_t fStatei;
0033 Double_t fDensityi;
0034 Double_t fTempi;
0035 Double_t fPresi;
0036 TString fNamei;
0037 TGeoMaterial *fMaterial;
0038 Bool_t fIsModified;
0039 Bool_t fIsMaterialEditable;
0040
0041 TGTextEntry *fMaterialName;
0042 TGNumberEntry *fMatA;
0043 TGNumberEntry *fMatZ;
0044 TGComboBox *fMatState;
0045 TGNumberEntry *fMatDensity;
0046 TGNumberEntry *fMatTemperature;
0047 TGNumberEntry *fMatPressure;
0048 TGNumberEntry *fMatRadLen;
0049 TGNumberEntry *fMatAbsLen;
0050 TGCompositeFrame *f23;
0051 TGTextButton *fApply;
0052 TGTextButton *fUndo;
0053
0054 virtual void ConnectSignals2Slots();
0055
0056 public:
0057 TGeoMaterialEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0058 Pixel_t back = GetDefaultFrameBackground());
0059 ~TGeoMaterialEditor() override;
0060 void SetModel(TObject *obj) override;
0061
0062 void DoA();
0063 void DoZ();
0064 void DoDensity();
0065 void DoModified();
0066 void DoName();
0067 void DoRadAbs();
0068 void DoState(Int_t state);
0069 void DoTemperature();
0070 void DoPressure();
0071 void DoApply();
0072 void DoUndo();
0073
0074 ClassDefOverride(TGeoMaterialEditor, 0)
0075 };
0076
0077 class TGCheckButton;
0078 class TGeoMixture;
0079
0080 class TGeoMixtureEditor : public TGeoMaterialEditor {
0081
0082 protected:
0083 TGeoMixture *fMixture;
0084
0085 TGComboBox *fMixElem;
0086 TGLabel *fNelem;
0087 TGLabel *fAelem;
0088 TGLabel *fZelem;
0089 TGCheckButton *fChkFraction;
0090 TGNumberEntry *fNEFraction;
0091 TGCheckButton *fChkNatoms;
0092 TGNumberEntry *fNENatoms;
0093 TGTextButton *fBAddElem;
0094 TGCompositeFrame *fComps;
0095
0096 void ConnectSignals2Slots() override;
0097
0098 public:
0099 TGeoMixtureEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0100 Pixel_t back = GetDefaultFrameBackground());
0101 ~TGeoMixtureEditor() override {}
0102 void SetModel(TObject *obj) override;
0103 void UpdateElements();
0104
0105 void DoApply1();
0106 void DoUndo1();
0107 void DoChkFraction();
0108 void DoChkNatoms();
0109 void DoFraction();
0110 void DoNatoms();
0111 void DoSelectElement(Int_t iel);
0112 void DoAddElem();
0113
0114 ClassDefOverride(TGeoMixtureEditor, 0)
0115 };
0116
0117 #endif