Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoTrapEditor.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_TGeoTrapEditor
12#define ROOT_TGeoTrapEditor
13
14#include "TGWidget.h"
15#include "TGeoGedFrame.h"
16
17class TGeoTrap;
18class TGeoTabManager;
19class TGTextEntry;
20class TGNumberEntry;
21class TGTab;
22class TGComboBox;
23class TGTextButton;
24class TGCheckButton;
25class TString;
26
28
29protected:
30 Double_t fH1i; // Initial half length in y at low z
31 Double_t fBl1i; // Initial half length in x at low z and y low edge
32 Double_t fTl1i; // Initial half length in x at low z and y high edge
33 Double_t fDzi; // Initial Dz
34 Double_t fSci; // Initial scale factor for upper face
35 Double_t fAlpha1i; // Initial angle between centers of x edges an y axis at low z
36 Double_t fThetai; // Initial theta
37 Double_t fPhii; // Initial phi
38 TString fNamei; // Initial name
39 TGeoTrap *fShape; // Shape object
40 Bool_t fIsModified; // Flag that volume was modified
41 Bool_t fIsShapeEditable; // Flag that the shape can be changed
42
43 TGTextEntry *fShapeName; // Shape name text entry
44 TGNumberEntry *fEH1; // Number entry for H1
45 TGNumberEntry *fEBl1; // Number entry for Bl1
46 TGNumberEntry *fETl1; // Number entry for Tl1
47 TGNumberEntry *fESc1; // Number entry for lower scale
48 TGNumberEntry *fESc2; // Number entry for upper scale
49 TGNumberEntry *fEDz; // Number entry for DZ
50 TGNumberEntry *fEAlpha1; // Number entry for Alpha1
51 TGNumberEntry *fETheta; // Number entry for Theta
52 TGNumberEntry *fEPhi; // Number entry for Theta
53 TGTextButton *fApply; // Apply-Button to accept changes
54 TGTextButton *fUndo; // Undo-Button
55 TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
56 TGCheckButton *fDelayed; // Check button for delayed draw
57 TGCompositeFrame *fDFrame; // Frame containing Delayed draw
58
59 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
60 Bool_t IsDelayed() const;
61
62public:
63 TGeoTrapEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
65 ~TGeoTrapEditor() override;
66 void SetModel(TObject *obj) override;
67
68 void DoH1();
69 void DoBl1();
70 void DoTl1();
71 void DoDz();
72 void DoSc1();
73 void DoSc2();
74 void DoAlpha1();
75 void DoTheta();
76 void DoPhi();
77 void DoModified();
78 void DoName();
79 virtual void DoApply();
80 virtual void DoUndo();
81
82 ClassDefOverride(TGeoTrapEditor, 0) // TGeoTrap editor
83};
84
86
87protected:
88 Double_t fTwisti; // Initial twist angle
89 TGNumberEntry *fETwist; // Number entry for H1
90
91public:
92 TGeoGtraEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
94 ~TGeoGtraEditor() override;
95 void SetModel(TObject *obj) override;
96
97 void DoTwist();
98 void DoApply() override;
99 void DoUndo() override;
100
101 ClassDefOverride(TGeoGtraEditor, 0) // TGeoTrap editor
102};
103
104#endif
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
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
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
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.
Editor for a TGeoGtra.
TGNumberEntry * fETwist
~TGeoGtraEditor() override
Destructor.
void SetModel(TObject *obj) override
Connect to a given twisted trapezoid.
void DoUndo() override
Slot for undoing last operation.
void DoApply() override
Slot for applying current settings.
void DoTwist()
Change the twist angle.
Manager for all editor tabs.
Editor for a TGeoTrap.
TGTextButton * fApply
TGNumberEntry * fEPhi
TGCompositeFrame * fDFrame
TGNumberEntry * fEBl1
void DoTl1()
Slot for Tl1.
void DoSc2()
Slot for H2.
void DoH1()
Slot for H1.
TGCheckButton * fDelayed
TGNumberEntry * fETl1
TGNumberEntry * fEDz
void SetModel(TObject *obj) override
Connect to the selected object.
Bool_t fIsShapeEditable
virtual void DoUndo()
Slot for undoing last operation.
~TGeoTrapEditor() override
Destructor.
TGTextEntry * fShapeName
TGNumberEntry * fEH1
void DoPhi()
Slot for phi.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fETheta
void DoName()
Slot for name.
void DoSc1()
Slot for H2.
TGCompositeFrame * fBFrame
void DoAlpha1()
Slot for alpha1.
TGNumberEntry * fESc2
void DoBl1()
Slot for Bl1.
virtual void DoApply()
Slot for applying current settings.
TGNumberEntry * fESc1
void DoDz()
Slot for Z.
void DoTheta()
Slot for theta.
void DoModified()
Slot for notifying modifications.
TGeoTrap * fShape
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TGTextButton * fUndo
TGNumberEntry * fEAlpha1
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139