Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGeoMatrixEditor.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 /*************************************************************************
0005  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGeoTranslationEditor
0013 #define ROOT_TGeoTranslationEditor
0014 
0015 #include "TGWidget.h"
0016 #include "TGeoGedFrame.h"
0017 
0018 class TGeoTranslation;
0019 class TGeoRotation;
0020 class TGeoCombiTrans;
0021 class TGTextEntry;
0022 class TGNumberEntry;
0023 class TGTab;
0024 class TGComboBox;
0025 class TGTextButton;
0026 class TGRadioButton;
0027 class TString;
0028 
0029 class TGeoTranslationEditor : public TGeoGedFrame {
0030 
0031 protected:
0032    Double_t fDxi;                 // Initial dx
0033    Double_t fDyi;                 // Initial dy
0034    Double_t fDzi;                 // Initial dz
0035    TString fNamei;                // Initial name
0036    TGeoTranslation *fTranslation; // Translation object
0037    Bool_t fIsModified;            // Flag that this was modified
0038    Bool_t fIsEditable;            // Flag that this can be changed
0039    TGTextEntry *fTransName;       // Translation name text entry
0040    TGNumberEntry *fTransDx;       // Number entry for box DX
0041    TGNumberEntry *fTransDy;       // Number entry for box DY
0042    TGNumberEntry *fTransDz;       // Number entry for box DZ
0043    TGTextButton *fApply;          // Apply-Button to accept changes
0044    TGTextButton *fCancel;         // Cancel-Button
0045    TGTextButton *fUndo;           // Undo-Button
0046 
0047    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0048 
0049 public:
0050    TGeoTranslationEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30,
0051                          UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
0052    ~TGeoTranslationEditor() override;
0053    void SetModel(TObject *obj) override;
0054 
0055    void DoDx();
0056    void DoDy();
0057    void DoDz();
0058    void DoModified();
0059    void DoName();
0060    Bool_t DoParameters();
0061    void DoApply();
0062    void DoCancel();
0063    void DoUndo();
0064 
0065    ClassDefOverride(TGeoTranslationEditor, 0) // TGeoTranslation editor
0066 };
0067 
0068 class TGeoRotationEditor : public TGeoGedFrame {
0069 
0070 protected:
0071    Double_t fPhii;           // Initial phi   (Euler rotation angle about Z)
0072    Double_t fThetai;         // Initial theta (Euler rotation angle about new X)
0073    Double_t fPsii;           // Initial dz    (Euler rotation angle about new Z)
0074    Double_t fAngleX;         // New rotation angle about X
0075    Double_t fAngleY;         // New rotation angle about Y
0076    Double_t fAngleZ;         // New rotation angle about Z
0077    TString fNamei;           // Initial name
0078    TGeoRotation *fRotation;  // Rotation object
0079    Bool_t fIsModified;       // Flag that this was modified
0080    Bool_t fIsEditable;       // Flag that this can be changed
0081    TGTextEntry *fRotName;    // Translation name text entry
0082    TGNumberEntry *fRotPhi;   // Number entry for phi angle
0083    TGNumberEntry *fRotTheta; // Number entry for theta angle
0084    TGNumberEntry *fRotPsi;   // Number entry for psi angle
0085    TGNumberEntry *fRotAxis;  // Number entry for rotation angle about one axis
0086    TGRadioButton *fRotX;     // Rotation about X selected
0087    TGRadioButton *fRotY;     // Rotation about Y selected
0088    TGRadioButton *fRotZ;     // Rotation about Z selected
0089    TGTextButton *fApply;     // Apply-Button to accept changes
0090    TGTextButton *fCancel;    // Cancel-Button
0091    TGTextButton *fUndo;      // Undo-Button
0092 
0093    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0094 
0095 public:
0096    TGeoRotationEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0097                       Pixel_t back = GetDefaultFrameBackground());
0098    ~TGeoRotationEditor() override;
0099    void SetModel(TObject *obj) override;
0100 
0101    void DoRotPhi();
0102    void DoRotTheta();
0103    void DoRotPsi();
0104    void DoRotAngle();
0105    void DoModified();
0106    void DoName();
0107    Bool_t DoParameters();
0108    void DoApply();
0109    void DoCancel();
0110    void DoUndo();
0111 
0112    ClassDefOverride(TGeoRotationEditor, 0) // TGeoRotation editor
0113 };
0114 
0115 class TGeoCombiTransEditor : public TGeoGedFrame {
0116 
0117 protected:
0118    Double_t fDxi;            // Initial dx
0119    Double_t fDyi;            // Initial dy
0120    Double_t fDzi;            // Initial dz
0121    Double_t fPhii;           // Initial phi   (Euler rotation angle about Z)
0122    Double_t fThetai;         // Initial theta (Euler rotation angle about new X)
0123    Double_t fPsii;           // Initial dz    (Euler rotation angle about new Z)
0124    Double_t fAngleX;         // New rotation angle about X
0125    Double_t fAngleY;         // New rotation angle about Y
0126    Double_t fAngleZ;         // New rotation angle about Z
0127    TString fNamei;           // Initial name
0128    TGeoCombiTrans *fCombi;   // Combi object
0129    Bool_t fIsModified;       // Flag that this was modified
0130    Bool_t fIsEditable;       // Flag that this can be changed
0131    TGTextEntry *fRotName;    // Translation name text entry
0132    TGNumberEntry *fTransDx;  // Number entry for box DX
0133    TGNumberEntry *fTransDy;  // Number entry for box DY
0134    TGNumberEntry *fTransDz;  // Number entry for box DZ
0135    TGNumberEntry *fRotPhi;   // Number entry for phi angle
0136    TGNumberEntry *fRotTheta; // Number entry for theta angle
0137    TGNumberEntry *fRotPsi;   // Number entry for psi angle
0138    TGNumberEntry *fRotAxis;  // Number entry for rotation angle about one axis
0139    TGRadioButton *fRotX;     // Rotation about X selected
0140    TGRadioButton *fRotY;     // Rotation about Y selected
0141    TGRadioButton *fRotZ;     // Rotation about Z selected
0142    TGTextButton *fApply;     // Apply-Button to accept changes
0143    TGTextButton *fCancel;    // Cancel-Button
0144    TGTextButton *fUndo;      // Undo-Button
0145 
0146    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0147 
0148 public:
0149    TGeoCombiTransEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0150                         Pixel_t back = GetDefaultFrameBackground());
0151    ~TGeoCombiTransEditor() override;
0152    void SetModel(TObject *obj) override;
0153 
0154    void DoDx();
0155    void DoDy();
0156    void DoDz();
0157    void DoRotPhi();
0158    void DoRotTheta();
0159    void DoRotPsi();
0160    void DoRotAngle();
0161    void DoModified();
0162    void DoName();
0163    Bool_t DoParameters();
0164    void DoApply();
0165    void DoCancel();
0166    void DoUndo();
0167 
0168    ClassDefOverride(TGeoCombiTransEditor, 0) // TGeoCombiTrans editor
0169 };
0170 
0171 #endif