|
| 1 | +// @(#):$Name: $:$Id: Exp $ |
| 2 | +// Author: M.Gheata |
| 3 | +/************************************************************************* |
| 4 | + * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * |
| 5 | + * All rights reserved. * |
| 6 | + * * |
| 7 | + * For the licensing terms see $ROOTSYS/LICENSE. * |
| 8 | + * For the list of contributors see $ROOTSYS/README/CREDITS. * |
| 9 | + *************************************************************************/ |
| 10 | + |
| 11 | +#ifndef ROOT_TGeoConeEditor |
| 12 | +#define ROOT_TGeoConeEditor |
| 13 | + |
| 14 | +////////////////////////////////////////////////////////////////////////// |
| 15 | +// // |
| 16 | +// TGeoConeEditor // |
| 17 | +// // |
| 18 | +// Editor for a TGeoCone. // |
| 19 | +// // |
| 20 | +////////////////////////////////////////////////////////////////////////// |
| 21 | + |
| 22 | +#ifndef ROOT_TGButton |
| 23 | +#include "TGWidget.h" |
| 24 | +#endif |
| 25 | +#ifndef ROOT_TGedFrame |
| 26 | +#include "TGedFrame.h" |
| 27 | +#endif |
| 28 | + |
| 29 | +class TGeoCone; |
| 30 | +class TGeoConeSeg; |
| 31 | +class TGeoTabManager; |
| 32 | +class TGTextEntry; |
| 33 | +class TGNumberEntry; |
| 34 | +class TGTab; |
| 35 | +class TGComboBox; |
| 36 | +class TGTextButton; |
| 37 | +class TString; |
| 38 | + |
| 39 | +class TGeoConeEditor : public TGedFrame { |
| 40 | + |
| 41 | +protected: |
| 42 | + |
| 43 | + Double_t fRmini1; // Initial inner radius at -dz |
| 44 | + Double_t fRmaxi1; // Initial outer radius at -dz |
| 45 | + Double_t fRmini2; // Initial inner radius at +dz |
| 46 | + Double_t fRmaxi2; // Initial outer radius at +dz |
| 47 | + Double_t fDzi; // Initial box dz |
| 48 | + TString fNamei; // Initial name |
| 49 | + TGeoCone *fShape; // Shape object |
| 50 | + Bool_t fIsModified; // Flag that volume was modified |
| 51 | + Bool_t fIsShapeEditable; // Flag that the shape can be changed |
| 52 | + TGeoTabManager *fTabMgr; // Tab manager |
| 53 | + TGTextEntry *fShapeName; // Shape name text entry |
| 54 | + TGNumberEntry *fERmin1; // Number entry for rmin1 |
| 55 | + TGNumberEntry *fERmin2; // Number entry for rmin2 |
| 56 | + TGNumberEntry *fERmax1; // Number entry for rmax1 |
| 57 | + TGNumberEntry *fERmax2; // Number entry for rmax2 |
| 58 | + TGNumberEntry *fEDz; // Number entry for DZ |
| 59 | + TGTextButton *fApply; // Apply-Button to accept changes |
| 60 | + TGTextButton *fCancel; // Cancel-Button |
| 61 | + TGTextButton *fUndo; // Undo-Button |
| 62 | + |
| 63 | + virtual void ConnectSignals2Slots(); // Connect the signals to the slots |
| 64 | + |
| 65 | +public: |
| 66 | + TGeoConeEditor(const TGWindow *p, Int_t id, |
| 67 | + Int_t width = 140, Int_t height = 30, |
| 68 | + UInt_t options = kChildFrame, |
| 69 | + Pixel_t back = GetDefaultFrameBackground()); |
| 70 | + virtual ~TGeoConeEditor(); |
| 71 | + virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event); |
| 72 | + |
| 73 | + void DoRmin1(); |
| 74 | + void DoRmin2(); |
| 75 | + void DoRmax1(); |
| 76 | + void DoRmax2(); |
| 77 | + void DoDz(); |
| 78 | + void DoModified(); |
| 79 | + void DoName(); |
| 80 | + virtual void DoApply(); |
| 81 | + virtual void DoCancel(); |
| 82 | + virtual void DoUndo(); |
| 83 | + |
| 84 | + ClassDef(TGeoConeEditor,0) // TGeoCone editor |
| 85 | +}; |
| 86 | + |
| 87 | +////////////////////////////////////////////////////////////////////////// |
| 88 | +// // |
| 89 | +// TGeoConeSegEditor // |
| 90 | +// // |
| 91 | +// Editor for a cone segment. // |
| 92 | +// // |
| 93 | +////////////////////////////////////////////////////////////////////////// |
| 94 | + |
| 95 | +class TGDoubleVSlider; |
| 96 | + |
| 97 | +class TGeoConeSegEditor : public TGeoConeEditor { |
| 98 | + |
| 99 | +protected: |
| 100 | + |
| 101 | + Bool_t fLock; // Phi lock |
| 102 | + Double_t fPmini; // Initial phi min |
| 103 | + Double_t fPmaxi; // Initial phi max |
| 104 | + TGDoubleVSlider *fSPhi; // Phi slider |
| 105 | + TGNumberEntry *fEPhi1; // Number entry for phi1 |
| 106 | + TGNumberEntry *fEPhi2; // Number entry for phi2 |
| 107 | + |
| 108 | + virtual void ConnectSignals2Slots(); // Connect the signals to the slots |
| 109 | + |
| 110 | +public: |
| 111 | + TGeoConeSegEditor(const TGWindow *p, Int_t id, |
| 112 | + Int_t width = 140, Int_t height = 30, |
| 113 | + UInt_t options = kChildFrame, |
| 114 | + Pixel_t back = GetDefaultFrameBackground()); |
| 115 | + virtual ~TGeoConeSegEditor(); |
| 116 | + virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event); |
| 117 | + |
| 118 | + void DoPhi(); |
| 119 | + void DoPhi1(); |
| 120 | + void DoPhi2(); |
| 121 | + virtual void DoApply(); |
| 122 | + virtual void DoUndo(); |
| 123 | + virtual void DoCancel(); |
| 124 | + |
| 125 | + ClassDef(TGeoConeSegEditor,0) // TGeoConeSeg editor |
| 126 | +}; |
| 127 | + |
| 128 | +#endif |
0 commit comments