Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGeoTrapEditor.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#):$Id$
0002 // Author: M.Gheata
0003 /*************************************************************************
0004  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOT_TGeoTrapEditor
0012 #define ROOT_TGeoTrapEditor
0013 
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016 
0017 class TGeoTrap;
0018 class TGeoTabManager;
0019 class TGTextEntry;
0020 class TGNumberEntry;
0021 class TGTab;
0022 class TGComboBox;
0023 class TGTextButton;
0024 class TGCheckButton;
0025 class TString;
0026 
0027 class TGeoTrapEditor : public TGeoGedFrame {
0028 
0029 protected:
0030    Double_t fH1i;           // Initial half length in y at low z
0031    Double_t fBl1i;          // Initial  half length in x at low z and y low edge
0032    Double_t fTl1i;          // Initial  half length in x at low z and y high edge
0033    Double_t fDzi;           // Initial  Dz
0034    Double_t fSci;           // Initial  scale factor for upper face
0035    Double_t fAlpha1i;       // Initial  angle between centers of x edges an y axis at low z
0036    Double_t fThetai;        // Initial  theta
0037    Double_t fPhii;          // Initial  phi
0038    TString fNamei;          // Initial name
0039    TGeoTrap *fShape;        // Shape object
0040    Bool_t fIsModified;      // Flag that volume was modified
0041    Bool_t fIsShapeEditable; // Flag that the shape can be changed
0042 
0043    TGTextEntry *fShapeName;   // Shape name text entry
0044    TGNumberEntry *fEH1;       // Number entry for  H1
0045    TGNumberEntry *fEBl1;      // Number entry for  Bl1
0046    TGNumberEntry *fETl1;      // Number entry for  Tl1
0047    TGNumberEntry *fESc1;      // Number entry for lower scale
0048    TGNumberEntry *fESc2;      // Number entry for  upper scale
0049    TGNumberEntry *fEDz;       // Number entry for  DZ
0050    TGNumberEntry *fEAlpha1;   // Number entry for  Alpha1
0051    TGNumberEntry *fETheta;    // Number entry for  Theta
0052    TGNumberEntry *fEPhi;      // Number entry for  Theta
0053    TGTextButton *fApply;      // Apply-Button to accept changes
0054    TGTextButton *fUndo;       // Undo-Button
0055    TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
0056    TGCheckButton *fDelayed;   // Check button for delayed draw
0057    TGCompositeFrame *fDFrame; // Frame containing Delayed draw
0058 
0059    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0060    Bool_t IsDelayed() const;
0061 
0062 public:
0063    TGeoTrapEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0064                   Pixel_t back = GetDefaultFrameBackground());
0065    ~TGeoTrapEditor() override;
0066    void SetModel(TObject *obj) override;
0067 
0068    void DoH1();
0069    void DoBl1();
0070    void DoTl1();
0071    void DoDz();
0072    void DoSc1();
0073    void DoSc2();
0074    void DoAlpha1();
0075    void DoTheta();
0076    void DoPhi();
0077    void DoModified();
0078    void DoName();
0079    virtual void DoApply();
0080    virtual void DoUndo();
0081 
0082    ClassDefOverride(TGeoTrapEditor, 0) // TGeoTrap editor
0083 };
0084 
0085 class TGeoGtraEditor : public TGeoTrapEditor {
0086 
0087 protected:
0088    Double_t fTwisti;       // Initial twist angle
0089    TGNumberEntry *fETwist; // Number entry for  H1
0090 
0091 public:
0092    TGeoGtraEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0093                   Pixel_t back = GetDefaultFrameBackground());
0094    ~TGeoGtraEditor() override;
0095    void SetModel(TObject *obj) override;
0096 
0097    void DoTwist();
0098    void DoApply() override;
0099    void DoUndo() override;
0100 
0101    ClassDefOverride(TGeoGtraEditor, 0) // TGeoTrap editor
0102 };
0103 
0104 #endif