Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:55

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_TGeoTorusEditor
0012 #define ROOT_TGeoTorusEditor
0013 
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016 
0017 class TGeoTorus;
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 TGeoTorusEditor : public TGeoGedFrame {
0028 
0029 protected:
0030    Double_t fRi;            // Initial  axial radius
0031    Double_t fRmini;         // Initial  inner radius
0032    Double_t fRmaxi;         // Initial  outer radius
0033    Double_t fPhi1i;         // Initial  starting phi1
0034    Double_t fDphii;         // Initial  phi extent
0035    TString fNamei;          // Initial name
0036    TGeoTorus *fShape;       // Shape object
0037    Bool_t fIsModified;      // Flag that volume was modified
0038    Bool_t fIsShapeEditable; // Flag that the shape can be changed
0039 
0040    TGTextEntry *fShapeName; // Shape name text entry
0041    TGNumberEntry *fER;      // Number entry for  R
0042    TGNumberEntry *fERmin;   // Number entry for  Rmin
0043    TGNumberEntry *fERmax;   // Number entry for  Rmax
0044    TGNumberEntry *fEPhi1;   // Number entry for  phi1
0045    TGNumberEntry *fEDphi;   // Number entry for  Dphi
0046    TGTextButton *fApply;    // Apply-Button to accept changes
0047    TGTextButton *fUndo;     // Undo-Button
0048    TGCheckButton *fDelayed; // Check button for delayed draw
0049 
0050    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0051    Bool_t IsDelayed() const;
0052 
0053 public:
0054    TGeoTorusEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0055                    Pixel_t back = GetDefaultFrameBackground());
0056    ~TGeoTorusEditor() override;
0057    void SetModel(TObject *obj) override;
0058 
0059    void DoR();
0060    void DoRmin();
0061    void DoRmax();
0062    void DoPhi1();
0063    void DoDphi();
0064    void DoModified();
0065    void DoName();
0066    void DoApply();
0067    void DoUndo();
0068 
0069    ClassDefOverride(TGeoTorusEditor, 0) // TGeoTorus editor
0070 };
0071 
0072 #endif