00001 // @(#):$Id: TGeoVolumeEditor.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_TGeoVolumeEditor 00013 #define ROOT_TGeoVolumeEditor 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TGeoVolumeEditor // 00018 // // 00019 // Editor for a TGeoVolume. // 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 TGeoManager; 00031 class TGeoVolume; 00032 class TGeoShape; 00033 class TGeoMedium; 00034 class TGeoMaterial; 00035 class TGeoMatrix; 00036 class TGTextEntry; 00037 class TGNumberEntry; 00038 class TGTab; 00039 class TGComboBox; 00040 class TGTextButton; 00041 class TGPictureButton; 00042 class TGCheckButton; 00043 class TGRadioButton; 00044 class TGShutter; 00045 class TGShutterItem; 00046 class TGeoTabManager; 00047 00048 class TGeoVolumeEditor : public TGeoGedFrame { 00049 00050 protected: 00051 00052 TGeoManager *fGeometry; // Selected geometry manager 00053 TGeoVolume *fVolume; // Volume object 00054 Bool_t fIsModified; // Flag that volume was modified 00055 Bool_t fIsAssembly; // Flag that the volume is an assembly 00056 Bool_t fIsDivided; // Flag that the volume is divided 00057 TGShutter *fCategories; // Categories shutter 00058 TGTextEntry *fVolumeName; // Volume name text entry 00059 // TGComboBox *fShapeList; // All-shapes combo box 00060 TGeoShape *fSelectedShape; // Selected shape 00061 TGLabel *fLSelShape; // Selected shape label 00062 TGPictureButton *fBSelShape; // Button for selecting a shape 00063 // TGComboBox *fMediaList; // All-media combo box 00064 TGeoMedium *fSelectedMedium; // Selected medium 00065 TGLabel *fLSelMedium; // Selected medium label 00066 TGPictureButton *fBSelMedium; // Button for selecting a medium 00067 // TGComboBox *fVolumeList; // All-volume combo box 00068 TGeoVolume *fSelectedVolume; // Selected volume 00069 TGLabel *fLSelVolume; // Selected volume label 00070 TGPictureButton *fBSelVolume; // Button for selecting a volume 00071 // TGComboBox *fMatrixList; // All-matrix combo box 00072 TGeoMatrix *fSelectedMatrix; // Selected matrix 00073 TGLabel *fLSelMatrix; // Selected matrix label 00074 TGPictureButton *fBSelMatrix; // Button for selecting a matrix 00075 TGNumberEntry *fCopyNumber; // Node copy number 00076 TGTextButton *fAddNode; // Button for adding a node 00077 TGTextButton *fEditShape; // Check button for shape editing 00078 TGTextButton *fEditMedium; // Check button for medium editing 00079 TGComboBox *fNodeList; // Daughters combo box 00080 TGTextButton *fEditMatrix; // Button for editing the position of a daughter 00081 TGTextButton *fRemoveNode; // Button for removing a daughter 00082 TGCheckButton *fBVis[2]; // Buttons for setting vis. on/off 00083 TGRadioButton *fBView[3]; // Radio for selecting view options 00084 TGCheckButton *fBRaytrace; // Raytracing on/off 00085 TGCheckButton *fBAuto; // Check button for auto vis level 00086 TGNumberEntry *fEVisLevel; // Number entry for visibility level 00087 TGTextButton *fApplyDiv; // Button for applying division settings 00088 TGTextEntry *fDivName; // Division volume name text entry 00089 TGRadioButton *fBDiv[3]; // Radio for selecting division type 00090 TGNumberEntry *fEDivFrom; // Number entry for division start 00091 TGNumberEntry *fEDivStep; // Number entry for division step 00092 TGNumberEntry *fEDivN; // Number entry for division Nslices 00093 00094 virtual void ConnectSignals2Slots(); // Connect the signals to the slots 00095 00096 public: 00097 TGeoVolumeEditor(const TGWindow *p = 0, 00098 Int_t width = 140, Int_t height = 30, 00099 UInt_t options = kChildFrame, 00100 Pixel_t back = GetDefaultFrameBackground()); 00101 virtual ~TGeoVolumeEditor(); 00102 virtual void SetModel(TObject *obj); 00103 virtual void ActivateBaseClassEditors(TClass* cl); 00104 00105 void DoAddNode(); 00106 void DoVolumeName(); 00107 void DoSelectShape(); 00108 void DoSelectMedium(); 00109 void DoSelectMatrix(); 00110 void DoSelectVolume(); 00111 void DoEditShape(); 00112 void DoEditMedium(); 00113 void DoEditMatrix(); 00114 void DoRemoveNode(); 00115 void DoVisVolume(); 00116 void DoVisDaughters(); 00117 void DoVisAuto(); 00118 void DoVisLevel(); 00119 void DoViewAll(); 00120 void DoViewLeaves(); 00121 void DoViewOnly(); 00122 void DoDivSelAxis(); 00123 void DoDivFromTo(); 00124 void DoDivStep(); 00125 void DoDivN(); 00126 void DoDivName(); 00127 void DoApplyDiv(); 00128 void DoRaytrace(); 00129 00130 ClassDef(TGeoVolumeEditor,0) // TGeoVolume editor 00131 }; 00132 00133 #endif