Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGeoConeEditor.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_TGeoConeEditor
0012 #define ROOT_TGeoConeEditor
0013 
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016 
0017 class TGeoCone;
0018 class TGeoConeSeg;
0019 class TGeoTabManager;
0020 class TGTextEntry;
0021 class TGNumberEntry;
0022 class TGTab;
0023 class TGComboBox;
0024 class TGTextButton;
0025 class TGCheckButton;
0026 class TString;
0027 
0028 class TGeoConeEditor : public TGeoGedFrame {
0029 
0030 protected:
0031    Double_t fRmini1;          // Initial inner radius at -dz
0032    Double_t fRmaxi1;          // Initial outer radius at -dz
0033    Double_t fRmini2;          // Initial inner radius at +dz
0034    Double_t fRmaxi2;          // Initial outer radius at +dz
0035    Double_t fDzi;             // Initial box dz
0036    TString fNamei;            // Initial name
0037    TGeoCone *fShape;          // Shape object
0038    Bool_t fIsModified;        // Flag that volume was modified
0039    Bool_t fIsShapeEditable;   // Flag that the shape can be changed
0040    TGTextEntry *fShapeName;   // Shape name text entry
0041    TGNumberEntry *fERmin1;    // Number entry for rmin1
0042    TGNumberEntry *fERmin2;    // Number entry for rmin2
0043    TGNumberEntry *fERmax1;    // Number entry for rmax1
0044    TGNumberEntry *fERmax2;    // Number entry for rmax2
0045    TGNumberEntry *fEDz;       // Number entry for DZ
0046    TGTextButton *fApply;      // Apply-Button to accept changes
0047    TGTextButton *fUndo;       // Undo-Button
0048    TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
0049    TGCheckButton *fDelayed;   // Check button for delayed draw
0050    TGCompositeFrame *fDFrame; // Frame containing Delayed draw
0051 
0052    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0053    Bool_t IsDelayed() const;
0054 
0055 public:
0056    TGeoConeEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0057                   Pixel_t back = GetDefaultFrameBackground());
0058    ~TGeoConeEditor() override;
0059    void SetModel(TObject *obj) override;
0060 
0061    void DoRmin1();
0062    void DoRmin2();
0063    void DoRmax1();
0064    void DoRmax2();
0065    void DoDz();
0066    void DoModified();
0067    void DoName();
0068    virtual void DoApply();
0069    virtual void DoUndo();
0070 
0071    ClassDefOverride(TGeoConeEditor, 0) // TGeoCone editor
0072 };
0073 
0074 class TGDoubleVSlider;
0075 
0076 class TGeoConeSegEditor : public TGeoConeEditor {
0077 
0078 protected:
0079    Bool_t fLock;           // Phi lock
0080    Double_t fPmini;        // Initial phi min
0081    Double_t fPmaxi;        // Initial phi max
0082    TGDoubleVSlider *fSPhi; // Phi slider
0083    TGNumberEntry *fEPhi1;  // Number entry for phi1
0084    TGNumberEntry *fEPhi2;  // Number entry for phi2
0085 
0086    void ConnectSignals2Slots() override; // Connect the signals to the slots
0087 
0088 public:
0089    TGeoConeSegEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0090                      Pixel_t back = GetDefaultFrameBackground());
0091    ~TGeoConeSegEditor() override;
0092    void SetModel(TObject *obj) override;
0093 
0094    void DoPhi();
0095    void DoPhi1();
0096    void DoPhi2();
0097    void DoApply() override;
0098    void DoUndo() override;
0099 
0100    ClassDefOverride(TGeoConeSegEditor, 0) // TGeoConeSeg editor
0101 };
0102 
0103 #endif