Logo ROOT  
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
TGeoMixtureEditor::fNEFraction
TGNumberEntry * fNEFraction
Definition: TGeoMaterialEditor.h:94
TGeoMixtureEditor::DoUndo1
void DoUndo1()
Slot for undoing all changes.
Definition: TGeoMaterialEditor.cxx:620
TGeoMixtureEditor::DoAddElem
void DoAddElem()
Slot for adding an element. No undo.
Definition: TGeoMaterialEditor.cxx:584
TGWindow
Definition: TGWindow.h:31
TGeoMaterialEditor
Editors for materials.
Definition: TGeoMaterialEditor.h:27
TGeoMaterialEditor::fMatState
TGComboBox * fMatState
Definition: TGeoMaterialEditor.h:45
TGeoGedFrame
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
TGeoMaterialEditor::fMatA
TGNumberEntry * fMatA
Definition: TGeoMaterialEditor.h:43
Pixel_t
ULong_t Pixel_t
Definition: GuiTypes.h:39
TGeoMixtureEditor::DoSelectElement
void DoSelectElement(Int_t iel)
Slot for selecting an element.
Definition: TGeoMaterialEditor.cxx:568
TGeoMaterialEditor::fMatZ
TGNumberEntry * fMatZ
Definition: TGeoMaterialEditor.h:44
TGLabel
Definition: TGLabel.h:32
TGeoMixtureEditor::SetModel
virtual void SetModel(TObject *obj)
Connect to the selected mixture.
Definition: TGeoMaterialEditor.cxx:506
TGeoMaterialEditor::DoDensity
void DoDensity()
Slot for density.
Definition: TGeoMaterialEditor.cxx:316
TGeoMaterialEditor::fMatDensity
TGNumberEntry * fMatDensity
Definition: TGeoMaterialEditor.h:46
TGeoMixtureEditor::fComps
TGCompositeFrame * fComps
Definition: TGeoMaterialEditor.h:98
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGTextButton
Definition: TGButton.h:142
Int_t
int Int_t
Definition: RtypesCore.h:45
TGeoMaterialEditor::DoRadAbs
void DoRadAbs()
Slot for radiation/absorption length.
Definition: TGeoMaterialEditor.cxx:324
TGeoMaterialEditor::DoState
void DoState(Int_t state)
Slot for material state.
Definition: TGeoMaterialEditor.cxx:291
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:668
TGeoMaterialEditor::ConnectSignals2Slots
virtual void ConnectSignals2Slots()
Connect signals to slots.
Definition: TGeoMaterialEditor.cxx:197
TGeoMaterialEditor::DoModified
void DoModified()
Slot for signaling modifications.
Definition: TGeoMaterialEditor.cxx:380
TString
Basic string class.
Definition: TString.h:136
TGeoMaterialEditor::f23
TGCompositeFrame * f23
Definition: TGeoMaterialEditor.h:51
TGeoMixture
Mixtures of elements.
Definition: TGeoMaterial.h:156
TGeoMixtureEditor::fZelem
TGLabel * fZelem
Definition: TGeoMaterialEditor.h:92
TGeoMaterialEditor::fIsMaterialEditable
Bool_t fIsMaterialEditable
Definition: TGeoMaterialEditor.h:40
TGeoMaterial
Base class describing materials.
Definition: TGeoMaterial.h:36
bool
TGeoMaterialEditor::~TGeoMaterialEditor
virtual ~TGeoMaterialEditor()
Destructor.
Definition: TGeoMaterialEditor.cxx:183
TGeoMixtureEditor::fMixElem
TGComboBox * fMixElem
Definition: TGeoMaterialEditor.h:89
TGeoMaterialEditor::fUndo
TGTextButton * fUndo
Definition: TGeoMaterialEditor.h:53
TGeoMixtureEditor::fMixture
TGeoMixture * fMixture
Definition: TGeoMaterialEditor.h:87
TGeoMaterialEditor::DoName
void DoName()
Perform name change.
Definition: TGeoMaterialEditor.cxx:249
TGCheckButton
Definition: TGButton.h:264
TGeoMixtureEditor::DoFraction
void DoFraction()
Fraction changed.
Definition: TGeoMaterialEditor.cxx:548
TGeoMaterialEditor::DoA
void DoA()
Slot for atomic mass.
Definition: TGeoMaterialEditor.cxx:257
TGeoGedFrame.h
TGeoMaterialEditor::fZi
Int_t fZi
Definition: TGeoMaterialEditor.h:32
TGeoMaterialEditor::fMaterial
TGeoMaterial * fMaterial
Definition: TGeoMaterialEditor.h:38
TGeoMixtureEditor::TGeoMixtureEditor
TGeoMixtureEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for mixture editor.
Definition: TGeoMaterialEditor.cxx:397
TGeoMaterialEditor::DoTemperature
void DoTemperature()
Slot for material temperature.
Definition: TGeoMaterialEditor.cxx:299
TGeoMaterialEditor::fMatAbsLen
TGNumberEntry * fMatAbsLen
Definition: TGeoMaterialEditor.h:50
TGeoMaterialEditor::fNamei
TString fNamei
Definition: TGeoMaterialEditor.h:37
TGeoMixtureEditor::fNENatoms
TGNumberEntry * fNENatoms
Definition: TGeoMaterialEditor.h:96
TGeoMixtureEditor::fChkFraction
TGCheckButton * fChkFraction
Definition: TGeoMaterialEditor.h:93
TGTextEntry
Definition: TGTextEntry.h:39
TGeoMaterialEditor::fMatTemperature
TGNumberEntry * fMatTemperature
Definition: TGeoMaterialEditor.h:47
TGeoMaterialEditor::fMatPressure
TGNumberEntry * fMatPressure
Definition: TGeoMaterialEditor.h:48
TGTab
Definition: TGTab.h:62
TGeoMixtureEditor::DoApply1
void DoApply1()
Slot for applying modifications.
Definition: TGeoMaterialEditor.cxx:601
TGeoMixtureEditor::ConnectSignals2Slots
virtual void ConnectSignals2Slots()
Connect signals to slots.
Definition: TGeoMaterialEditor.cxx:481
TGeoMaterialEditor::DoZ
void DoZ()
Slot for charge.
Definition: TGeoMaterialEditor.cxx:269
TGeoMaterialEditor::TGeoMaterialEditor
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.
Definition: TGeoMaterialEditor.cxx:52
TGWidget.h
unsigned int
TGeoMaterialEditor::fTempi
Double_t fTempi
Definition: TGeoMaterialEditor.h:35
TGComboBox
Definition: TGComboBox.h:67
TGeoTabManager
Manager for all editor tabs.
Definition: TGeoTabManager.h:42
TGeoMixtureEditor::fBAddElem
TGTextButton * fBAddElem
Definition: TGeoMaterialEditor.h:97
TGeoMixtureEditor::~TGeoMixtureEditor
virtual ~TGeoMixtureEditor()
Definition: TGeoMaterialEditor.h:107
Double_t
double Double_t
Definition: RtypesCore.h:59
TGeoMixtureEditor::fChkNatoms
TGCheckButton * fChkNatoms
Definition: TGeoMaterialEditor.h:95
TGeoMaterialEditor::DoPressure
void DoPressure()
Slot for material pressure.
Definition: TGeoMaterialEditor.cxx:307
TGeoMaterialEditor::fAi
Double_t fAi
Definition: TGeoMaterialEditor.h:31
TGeoMaterialEditor::DoApply
void DoApply()
Slot for applying modifications.
Definition: TGeoMaterialEditor.cxx:334
TGeoMaterialEditor::fMaterialName
TGTextEntry * fMaterialName
Definition: TGeoMaterialEditor.h:42
TGeoMixtureEditor::DoChkFraction
void DoChkFraction()
Check button state changed for fraction.
Definition: TGeoMaterialEditor.cxx:520
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGeoMixtureEditor::fAelem
TGLabel * fAelem
Definition: TGeoMaterialEditor.h:91
TGeoMaterialEditor::SetModel
virtual void SetModel(TObject *obj)
Connect to the selected material.
Definition: TGeoMaterialEditor.cxx:216
TGeoMixtureEditor
Editors for mixtures.
Definition: TGeoMaterialEditor.h:83
TGeoMaterialEditor::fIsModified
Bool_t fIsModified
Definition: TGeoMaterialEditor.h:39
TGeoMaterialEditor::fMatRadLen
TGNumberEntry * fMatRadLen
Definition: TGeoMaterialEditor.h:49
TGeoMixtureEditor::DoChkNatoms
void DoChkNatoms()
Check button state changed for natoms.
Definition: TGeoMaterialEditor.cxx:534
TGNumberEntry
Definition: TGNumberEntry.h:157
TGeoMaterialEditor::fApply
TGTextButton * fApply
Definition: TGeoMaterialEditor.h:52
TGeoMaterialEditor::fPresi
Double_t fPresi
Definition: TGeoMaterialEditor.h:36
TGeoMixtureEditor::fNelem
TGLabel * fNelem
Definition: TGeoMaterialEditor.h:90
TGCompositeFrame
Definition: TGFrame.h:324
TGeoMaterialEditor::fDensityi
Double_t fDensityi
Definition: TGeoMaterialEditor.h:34
TGCanvas
Definition: TGCanvas.h:202
TGeoMaterialEditor::fStatei
Int_t fStatei
Definition: TGeoMaterialEditor.h:33
TGeoMaterialEditor::DoUndo
void DoUndo()
Slot for cancelling current modifications.
Definition: TGeoMaterialEditor.cxx:355
TGeoMixtureEditor::UpdateElements
void UpdateElements()
Update the list of elements in the TGCanvas.
Definition: TGeoMaterialEditor.cxx:641
kChildFrame
@ kChildFrame
Definition: GuiTypes.h:379
int
TGeoMixtureEditor::DoNatoms
void DoNatoms()
Natoms changed.
Definition: TGeoMaterialEditor.cxx:558