TGeoConeEditor.h

Go to the documentation of this file.
00001 // @(#):$Id: TGeoConeEditor.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_TGeoConeEditor
00012 #define ROOT_TGeoConeEditor
00013 
00014 //////////////////////////////////////////////////////////////////////////
00015 //                                                                      //
00016 //  TGeoConeEditor                                                      //
00017 //                                                                      //
00018 //  Editor for a TGeoCone.                                              //
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 TGeoCone;
00030 class TGeoConeSeg;
00031 class TGeoTabManager;
00032 class TGTextEntry;
00033 class TGNumberEntry;
00034 class TGTab;
00035 class TGComboBox;
00036 class TGTextButton;
00037 class TGCheckButton;
00038 class TString;
00039 
00040 class TGeoConeEditor : public TGeoGedFrame {
00041 
00042 protected:
00043 
00044    Double_t        fRmini1;            // Initial inner radius at -dz
00045    Double_t        fRmaxi1;            // Initial outer radius at -dz
00046    Double_t        fRmini2;            // Initial inner radius at +dz
00047    Double_t        fRmaxi2;            // Initial outer radius at +dz
00048    Double_t        fDzi;               // Initial box dz
00049    TString         fNamei;             // Initial name
00050    TGeoCone       *fShape;             // Shape object
00051    Bool_t          fIsModified;        // Flag that volume was modified
00052    Bool_t          fIsShapeEditable;   // Flag that the shape can be changed
00053    TGTextEntry    *fShapeName;         // Shape name text entry
00054    TGNumberEntry  *fERmin1;            // Number entry for rmin1
00055    TGNumberEntry  *fERmin2;            // Number entry for rmin2
00056    TGNumberEntry  *fERmax1;            // Number entry for rmax1
00057    TGNumberEntry  *fERmax2;            // Number entry for rmax2
00058    TGNumberEntry  *fEDz;               // Number entry for DZ
00059    TGTextButton   *fApply;             // Apply-Button to accept changes
00060    TGTextButton   *fUndo;              // Undo-Button
00061    TGCompositeFrame *fBFrame;          // Frame containing Apply/Undo
00062    TGCheckButton  *fDelayed;           // Check button for delayed draw
00063    TGCompositeFrame *fDFrame;          // Frame containing Delayed draw
00064 
00065    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00066    Bool_t       IsDelayed() const;   
00067 
00068 public:
00069    TGeoConeEditor(const TGWindow *p = 0,
00070                   Int_t width = 140, Int_t height = 30,
00071                   UInt_t options = kChildFrame,
00072                   Pixel_t back = GetDefaultFrameBackground());
00073    virtual ~TGeoConeEditor();
00074    virtual void   SetModel(TObject *obj);
00075 
00076    void           DoRmin1();
00077    void           DoRmin2();
00078    void           DoRmax1();
00079    void           DoRmax2();
00080    void           DoDz();
00081    void           DoModified();
00082    void           DoName();
00083    virtual void   DoApply();
00084    virtual void   DoUndo();
00085    
00086    ClassDef(TGeoConeEditor,0)   // TGeoCone editor
00087 };   
00088 
00089 //////////////////////////////////////////////////////////////////////////
00090 //                                                                      //
00091 //  TGeoConeSegEditor                                                   //
00092 //                                                                      //
00093 //  Editor for a cone segment.                                          //
00094 //                                                                      //
00095 //////////////////////////////////////////////////////////////////////////
00096 
00097 class TGDoubleVSlider;
00098 
00099 class TGeoConeSegEditor : public TGeoConeEditor {
00100 
00101 protected:
00102 
00103    Bool_t           fLock;              // Phi lock
00104    Double_t         fPmini;             // Initial phi min
00105    Double_t         fPmaxi;             // Initial phi max
00106    TGDoubleVSlider *fSPhi;              // Phi slider
00107    TGNumberEntry   *fEPhi1;             // Number entry for phi1
00108    TGNumberEntry   *fEPhi2;             // Number entry for phi2  
00109    
00110    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00111 
00112 public:
00113    TGeoConeSegEditor(const TGWindow *p = 0,
00114                    Int_t width = 140, Int_t height = 30,
00115                    UInt_t options = kChildFrame,
00116                    Pixel_t back = GetDefaultFrameBackground());
00117    virtual ~TGeoConeSegEditor();
00118    virtual void   SetModel(TObject *obj);
00119 
00120    void           DoPhi();
00121    void           DoPhi1();
00122    void           DoPhi2();
00123    virtual void   DoApply();
00124    virtual void   DoUndo();
00125    
00126    ClassDef(TGeoConeSegEditor,0)   // TGeoConeSeg editor
00127 };   
00128   
00129 #endif                    

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