Logo ROOT  
Reference Guide
TGeoPconEditor.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_TGeoPconEditor
12#define ROOT_TGeoPconEditor
13
14#include "TGWidget.h"
15#include "TGeoGedFrame.h"
16
17class TGeoPcon;
18class TGeoPconSection;
19class TGeoTabManager;
20class TGTextEntry;
21class TGNumberEntry;
22class TGTab;
23class TGComboBox;
24class TGTextButton;
25class TGCheckButton;
26class TGCanvas;
27class TString;
28
30
31protected:
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
44
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
55
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() {;}
62public:
63 TGeoPconEditor(const TGWindow *p = 0,
64 Int_t width = 140, Int_t height = 30,
65 UInt_t options = kChildFrame,
67 virtual ~TGeoPconEditor();
68 virtual void SetModel(TObject *obj);
69
70 void DoModified();
71 void DoName();
72 void DoNz();
73 void DoPhi();
74 void DoSectionChange(Int_t i);
75 virtual void DoApply();
76 virtual void DoUndo();
77
78 ClassDef(TGeoPconEditor,0) // TGeoPcon editor
79};
80
81
83
84protected:
85 Int_t fNumber; // Id for the section
86 TGNumberEntry *fEZ; // Number entry for Z position
87 TGNumberEntry *fERmin; // Number entry for Rmin position
88 TGNumberEntry *fERmax; // Number entry for Rmax position
89
90 virtual void ConnectSignals2Slots();
91
92public:
93 TGeoPconSection(const TGWindow *p, UInt_t w, UInt_t h, Int_t id);
94 virtual ~TGeoPconSection();
95 void HideDaughters();
96 Double_t GetZ() const;
97 Double_t GetRmin() const;
98 Double_t GetRmax() const;
99 void SetZ(Double_t z);
100 void SetRmin(Double_t rmin);
101 void SetRmax(Double_t rmax);
102
103 void DoZ();
104 void DoRmin();
105 void DoRmax();
106
107 virtual void Changed(Int_t i); // *SIGNAL*
108
109 ClassDef(TGeoPconSection,0) // TGeoPcon section
110};
111#endif
@ 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
const Bool_t kFALSE
Definition: RtypesCore.h:101
bool Bool_t
Definition: RtypesCore.h:63
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
Definition: TDocParser.cxx:121
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.
Definition: TGeoGedFrame.h:13
Editor for a TGeoPcon.
TGTextEntry * fShapeName
virtual ~TGeoPconEditor()
Destructor.
TObjArray * fSections
void CreateSections(Int_t inew)
Change dynamically the number of sections.
TGeoPconEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for polycone editor.
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
virtual void SetModel(TObject *obj)
Connect to a given pcon.
void DoPhi()
Change phi range.
Double_t * fZi
Bool_t fIsShapeEditable
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(const TGWindow *p, UInt_t w, UInt_t h, Int_t id)
Constructor.
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.
virtual ~TGeoPconSection()
Destructor.
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:18
Manager for all editor tabs.
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:136