Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17class TGeoMaterial;
18class TGeoTabManager;
19class TGTextEntry;
20class TGNumberEntry;
21class TGTab;
22class TGComboBox;
23class TGTextButton;
24class TGCanvas;
25class TString;
26
28
29protected:
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
57public:
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
80class TGCheckButton;
81class TGeoMixture;
82
84
85protected:
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
102public:
103 TGeoMixtureEditor(const TGWindow *p = 0,
104 Int_t width = 140, Int_t height = 30,
105 UInt_t options = kChildFrame,
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
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
include TDocParser_001 C image html pict1_TDocParser_001 png width
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:668
Definition TGTab.h:62
Common base class for geombuilder editors.
Editors for materials.
void DoState(Int_t state)
Slot for material state.
TGTextEntry * fMaterialName
void DoTemperature()
Slot for material temperature.
void DoRadAbs()
Slot for radiation/absorption length.
void DoPressure()
Slot for material pressure.
virtual ~TGeoMaterialEditor()
Destructor.
TGeoMaterial * fMaterial
void DoZ()
Slot for charge.
TGNumberEntry * fMatDensity
TGNumberEntry * fMatAbsLen
TGNumberEntry * fMatTemperature
TGNumberEntry * fMatZ
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoModified()
Slot for signaling modifications.
TGCompositeFrame * f23
TGNumberEntry * fMatPressure
void DoA()
Slot for atomic mass.
void DoName()
Perform name change.
TGNumberEntry * fMatA
TGNumberEntry * fMatRadLen
void DoUndo()
Slot for cancelling current modifications.
virtual void SetModel(TObject *obj)
Connect to the selected material.
void DoDensity()
Slot for density.
void DoApply()
Slot for applying modifications.
Base class describing materials.
Editors for mixtures.
void DoAddElem()
Slot for adding an element. No undo.
TGNumberEntry * fNENatoms
void DoNatoms()
Natoms changed.
TGTextButton * fBAddElem
void UpdateElements()
Update the list of elements in the TGCanvas.
TGCheckButton * fChkNatoms
virtual void SetModel(TObject *obj)
Connect to the selected mixture.
void DoUndo1()
Slot for undoing all changes.
void DoChkNatoms()
Check button state changed for natoms.
TGCompositeFrame * fComps
void DoApply1()
Slot for applying modifications.
TGNumberEntry * fNEFraction
TGCheckButton * fChkFraction
void DoChkFraction()
Check button state changed for fraction.
void DoFraction()
Fraction changed.
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoSelectElement(Int_t iel)
Slot for selecting an element.
Mixtures of elements.
Manager for all editor tabs.
Mother of all ROOT objects.
Definition TObject.h:37
Basic string class.
Definition TString.h:136