TGeoMatrixEditor.h

Go to the documentation of this file.
00001 // @(#):$Id: TGeoMatrixEditor.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: M.Gheata 
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGeoTranslationEditor
00013 #define ROOT_TGeoTranslationEditor
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 //  TGeoTranslationEditor                                               //
00018 //                                                                      //
00019 //  Editor for a TGeoTranslation.                                       //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 #ifndef ROOT_TGButton
00024 #include "TGWidget.h"
00025 #endif
00026 #ifndef ROOT_TGeoGedFrame
00027 #include "TGeoGedFrame.h"
00028 #endif
00029 
00030 class TGeoTranslation;
00031 class TGeoRotation;
00032 class TGeoCombiTrans;
00033 class TGTextEntry;
00034 class TGNumberEntry;
00035 class TGTab;
00036 class TGComboBox;
00037 class TGTextButton;
00038 class TGRadioButton;
00039 class TString;
00040 
00041 class TGeoTranslationEditor : public TGeoGedFrame {
00042 
00043 protected:
00044 
00045    Double_t             fDxi;               // Initial dx
00046    Double_t             fDyi;               // Initial dy
00047    Double_t             fDzi;               // Initial dz
00048    TString              fNamei;             // Initial name
00049    TGeoTranslation     *fTranslation;       // Translation object
00050    Bool_t               fIsModified;        // Flag that this was modified
00051    Bool_t               fIsEditable;        // Flag that this can be changed
00052    TGTextEntry         *fTransName;         // Translation name text entry
00053    TGNumberEntry       *fTransDx;           // Number entry for box DX
00054    TGNumberEntry       *fTransDy;           // Number entry for box DY
00055    TGNumberEntry       *fTransDz;           // Number entry for box DZ
00056    TGTextButton        *fApply;             // Apply-Button to accept changes
00057    TGTextButton        *fCancel;            // Cancel-Button
00058    TGTextButton        *fUndo;              // Undo-Button
00059 
00060    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00061 
00062 public:
00063    TGeoTranslationEditor(const TGWindow *p = 0,
00064                    Int_t width = 140, Int_t height = 30,
00065                    UInt_t options = kChildFrame,
00066                    Pixel_t back = GetDefaultFrameBackground());
00067    virtual ~TGeoTranslationEditor();
00068    virtual void   SetModel(TObject *obj);
00069 
00070    void           DoDx();
00071    void           DoDy();
00072    void           DoDz();
00073    void           DoModified();
00074    void           DoName();
00075    Bool_t         DoParameters();
00076    void           DoApply();
00077    void           DoCancel();
00078    void           DoUndo();
00079    
00080    ClassDef(TGeoTranslationEditor,0)   // TGeoTranslation editor
00081 };   
00082   
00083 //////////////////////////////////////////////////////////////////////////
00084 //                                                                      //
00085 //  TGeoRotationEditor                                                  //
00086 //                                                                      //
00087 //  Editor for a TGeoRotation.                                          //
00088 //                                                                      //
00089 //////////////////////////////////////////////////////////////////////////
00090 
00091 class TGeoRotationEditor : public TGeoGedFrame {
00092 
00093 protected:
00094 
00095    Double_t             fPhii;              // Initial phi   (Euler rotation angle about Z)
00096    Double_t             fThetai;            // Initial theta (Euler rotation angle about new X)
00097    Double_t             fPsii;              // Initial dz    (Euler rotation angle about new Z)
00098    Double_t             fAngleX;            // New rotation angle about X
00099    Double_t             fAngleY;            // New rotation angle about Y
00100    Double_t             fAngleZ;            // New rotation angle about Z
00101    TString              fNamei;             // Initial name
00102    TGeoRotation        *fRotation;          // Rotation object
00103    Bool_t               fIsModified;        // Flag that this was modified
00104    Bool_t               fIsEditable;        // Flag that this can be changed
00105    TGTextEntry         *fRotName;           // Translation name text entry
00106    TGNumberEntry       *fRotPhi;            // Number entry for phi angle
00107    TGNumberEntry       *fRotTheta;          // Number entry for theta angle
00108    TGNumberEntry       *fRotPsi;            // Number entry for psi angle
00109    TGNumberEntry       *fRotAxis;           // Number entry for rotation angle about one axis
00110    TGRadioButton       *fRotX;              // Rotation about X selected
00111    TGRadioButton       *fRotY;              // Rotation about Y selected
00112    TGRadioButton       *fRotZ;              // Rotation about Z selected
00113    TGTextButton        *fApply;             // Apply-Button to accept changes
00114    TGTextButton        *fCancel;            // Cancel-Button
00115    TGTextButton        *fUndo;              // Undo-Button
00116 
00117    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00118 
00119 public:
00120    TGeoRotationEditor(const TGWindow *p = 0,
00121                    Int_t width = 140, Int_t height = 30,
00122                    UInt_t options = kChildFrame,
00123                    Pixel_t back = GetDefaultFrameBackground());
00124    virtual ~TGeoRotationEditor();
00125    virtual void   SetModel(TObject *obj);
00126 
00127    void           DoRotPhi();
00128    void           DoRotTheta();
00129    void           DoRotPsi();
00130    void           DoRotAngle();
00131    void           DoModified();
00132    void           DoName();
00133    Bool_t         DoParameters();
00134    void           DoApply();
00135    void           DoCancel();
00136    void           DoUndo();
00137    
00138    ClassDef(TGeoRotationEditor,0)   // TGeoRotation editor
00139 };   
00140 
00141 //////////////////////////////////////////////////////////////////////////
00142 //                                                                      //
00143 //  TGeoCombiTransEditor                                                //
00144 //                                                                      //
00145 //  Editor for a TGeoCombiTrans.                                        //
00146 //                                                                      //
00147 //////////////////////////////////////////////////////////////////////////
00148 
00149 class TGeoCombiTransEditor : public TGeoGedFrame {
00150 
00151 protected:
00152 
00153    Double_t             fDxi;               // Initial dx
00154    Double_t             fDyi;               // Initial dy
00155    Double_t             fDzi;               // Initial dz
00156    Double_t             fPhii;              // Initial phi   (Euler rotation angle about Z)
00157    Double_t             fThetai;            // Initial theta (Euler rotation angle about new X)
00158    Double_t             fPsii;              // Initial dz    (Euler rotation angle about new Z)
00159    Double_t             fAngleX;            // New rotation angle about X
00160    Double_t             fAngleY;            // New rotation angle about Y
00161    Double_t             fAngleZ;            // New rotation angle about Z
00162    TString              fNamei;             // Initial name
00163    TGeoCombiTrans      *fCombi;             // Combi object
00164    Bool_t               fIsModified;        // Flag that this was modified
00165    Bool_t               fIsEditable;        // Flag that this can be changed
00166    TGTextEntry         *fRotName;           // Translation name text entry
00167    TGNumberEntry       *fTransDx;           // Number entry for box DX
00168    TGNumberEntry       *fTransDy;           // Number entry for box DY
00169    TGNumberEntry       *fTransDz;           // Number entry for box DZ
00170    TGNumberEntry       *fRotPhi;            // Number entry for phi angle
00171    TGNumberEntry       *fRotTheta;          // Number entry for theta angle
00172    TGNumberEntry       *fRotPsi;            // Number entry for psi angle
00173    TGNumberEntry       *fRotAxis;           // Number entry for rotation angle about one axis
00174    TGRadioButton       *fRotX;              // Rotation about X selected
00175    TGRadioButton       *fRotY;              // Rotation about Y selected
00176    TGRadioButton       *fRotZ;              // Rotation about Z selected
00177    TGTextButton        *fApply;             // Apply-Button to accept changes
00178    TGTextButton        *fCancel;            // Cancel-Button
00179    TGTextButton        *fUndo;              // Undo-Button
00180 
00181    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00182 
00183 public:
00184    TGeoCombiTransEditor(const TGWindow *p = 0,
00185                    Int_t width = 140, Int_t height = 30,
00186                    UInt_t options = kChildFrame,
00187                    Pixel_t back = GetDefaultFrameBackground());
00188    virtual ~TGeoCombiTransEditor();
00189    virtual void   SetModel(TObject *obj);
00190 
00191    void           DoDx();
00192    void           DoDy();
00193    void           DoDz();
00194    void           DoRotPhi();
00195    void           DoRotTheta();
00196    void           DoRotPsi();
00197    void           DoRotAngle();
00198    void           DoModified();
00199    void           DoName();
00200    Bool_t         DoParameters();
00201    void           DoApply();
00202    void           DoCancel();
00203    void           DoUndo();
00204    
00205    ClassDef(TGeoCombiTransEditor,0)   // TGeoCombiTrans editor
00206 };   
00207 
00208 #endif                    

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