Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGeoPconEditor.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_TGeoPconEditor
0012 #define ROOT_TGeoPconEditor
0013 
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016 
0017 class TGeoPcon;
0018 class TGeoPconSection;
0019 class TGeoTabManager;
0020 class TGTextEntry;
0021 class TGNumberEntry;
0022 class TGTab;
0023 class TGComboBox;
0024 class TGTextButton;
0025 class TGCheckButton;
0026 class TGCanvas;
0027 class TString;
0028 
0029 class TGeoPconEditor : public TGeoGedFrame {
0030 
0031 protected:
0032    Int_t fNsecti;           // Initial number of sections
0033    Double_t fPhi1i;         // Initial Phi1
0034    Double_t fDPhii;         // Initial Dphi
0035    Double_t *fZi;           // Initial Z positions
0036    Double_t *fRmini;        // Initial Rmin values
0037    Double_t *fRmaxi;        // Initial Rmax values
0038    Int_t fNsections;        // Number of Z sections
0039    TObjArray *fSections;    // List of section frames
0040    TGCanvas *fCan;          // sections container
0041    TGeoPcon *fShape;        // Shape object
0042    Bool_t fIsModified;      // Flag that volume was modified
0043    Bool_t fIsShapeEditable; // Flag that the shape can be changed
0044 
0045    TGLayoutHints *fLHsect;    // Layout hints for sections
0046    TGTextEntry *fShapeName;   // Shape name text entry
0047    TGNumberEntry *fENz;       // Number entry for nsections
0048    TGNumberEntry *fEPhi1;     // Number entry for phi1
0049    TGNumberEntry *fEDPhi;     // Number entry for dphi
0050    TGTextButton *fApply;      // Apply-Button to accept changes
0051    TGTextButton *fUndo;       // Undo-Button
0052    TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
0053    TGCheckButton *fDelayed;   // Check button for delayed draw
0054    TGCompositeFrame *fDFrame; // Frame containing Delayed draw
0055 
0056    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0057    Bool_t CheckSections(Bool_t change = kFALSE);
0058    Bool_t IsDelayed() const;
0059    void CreateSections(Int_t inew);
0060    void UpdateSections();
0061    virtual void CreateEdges() {}
0062 
0063 public:
0064    TGeoPconEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0065                   Pixel_t back = GetDefaultFrameBackground());
0066    ~TGeoPconEditor() override;
0067    void SetModel(TObject *obj) override;
0068 
0069    void DoModified();
0070    void DoName();
0071    void DoNz();
0072    void DoPhi();
0073    void DoSectionChange(Int_t i);
0074    virtual void DoApply();
0075    virtual void DoUndo();
0076 
0077    ClassDefOverride(TGeoPconEditor, 0) // TGeoPcon editor
0078 };
0079 
0080 class TGeoPconSection : public TGCompositeFrame, public TGWidget {
0081 
0082 protected:
0083    Int_t fNumber;         // Id for the section
0084    TGNumberEntry *fEZ;    // Number entry for Z position
0085    TGNumberEntry *fERmin; // Number entry for Rmin position
0086    TGNumberEntry *fERmax; // Number entry for Rmax position
0087 
0088    virtual void ConnectSignals2Slots();
0089 
0090 public:
0091    TGeoPconSection(const TGWindow *p, UInt_t w, UInt_t h, Int_t id);
0092    ~TGeoPconSection() override;
0093    void HideDaughters();
0094    Double_t GetZ() const;
0095    Double_t GetRmin() const;
0096    Double_t GetRmax() const;
0097    void SetZ(Double_t z);
0098    void SetRmin(Double_t rmin);
0099    void SetRmax(Double_t rmax);
0100 
0101    void DoZ();
0102    void DoRmin();
0103    void DoRmax();
0104 
0105    virtual void Changed(Int_t i); // *SIGNAL*
0106 
0107    ClassDefOverride(TGeoPconSection, 0) // TGeoPcon section
0108 };
0109 #endif