Logo ROOT  
Reference Guide
No Matches
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;
30 Double_t fAi; // Initial atomic mass
31 Int_t fZi; // Initial Z
32 Int_t fStatei; // Initial material state
33 Double_t fDensityi; // Initial density
34 Double_t fTempi; // Initial temperature
35 Double_t fPresi; // Initial pressure
36 TString fNamei; // Initial name
37 TGeoMaterial *fMaterial; // Material object
38 Bool_t fIsModified; // Flag that material was modified
39 Bool_t fIsMaterialEditable; // Flag that the material can be changed
41 TGTextEntry *fMaterialName; // Material name text entry
42 TGNumberEntry *fMatA; // Number entry for A
43 TGNumberEntry *fMatZ; // Number entry for Z
44 TGComboBox *fMatState; // Material state
45 TGNumberEntry *fMatDensity; // Number entry for density
46 TGNumberEntry *fMatTemperature; // Number entry for temperature
47 TGNumberEntry *fMatPressure; // Number entry for pressure
48 TGNumberEntry *fMatRadLen; // Number entry for radiation length
49 TGNumberEntry *fMatAbsLen; // Number entry for absorption length
50 TGCompositeFrame *f23; // Frame for buttons
51 TGTextButton *fApply; // Apply-Button to accept changes
52 TGTextButton *fUndo; // Undo-Button
54 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
57 TGeoMaterialEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
59 ~TGeoMaterialEditor() override;
60 void SetModel(TObject *obj) override;
62 void DoA();
63 void DoZ();
64 void DoDensity();
65 void DoModified();
66 void DoName();
67 void DoRadAbs();
68 void DoState(Int_t state);
69 void DoTemperature();
70 void DoPressure();
71 void DoApply();
72 void DoUndo();
74 ClassDefOverride(TGeoMaterialEditor, 0) // TGeoMaterial editor
77class TGCheckButton;
78class TGeoMixture;
83 TGeoMixture *fMixture; // Mixture object
85 TGComboBox *fMixElem; // Combo box for elements
86 TGLabel *fNelem; // Label for number of elements
87 TGLabel *fAelem; // Label for A
88 TGLabel *fZelem; // Label for Z
89 TGCheckButton *fChkFraction; // Check button for fraction by weight.
90 TGNumberEntry *fNEFraction; // Number entry for fraction value
91 TGCheckButton *fChkNatoms; // Check button for number of atoms
92 TGNumberEntry *fNENatoms; // Number entry for number of atoms
93 TGTextButton *fBAddElem; // Button for adding element as component
94 TGCompositeFrame *fComps; // Frame with components
96 void ConnectSignals2Slots() override; // Connect the signals to the slots
99 TGeoMixtureEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
101 ~TGeoMixtureEditor() override {}
102 void SetModel(TObject *obj) override;
103 void UpdateElements();
105 void DoApply1();
106 void DoUndo1();
107 void DoChkFraction();
108 void DoChkNatoms();
109 void DoFraction();
110 void DoNatoms();
111 void DoSelectElement(Int_t iel);
112 void DoAddElem();
114 ClassDefOverride(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
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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
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.
TGeoMaterial * fMaterial
void DoZ()
Slot for charge.
TGNumberEntry * fMatDensity
~TGeoMaterialEditor() override
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.
void SetModel(TObject *obj) override
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 ConnectSignals2Slots() override
Connect signals to slots.
void UpdateElements()
Update the list of elements in the TGCanvas.
TGCheckButton * fChkNatoms
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.
void DoSelectElement(Int_t iel)
Slot for selecting an element.
void SetModel(TObject *obj) override
Connect to the selected mixture.
Mixtures of elements.
Manager for all editor tabs.
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139