Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:53

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_TGeoNodeEditor
0013 #define ROOT_TGeoNodeEditor
0014 
0015 #include "TGWidget.h"
0016 #include "TGeoGedFrame.h"
0017 
0018 class TGeoNode;
0019 class TGeoVolume;
0020 class TGeoMatrix;
0021 class TGTextEntry;
0022 class TGNumberEntry;
0023 class TGTab;
0024 class TGComboBox;
0025 class TGTextButton;
0026 class TGPictureButton;
0027 class TGCheckButton;
0028 class TGeoTabManager;
0029 
0030 class TGeoNodeEditor : public TGeoGedFrame {
0031 
0032 protected:
0033    TGeoNode *fNode; // Node object
0034 
0035    Bool_t fIsEditable;           // Flag that the medium can be changed
0036    TGTextEntry *fNodeName;       // Node name text entry
0037    TGNumberEntry *fNodeNumber;   // Copy number
0038    TGeoVolume *fSelectedVolume;  // Selected volume
0039    TGLabel *fLSelVolume;         // Selected volume label
0040    TGPictureButton *fBSelVolume; // Button for selecting a volume
0041    TGeoVolume *fSelectedMother;  // Selected mother
0042    TGLabel *fLSelMother;         // Selected mother label
0043    TGPictureButton *fBSelMother; // Button for selecting a mother volume
0044    TGeoMatrix *fSelectedMatrix;  // Selected matrix
0045    TGLabel *fLSelMatrix;         // Selected matrix label
0046    TGPictureButton *fBSelMatrix; // Button for selecting a matrix
0047    TGTextButton *fEditMother;    // Check button for editing mother volume
0048    TGTextButton *fEditVolume;    // Check button for volume editing
0049    TGTextButton *fEditMatrix;    // Check button for matrix editing
0050    TGTextButton *fApply;         // Apply-Button to accept changes
0051    TGTextButton *fCancel;        // Cancel-Button
0052    TGTextButton *fUndo;          // Undo-Button
0053 
0054    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0055 
0056 public:
0057    TGeoNodeEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0058                   Pixel_t back = GetDefaultFrameBackground());
0059    ~TGeoNodeEditor() override;
0060    void SetModel(TObject *obj) override;
0061 
0062    void DoEditMother();
0063    void DoEditVolume();
0064    void DoEditMatrix();
0065    void DoSelectMother();
0066    void DoSelectVolume();
0067    void DoSelectMatrix();
0068    void DoNodeName();
0069    void DoNodeNumber();
0070    void DoApply();
0071    void DoUndo();
0072 
0073    ClassDefOverride(TGeoNodeEditor, 0) // TGeoNode editor
0074 };
0075 
0076 #endif