Back to home page

EIC code displayed by LXR

 
 

    


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

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_TGeoSphereEditor
0012 #define ROOT_TGeoSphereEditor
0013 
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016 
0017 class TGeoSphere;
0018 class TGeoTabManager;
0019 class TGTextEntry;
0020 class TGNumberEntry;
0021 class TGTab;
0022 class TGComboBox;
0023 class TGDoubleVSlider;
0024 class TGTextButton;
0025 class TGCheckButton;
0026 class TString;
0027 
0028 class TGeoSphereEditor : public TGeoGedFrame {
0029 
0030 protected:
0031    Double_t fRmini;         // Initial inner radius
0032    Double_t fRmaxi;         // Initial outer radius
0033    Double_t fTheta1i;       // Initial lower theta limit
0034    Double_t fTheta2i;       // Initial higher theta limit
0035    Double_t fPhi1i;         // Initial lower phi limit
0036    Double_t fPhi2i;         // Initial higher phi limit
0037    TString fNamei;          // Initial name
0038    TGeoSphere *fShape;      // Shape object
0039    Bool_t fIsModified;      // Flag that volume was modified
0040    Bool_t fIsShapeEditable; // Flag that the shape can be changed
0041    Bool_t fLock;            // Lock
0042 
0043    TGTextEntry *fShapeName;  // Shape name text entry
0044    TGNumberEntry *fERmin;    // Number entry for rmin
0045    TGNumberEntry *fERmax;    // Number entry for rmax
0046    TGNumberEntry *fETheta1;  // Number entry for Theta1
0047    TGNumberEntry *fETheta2;  // Number entry for Theta2
0048    TGNumberEntry *fEPhi1;    // Number entry for phi1
0049    TGNumberEntry *fEPhi2;    // Number entry for phi2
0050    TGDoubleVSlider *fSPhi;   // Phi slider
0051    TGDoubleVSlider *fSTheta; // Theta slider
0052    TGTextButton *fApply;     // Apply-Button to accept changes
0053    TGTextButton *fUndo;      // Undo-Button
0054    TGCheckButton *fDelayed;  // Check button for delayed draw
0055 
0056    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0057    Bool_t IsDelayed() const;
0058 
0059 public:
0060    TGeoSphereEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0061                     Pixel_t back = GetDefaultFrameBackground());
0062    ~TGeoSphereEditor() override;
0063    void SetModel(TObject *obj) override;
0064 
0065    void DoRmin();
0066    void DoRmax();
0067    void DoPhi();
0068    void DoTheta();
0069    void DoTheta1();
0070    void DoTheta2();
0071    void DoPhi1();
0072    void DoPhi2();
0073    void DoModified();
0074    void DoName();
0075    virtual void DoApply();
0076    virtual void DoUndo();
0077 
0078    ClassDefOverride(TGeoSphereEditor, 0) // TGeoSphere editor
0079 };
0080 
0081 #endif