Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#):$Id$
2// Author: M.Gheata
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 *************************************************************************/
11#ifndef ROOT_TGeoMaterialEditor
12#define ROOT_TGeoMaterialEditor
14#include "TGWidget.h"
15#include "TGeoGedFrame.h"
17class TGeoMaterial;
18class TGeoTabManager;
19class TGTextEntry;
20class TGNumberEntry;
21class TGTab;
22class TGComboBox;
23class TGTextButton;
24class TGCanvas;
25class TString;
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
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
55 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
58 TGeoMaterialEditor(const TGWindow *p = nullptr,
59 Int_t width = 140, Int_t height = 30,
60 UInt_t options = kChildFrame,
62 virtual ~TGeoMaterialEditor();
63 virtual void SetModel(TObject *obj);
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();
77 ClassDef(TGeoMaterialEditor,0) // TGeoMaterial editor
80class TGCheckButton;
81class TGeoMixture;
87 TGeoMixture *fMixture; // Mixture object
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
100 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
103 TGeoMixtureEditor(const TGWindow *p = nullptr,
104 Int_t width = 140, Int_t height = 30,
105 UInt_t options = kChildFrame,
108 virtual void SetModel(TObject *obj);
109 void UpdateElements();
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();
120 ClassDef(TGeoMixtureEditor,0) // TGeoMixture editor
@ kChildFrame
Definition: GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
int Int_t
Definition: RtypesCore.h:45
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
Definition: TGCanvas.h:192
Selects different options.
Definition: TGButton.h:264
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition: TGComboBox.h:47
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
This class handles GUI labels.
Definition: TGLabel.h:24
TGNumberEntry is a number entry input widget with up/down buttons.
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Definition: TGTab.h:46
Yield an action as soon as it is clicked.
Definition: TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition: TGTextEntry.h:24
ROOT GUI Window base class.
Definition: TGWindow.h:23
ClassDef(TGedFrame, 0)
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
Editors for materials.
void DoState(Int_t state)
Slot for material state.
TGTextEntry * fMaterialName
void DoTemperature()
Slot for material temperature.
TGeoMaterialEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for material editor.
void DoRadAbs()
Slot for radiation/absorption length.
void DoPressure()
Slot for material pressure.
virtual ~TGeoMaterialEditor()
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
TGTextButton * fUndo
void DoA()
Slot for atomic mass.
void DoName()
Perform name change.
TGNumberEntry * fMatA
TGNumberEntry * fMatRadLen
void DoUndo()
Slot for cancelling current modifications.
TGTextButton * fApply
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.
Definition: TGeoMaterial.h:36
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.
TGeoMixtureEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for mixture editor.
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.
TGeoMixture * fMixture
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoSelectElement(Int_t iel)
Slot for selecting an element.
Mixtures of elements.
Definition: TGeoMaterial.h:157
Manager for all editor tabs.
Mother of all ROOT objects.
Definition: TObject.h:41
Basic string class.
Definition: TString.h:136