TGeoTubeEditor.h

Go to the documentation of this file.
00001 // @(#):$Id: TGeoTubeEditor.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: M.Gheata 
00003 /*************************************************************************
00004  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
00005  * All rights reserved.                                                  *
00006  *                                                                       *
00007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00009  *************************************************************************/
00010 
00011 #ifndef ROOT_TGeoTubeEditor
00012 #define ROOT_TGeoTubeEditor
00013 
00014 //////////////////////////////////////////////////////////////////////////
00015 //                                                                      //
00016 //  TGeoTubeEditor                                                      //
00017 //                                                                      //
00018 //  Editor for a TGeoTube.                                              //
00019 //                                                                      //
00020 //////////////////////////////////////////////////////////////////////////
00021 
00022 #ifndef ROOT_TGButton
00023 #include "TGWidget.h"
00024 #endif
00025 #ifndef ROOT_TGeoGedFrame
00026 #include "TGeoGedFrame.h"
00027 #endif
00028 
00029 class TGeoTube;
00030 class TGeoTabManager;
00031 class TGTextEntry;
00032 class TGNumberEntry;
00033 class TGTab;
00034 class TGComboBox;
00035 class TGTextButton;
00036 class TGCheckButton;
00037 class TString;
00038 
00039 class TGeoTubeEditor : public TGeoGedFrame {
00040 
00041 protected:
00042 
00043    Double_t        fRmini;             // Initial inner radius
00044    Double_t        fRmaxi;             // Initial outer radius
00045    Double_t        fDzi;               // Initial box dz
00046    TString         fNamei;             // Initial name
00047    TGeoTube       *fShape;             // Shape object
00048    Bool_t          fIsModified;        // Flag that volume was modified
00049    Bool_t          fIsShapeEditable;   // Flag that the shape can be changed
00050 
00051    TGTextEntry    *fShapeName;         // Shape name text entry
00052    TGNumberEntry  *fERmin;             // Number entry for rmin
00053    TGNumberEntry  *fERmax;             // Number entry for rmax
00054    TGNumberEntry  *fEDz;               // Number entry for DZ
00055    TGTextButton   *fApply;             // Apply-Button to accept changes
00056    TGTextButton   *fUndo;              // Undo-Button
00057    TGCompositeFrame *fBFrame;          // Frame containing Apply/Undo
00058    TGCheckButton  *fDelayed;           // Check button for delayed draw
00059    TGCompositeFrame *fDFrame;          // Frame containing Delayed draw
00060 
00061    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00062    Bool_t       IsDelayed() const;   
00063 
00064 public:
00065    TGeoTubeEditor(const TGWindow *p = 0,
00066                   Int_t width = 140, Int_t height = 30,
00067                   UInt_t options = kChildFrame,
00068                   Pixel_t back = GetDefaultFrameBackground());
00069    virtual ~TGeoTubeEditor();
00070    virtual void   SetModel(TObject *obj);
00071 
00072    void           DoRmin();
00073    void           DoRmax();
00074    void           DoDz();
00075    void           DoModified();
00076    void           DoName();
00077    virtual void   DoApply();
00078    virtual void   DoUndo();
00079    
00080    ClassDef(TGeoTubeEditor,0)   // TGeoTube editor
00081 };   
00082 
00083 //////////////////////////////////////////////////////////////////////////
00084 //                                                                      //
00085 //  TGeoTubeSegEditor                                                   //
00086 //                                                                      //
00087 //  Editor for a tube segment.                                          //
00088 //                                                                      //
00089 //////////////////////////////////////////////////////////////////////////
00090 
00091 class TGDoubleVSlider;
00092 
00093 class TGeoTubeSegEditor : public TGeoTubeEditor {
00094 
00095 protected:
00096 
00097    Bool_t           fLock;              // Phi lock
00098    Double_t         fPmini;             // Initial phi min
00099    Double_t         fPmaxi;             // Initial phi max
00100    TGDoubleVSlider *fSPhi;              // Phi slider
00101    TGNumberEntry   *fEPhi1;             // Number entry for phi1
00102    TGNumberEntry   *fEPhi2;             // Number entry for phi2  
00103    
00104    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00105 
00106 public:
00107    TGeoTubeSegEditor(const TGWindow *p = 0,
00108                    Int_t width = 140, Int_t height = 30,
00109                    UInt_t options = kChildFrame,
00110                    Pixel_t back = GetDefaultFrameBackground());
00111    virtual ~TGeoTubeSegEditor();
00112    virtual void   SetModel(TObject *obj);
00113 
00114    void           DoPhi();
00115    void           DoPhi1();
00116    void           DoPhi2();
00117    virtual void   DoApply();
00118    virtual void   DoUndo();
00119    
00120    ClassDef(TGeoTubeSegEditor,0)   // TGeoTubeSeg editor
00121 };   
00122 
00123 //////////////////////////////////////////////////////////////////////////
00124 //                                                                      //
00125 //  TGeoCtubEditor                                                      //
00126 //                                                                      //
00127 //  Editor for a tube segment cut with 2 planes.                        //
00128 //                                                                      //
00129 //////////////////////////////////////////////////////////////////////////
00130 
00131 class TGeoCtubEditor : public TGeoTubeSegEditor {
00132 
00133 protected:
00134    Double_t         fThlo;              // Theta angle of the normal to the lower plane (90, 180)
00135    Double_t         fPhlo;              // Phi angle of the normal to lower Z plane
00136    Double_t         fThhi;              // Theta angle of the normal to the upper plane (0, 90)
00137    Double_t         fPhhi;              // Phi angle of the normal to upper Z plane
00138    TGNumberEntry   *fEThlo;             // Number entry for thlo
00139    TGNumberEntry   *fEPhlo;             // Number entry for phlo
00140    TGNumberEntry   *fEThhi;             // Number entry for thhi
00141    TGNumberEntry   *fEPhhi;             // Number entry for phhi
00142 
00143 public:
00144    TGeoCtubEditor(const TGWindow *p = 0,
00145                    Int_t width = 140, Int_t height = 30,
00146                    UInt_t options = kChildFrame,
00147                    Pixel_t back = GetDefaultFrameBackground());
00148    virtual ~TGeoCtubEditor();
00149    virtual void   SetModel(TObject *obj);
00150 
00151    void           DoThlo();
00152    void           DoPhlo();
00153    void           DoThhi();
00154    void           DoPhhi();
00155    virtual void   DoApply();
00156    virtual void   DoUndo();
00157    
00158    ClassDef(TGeoCtubEditor,0)   // TGeoCtub editor
00159 };
00160   
00161 #endif                    

Generated on Tue Jul 5 14:13:03 2011 for ROOT_528-00b_version by  doxygen 1.5.1