Logo ROOT   6.14/05
Reference Guide
TGeoMaterialEditor.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_TGeoMaterialEditor
12 #define ROOT_TGeoMaterialEditor
13 
14 #include "TGWidget.h"
15 #include "TGeoGedFrame.h"
16 
17 class TGeoMaterial;
18 class TGeoTabManager;
19 class TGTextEntry;
20 class TGNumberEntry;
21 class TGTab;
22 class TGComboBox;
23 class TGTextButton;
24 class TGCanvas;
25 class TString;
26 
28 
29 protected:
30 
31  Double_t fAi; // Initial atomic mass
32  Int_t fZi; // Initial Z
33  Int_t fStatei; // Initial material state
34  Double_t fDensityi; // Initial density
35  Double_t fTempi; // Initial temperature
36  Double_t fPresi; // Initial pressure
37  TString fNamei; // Initial name
38  TGeoMaterial *fMaterial; // Material object
39  Bool_t fIsModified; // Flag that material was modified
40  Bool_t fIsMaterialEditable; // Flag that the material can be changed
41 
42  TGTextEntry *fMaterialName; // Material name text entry
43  TGNumberEntry *fMatA; // Number entry for A
44  TGNumberEntry *fMatZ; // Number entry for Z
45  TGComboBox *fMatState; // Material state
46  TGNumberEntry *fMatDensity; // Number entry for density
47  TGNumberEntry *fMatTemperature; // Number entry for temperature
48  TGNumberEntry *fMatPressure; // Number entry for pressure
49  TGNumberEntry *fMatRadLen; // Number entry for radiation length
50  TGNumberEntry *fMatAbsLen; // Number entry for absorption length
51  TGCompositeFrame *f23; // Frame for buttons
52  TGTextButton *fApply; // Apply-Button to accept changes
53  TGTextButton *fUndo; // Undo-Button
54 
55  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
56 
57 public:
58  TGeoMaterialEditor(const TGWindow *p = 0,
59  Int_t width = 140, Int_t height = 30,
60  UInt_t options = kChildFrame,
62  virtual ~TGeoMaterialEditor();
63  virtual void SetModel(TObject *obj);
64 
65  void DoA();
66  void DoZ();
67  void DoDensity();
68  void DoModified();
69  void DoName();
70  void DoRadAbs();
71  void DoState(Int_t state);
72  void DoTemperature();
73  void DoPressure();
74  void DoApply();
75  void DoUndo();
76 
77  ClassDef(TGeoMaterialEditor,0) // TGeoMaterial editor
78 };
79 
80 class TGCheckButton;
81 class TGeoMixture;
82 
84 
85 protected:
86 
87  TGeoMixture *fMixture; // Mixture object
88 
89  TGComboBox *fMixElem; // Combo box for elements
90  TGLabel *fNelem; // Label for number of elements
91  TGLabel *fAelem; // Label for A
92  TGLabel *fZelem; // Label for Z
93  TGCheckButton *fChkFraction; // Check button for fraction by weight.
94  TGNumberEntry *fNEFraction; // Number entry for fraction value
95  TGCheckButton *fChkNatoms; // Check button for number of atoms
96  TGNumberEntry *fNENatoms; // Number entry for number of atoms
97  TGTextButton *fBAddElem; // Button for adding element as component
98  TGCompositeFrame *fComps; // Frame with components
99 
100  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
101 
102 public:
103  TGeoMixtureEditor(const TGWindow *p = 0,
104  Int_t width = 140, Int_t height = 30,
105  UInt_t options = kChildFrame,
107  virtual ~TGeoMixtureEditor() {}
108  virtual void SetModel(TObject *obj);
109  void UpdateElements();
110 
111  void DoApply1();
112  void DoUndo1();
113  void DoChkFraction();
114  void DoChkNatoms();
115  void DoFraction();
116  void DoNatoms();
117  void DoSelectElement(Int_t iel);
118  void DoAddElem();
119 
120  ClassDef(TGeoMixtureEditor,0) // TGeoMixture editor
121 };
122 
123 #endif
TGTextButton * fApply
TGNumberEntry * fMatA
Mixtures of elements.
Definition: TGeoMaterial.h:134
TGNumberEntry * fMatTemperature
Definition: TGTab.h:62
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
Manager for all editor tabs.
void DoZ()
Slot for charge.
TGeoMaterialEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for material editor.
void DoState(Int_t state)
Slot for material state.
void DoPressure()
Slot for material pressure.
TGCompositeFrame * fComps
void DoModified()
Slot for signaling modifications.
Basic string class.
Definition: TString.h:131
Base class describing materials.
Definition: TGeoMaterial.h:29
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void ConnectSignals2Slots()
Connect signals to slots.
Editors for materials.
void DoDensity()
Slot for density.
TGNumberEntry * fMatZ
virtual void SetModel(TObject *obj)
Connect to the selected material.
TGNumberEntry * fMatDensity
TGTextEntry * fMaterialName
void DoName()
Perform name change.
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
void DoUndo()
Slot for cancelling current modifications.
virtual ~TGeoMaterialEditor()
Destructor.
TGNumberEntry * fMatAbsLen
TGCompositeFrame * f23
TGTextButton * fUndo
TGCheckButton * fChkFraction
void DoA()
Slot for atomic mass.
TGTextButton * fBAddElem
TGeoMixture * fMixture
TGNumberEntry * fNENatoms
unsigned int UInt_t
Definition: RtypesCore.h:42
TGeoMaterial * fMaterial
void DoApply()
Slot for applying modifications.
double Double_t
Definition: RtypesCore.h:55
Editors for mixtures.
void DoRadAbs()
Slot for radiation/absorption length.
Mother of all ROOT objects.
Definition: TObject.h:37
TGNumberEntry * fNEFraction
TGCheckButton * fChkNatoms
void DoTemperature()
Slot for material temperature.
TGNumberEntry * fMatRadLen
TGNumberEntry * fMatPressure
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13