TGeoTrapEditor.h

Go to the documentation of this file.
00001 // @(#):$Id: TGeoTrapEditor.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_TGeoTrapEditor
00012 #define ROOT_TGeoTrapEditor
00013 
00014 //////////////////////////////////////////////////////////////////////////
00015 //                                                                      //
00016 //  TGeoTrapEditor                                                      //
00017 //                                                                      //
00018 //  Editor for a TGeoTrap.                                              //
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 TGeoTrap;
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 TGeoTrapEditor : public TGeoGedFrame {
00040 
00041 protected:
00042 
00043    Double_t             fH1i;               // Initial half length in y at low z
00044    Double_t             fBl1i;              // Initial  half length in x at low z and y low edge
00045    Double_t             fTl1i;              // Initial  half length in x at low z and y high edge
00046    Double_t             fDzi;               // Initial  Dz
00047    Double_t             fSci;               // Initial  scale factor for upper face
00048    Double_t             fAlpha1i;           // Initial  angle between centers of x edges an y axis at low z
00049    Double_t             fThetai;            // Initial  theta
00050    Double_t             fPhii;              // Initial  phi
00051    TString              fNamei;             // Initial name
00052    TGeoTrap            *fShape;             // Shape object
00053    Bool_t               fIsModified;        // Flag that volume was modified
00054    Bool_t               fIsShapeEditable;   // Flag that the shape can be changed
00055 
00056    TGTextEntry         *fShapeName;         // Shape name text entry
00057    TGNumberEntry       *fEH1;               // Number entry for  H1 
00058    TGNumberEntry       *fEBl1;              // Number entry for  Bl1
00059    TGNumberEntry       *fETl1;              // Number entry for  Tl1
00060    TGNumberEntry       *fESc1;              // Number entry for lower scale
00061    TGNumberEntry       *fESc2;              // Number entry for  upper scale
00062    TGNumberEntry       *fEDz;               // Number entry for  DZ
00063    TGNumberEntry       *fEAlpha1;           // Number entry for  Alpha1
00064    TGNumberEntry       *fETheta;            // Number entry for  Theta 
00065    TGNumberEntry       *fEPhi  ;            // Number entry for  Theta 
00066    TGTextButton        *fApply;             // Apply-Button to accept changes
00067    TGTextButton        *fUndo;              // Undo-Button
00068    TGCompositeFrame    *fBFrame;            // Frame containing Apply/Undo
00069    TGCheckButton       *fDelayed;           // Check button for delayed draw
00070    TGCompositeFrame    *fDFrame;            // Frame containing Delayed draw
00071 
00072    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00073    Bool_t       IsDelayed() const;   
00074 
00075 public:
00076    TGeoTrapEditor(const TGWindow *p = 0,
00077                    Int_t width = 140, Int_t height = 30,
00078                    UInt_t options = kChildFrame,
00079                    Pixel_t back = GetDefaultFrameBackground());
00080    virtual ~TGeoTrapEditor();
00081    virtual void   SetModel(TObject *obj);
00082 
00083    void           DoH1();
00084    void           DoBl1();
00085    void           DoTl1();
00086    void           DoDz();
00087    void           DoSc1();
00088    void           DoSc2();
00089    void           DoAlpha1();
00090    void           DoTheta();
00091    void           DoPhi();
00092    void           DoModified();
00093    void           DoName();
00094    virtual void   DoApply();
00095    virtual void   DoUndo();
00096    
00097    ClassDef(TGeoTrapEditor,0)   // TGeoTrap editor
00098 };   
00099 
00100 class TGeoGtraEditor : public TGeoTrapEditor {
00101 
00102 protected:
00103 
00104    Double_t             fTwisti;            // Initial twist angle
00105    TGNumberEntry       *fETwist;            // Number entry for  H1 
00106    
00107 public:
00108    TGeoGtraEditor(const TGWindow *p = 0,
00109                    Int_t width = 140, Int_t height = 30,
00110                    UInt_t options = kChildFrame,
00111                    Pixel_t back = GetDefaultFrameBackground());
00112    virtual ~TGeoGtraEditor();
00113    virtual void   SetModel(TObject *obj);
00114   
00115    void           DoTwist();
00116    virtual void   DoApply();
00117    virtual void   DoUndo();
00118 
00119    ClassDef(TGeoGtraEditor,0)   // TGeoGtra editor
00120 };   
00121    
00122 #endif                    

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