00001 // @(#):$Id: TGeoTrd2Editor.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: M.Gheata 00003 /************************************************************************* 00004 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * 00005 * All rights reserved. * 00006 * * 00007 * For the licensing terms see $ROOTSYS/LICENSE. * 00008 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00009 *************************************************************************/ 00010 00011 #ifndef ROOT_TGeoTrd2Editor 00012 #define ROOT_TGeoTrd2Editor 00013 00014 ////////////////////////////////////////////////////////////////////////// 00015 // // 00016 // TGeoTrd2Editor // 00017 // // 00018 // Editor for a TGeoTrd2. // 00019 // // 00020 ////////////////////////////////////////////////////////////////////////// 00021 00022 #ifndef ROOT_TGButton 00023 #include "TGWidget.h" 00024 #endif 00025 #ifndef ROOT_TGeoGedFrame 00026 #include "TGeoGedFrame.h" 00027 #endif 00028 00029 class TGeoTrd2; 00030 class TGeoTabManager; 00031 class TGTextEntry; 00032 class TGNumberEntry; 00033 class TGTab; 00034 class TGComboBox; 00035 class TGTextButton; 00036 class TGCheckButton; 00037 class TString; 00038 00039 class TGeoTrd2Editor : public TGeoGedFrame { 00040 00041 protected: 00042 00043 Double_t fDxi1; // Initial dx1 00044 Double_t fDxi2; // Initial dx2 00045 Double_t fDyi1; // Initial dy1 00046 Double_t fDyi2; // Initial dy2 00047 Double_t fDzi; // Initial dz 00048 TString fNamei; // Initial name 00049 TGeoTrd2 *fShape; // Shape object 00050 Bool_t fIsModified; // Flag that volume was modified 00051 Bool_t fIsShapeEditable; // Flag that the shape can be changed 00052 00053 TGTextEntry *fShapeName; // Shape name text entry 00054 TGNumberEntry *fEDx1; // Number entry for DX1 00055 TGNumberEntry *fEDx2; // Number entry for DX2 00056 TGNumberEntry *fEDy1; // Number entry for DY1 00057 TGNumberEntry *fEDy2; // Number entry for DY1 00058 TGNumberEntry *fEDz; // Number entry for DZ 00059 TGTextButton *fApply; // Apply-Button to accept changes 00060 TGTextButton *fUndo; // Undo-Button 00061 TGCheckButton *fDelayed; // Check button for delayed draw 00062 00063 virtual void ConnectSignals2Slots(); // Connect the signals to the slots 00064 Bool_t IsDelayed() const; 00065 00066 public: 00067 TGeoTrd2Editor(const TGWindow *p = 0, 00068 Int_t width = 140, Int_t height = 30, 00069 UInt_t options = kChildFrame, 00070 Pixel_t back = GetDefaultFrameBackground()); 00071 virtual ~TGeoTrd2Editor(); 00072 virtual void SetModel(TObject *obj); 00073 00074 void DoDx1(); 00075 void DoDx2(); 00076 void DoDy1(); 00077 void DoDy2(); 00078 void DoDz(); 00079 void DoModified(); 00080 void DoName(); 00081 void DoApply(); 00082 void DoUndo(); 00083 00084 ClassDef(TGeoTrd2Editor,0) // TGeoTrd2 editor 00085 }; 00086 00087 #endif