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_TGeoPconEditor
12#define ROOT_TGeoPconEditor
14#include "TGWidget.h"
15#include "TGeoGedFrame.h"
17class TGeoPcon;
18class TGeoPconSection;
19class TGeoTabManager;
20class TGTextEntry;
21class TGNumberEntry;
22class TGTab;
23class TGComboBox;
24class TGTextButton;
25class TGCheckButton;
26class TGCanvas;
27class TString;
32 Int_t fNsecti; // Initial number of sections
33 Double_t fPhi1i; // Initial Phi1
34 Double_t fDPhii; // Initial Dphi
35 Double_t *fZi; // Initial Z positions
36 Double_t *fRmini; // Initial Rmin values
37 Double_t *fRmaxi; // Initial Rmax values
38 Int_t fNsections; // Number of Z sections
39 TObjArray *fSections; // List of section frames
40 TGCanvas *fCan; // sections container
41 TGeoPcon *fShape; // Shape object
42 Bool_t fIsModified; // Flag that volume was modified
43 Bool_t fIsShapeEditable; // Flag that the shape can be changed
45 TGLayoutHints *fLHsect; // Layout hints for sections
46 TGTextEntry *fShapeName; // Shape name text entry
47 TGNumberEntry *fENz; // Number entry for nsections
48 TGNumberEntry *fEPhi1; // Number entry for phi1
49 TGNumberEntry *fEDPhi; // Number entry for dphi
50 TGTextButton *fApply; // Apply-Button to accept changes
51 TGTextButton *fUndo; // Undo-Button
52 TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
53 TGCheckButton *fDelayed; // Check button for delayed draw
54 TGCompositeFrame *fDFrame; // Frame containing Delayed draw
56 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
58 Bool_t IsDelayed() const;
59 void CreateSections(Int_t inew);
60 void UpdateSections();
61 virtual void CreateEdges() {}
64 TGeoPconEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
66 ~TGeoPconEditor() override;
67 void SetModel(TObject *obj) override;
69 void DoModified();
70 void DoName();
71 void DoNz();
72 void DoPhi();
73 void DoSectionChange(Int_t i);
74 virtual void DoApply();
75 virtual void DoUndo();
77 ClassDefOverride(TGeoPconEditor, 0) // TGeoPcon editor
83 Int_t fNumber; // Id for the section
84 TGNumberEntry *fEZ; // Number entry for Z position
85 TGNumberEntry *fERmin; // Number entry for Rmin position
86 TGNumberEntry *fERmax; // Number entry for Rmax position
88 virtual void ConnectSignals2Slots();
92 ~TGeoPconSection() override;
93 void HideDaughters();
94 Double_t GetZ() const;
95 Double_t GetRmin() const;
96 Double_t GetRmax() const;
97 void SetZ(Double_t z);
98 void SetRmin(Double_t rmin);
99 void SetRmax(Double_t rmax);
101 void DoZ();
102 void DoRmin();
103 void DoRmax();
105 virtual void Changed(Int_t i); // *SIGNAL*
107 ClassDefOverride(TGeoPconSection, 0) // TGeoPcon section
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define h(i)
Definition RSha256.hxx:106
int Int_t
Definition RtypesCore.h:45
unsigned int UInt_t
Definition RtypesCore.h:46
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
#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 describes layout hints used by the layout classes.
Definition TGLayout.h:50
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
The widget base class.
Definition TGWidget.h:43
ROOT GUI Window base class.
Definition TGWindow.h:23
Common base class for geombuilder editors.
Editor for a TGeoPcon.
TGTextEntry * fShapeName
TObjArray * fSections
void CreateSections(Int_t inew)
Change dynamically the number of sections.
void SetModel(TObject *obj) override
Connect to a given pcon.
virtual void DoUndo()
Slot for undoing last operation.
void DoModified()
Slot for signaling modifications.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
void DoNz()
Change number of sections.
void DoSectionChange(Int_t i)
Change parameters of section isect;.
TGNumberEntry * fEPhi1
Double_t * fRmaxi
TGLayoutHints * fLHsect
TGTextButton * fUndo
Bool_t CheckSections(Bool_t change=kFALSE)
Check validity of sections.
virtual void CreateEdges()
Double_t * fRmini
TGNumberEntry * fEDPhi
TGeoPcon * fShape
TGCompositeFrame * fBFrame
TGCanvas * fCan
void DoName()
Perform name change.
TGCompositeFrame * fDFrame
TGTextButton * fApply
void DoPhi()
Change phi range.
Bool_t fIsShapeEditable
~TGeoPconEditor() override
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoApply()
Slot for applying modifications.
TGCheckButton * fDelayed
void UpdateSections()
Update sections according fShape.
TGNumberEntry * fENz
Utility frame used by TGeoPcon editor.
void DoRmin()
Rmin slot.
void SetZ(Double_t z)
Z value setter.
void SetRmin(Double_t rmin)
Rmin value setter.
void SetRmax(Double_t rmax)
Rmax value setter.
~TGeoPconSection() override
void HideDaughters()
Hide daughter frames.
TGNumberEntry * fERmax
Double_t GetRmax() const
Rmax value getter.
void DoRmax()
Rmax slot.
TGNumberEntry * fEZ
TGNumberEntry * fERmin
virtual void Changed(Int_t i)
Emit Changed(Int_t) signal.
Double_t GetZ() const
Z value getter.
void DoZ()
Z slot.
virtual void ConnectSignals2Slots()
Connect signals to slots.
Double_t GetRmin() const
Rmin value getter.
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
Definition TGeoPcon.h:17
Manager for all editor tabs.
An array of TObjects.
Definition TObjArray.h:31
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139