00001 // @(#):$Id: TGeoMediumEditor.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_TGeoMediumEditor 00013 #define ROOT_TGeoMediumEditor 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TGeoMediumEditor // 00018 // // 00019 // Editor for a TGeoMedium. // 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 TGeoMedium; 00031 class TGeoMaterial; 00032 class TGeoTabManager; 00033 class TGTextEntry; 00034 class TGNumberEntry; 00035 class TGTab; 00036 class TGComboBox; 00037 class TGTextButton; 00038 class TGPictureButton; 00039 class TGCheckButton; 00040 class TGLabel; 00041 00042 class TGeoMediumEditor : public TGeoGedFrame { 00043 00044 protected: 00045 00046 TGeoMedium *fMedium; // Medium object 00047 00048 Bool_t fIsEditable; // Flag that the medium can be changed 00049 Bool_t fIsModified; // Modified flag 00050 TGTextEntry *fMedName; // Medium name text entry 00051 TGNumberEntry *fMedId; // Number entry for medium id 00052 // TGComboBox *fMatList; // Combo box for all materials 00053 TGeoMaterial *fSelectedMaterial; // Selected material 00054 TGLabel *fLSelMaterial; // Selected material label 00055 TGPictureButton *fBSelMaterial; // Button for selecting a material 00056 TGTextButton *fEditMaterial; // Check button for material editing 00057 TGCheckButton *fMedSensitive; // Check button for sensitivity 00058 TGComboBox *fMagfldOption; // Combo box with magnetic field options 00059 TGNumberEntry *fMedFieldm; // Number entry for fieldm 00060 TGNumberEntry *fMedTmaxfd; // Number entry for tmaxfd 00061 TGNumberEntry *fMedStemax; // Number entry for stemax 00062 TGNumberEntry *fMedDeemax; // Number entry for deemax 00063 TGNumberEntry *fMedEpsil; // Number entry for epsil 00064 TGNumberEntry *fMedStmin; // Number entry for stmin 00065 TGTextButton *fApply; // Apply-Button to accept changes 00066 TGTextButton *fUndo; // Undo-Button 00067 00068 virtual void ConnectSignals2Slots(); // Connect the signals to the slots 00069 00070 public: 00071 TGeoMediumEditor(const TGWindow *p = 0, 00072 Int_t width = 140, Int_t height = 30, 00073 UInt_t options = kChildFrame, 00074 Pixel_t back = GetDefaultFrameBackground()); 00075 virtual ~TGeoMediumEditor(); 00076 virtual void SetModel(TObject *obj); 00077 00078 void DoEditMaterial(); 00079 void DoSelectMaterial(); 00080 void DoMedName(); 00081 void DoMedId(); 00082 void DoToggleSensitive(); 00083 void DoMagfldSelect(Int_t ientry); 00084 void DoFieldm(); 00085 void DoTmaxfd(); 00086 void DoStemax(); 00087 void DoDeemax(); 00088 void DoEpsil(); 00089 void DoStmin(); 00090 void DoApply(); 00091 void DoUndo(); 00092 00093 ClassDef(TGeoMediumEditor,0) // TGeoMedium editor 00094 }; 00095 00096 #endif