ROOT logo
// @(#):$Id: TGeoTubeEditor.h 20882 2007-11-19 11:31:26Z rdm $
// Author: M.Gheata 
/*************************************************************************
 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGeoTubeEditor
#define ROOT_TGeoTubeEditor

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoTubeEditor                                                      //
//                                                                      //
//  Editor for a TGeoTube.                                              //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGButton
#include "TGWidget.h"
#endif
#ifndef ROOT_TGeoGedFrame
#include "TGeoGedFrame.h"
#endif

class TGeoTube;
class TGeoTabManager;
class TGTextEntry;
class TGNumberEntry;
class TGTab;
class TGComboBox;
class TGTextButton;
class TGCheckButton;
class TString;

class TGeoTubeEditor : public TGeoGedFrame {

protected:

   Double_t        fRmini;             // Initial inner radius
   Double_t        fRmaxi;             // Initial outer radius
   Double_t        fDzi;               // Initial box dz
   TString         fNamei;             // Initial name
   TGeoTube       *fShape;             // Shape object
   Bool_t          fIsModified;        // Flag that volume was modified
   Bool_t          fIsShapeEditable;   // Flag that the shape can be changed

   TGTextEntry    *fShapeName;         // Shape name text entry
   TGNumberEntry  *fERmin;             // Number entry for rmin
   TGNumberEntry  *fERmax;             // Number entry for rmax
   TGNumberEntry  *fEDz;               // Number entry for DZ
   TGTextButton   *fApply;             // Apply-Button to accept changes
   TGTextButton   *fUndo;              // Undo-Button
   TGCompositeFrame *fBFrame;          // Frame containing Apply/Undo
   TGCheckButton  *fDelayed;           // Check button for delayed draw
   TGCompositeFrame *fDFrame;          // Frame containing Delayed draw

   virtual void ConnectSignals2Slots();   // Connect the signals to the slots
   Bool_t       IsDelayed() const;   

public:
   TGeoTubeEditor(const TGWindow *p = 0,
                  Int_t width = 140, Int_t height = 30,
                  UInt_t options = kChildFrame,
                  Pixel_t back = GetDefaultFrameBackground());
   virtual ~TGeoTubeEditor();
   virtual void   SetModel(TObject *obj);

   void           DoRmin();
   void           DoRmax();
   void           DoDz();
   void           DoModified();
   void           DoName();
   virtual void   DoApply();
   virtual void   DoUndo();
   
   ClassDef(TGeoTubeEditor,0)   // TGeoTube editor
};   

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoTubeSegEditor                                                   //
//                                                                      //
//  Editor for a tube segment.                                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

class TGDoubleVSlider;

class TGeoTubeSegEditor : public TGeoTubeEditor {

protected:

   Bool_t           fLock;              // Phi lock
   Double_t         fPmini;             // Initial phi min
   Double_t         fPmaxi;             // Initial phi max
   TGDoubleVSlider *fSPhi;              // Phi slider
   TGNumberEntry   *fEPhi1;             // Number entry for phi1
   TGNumberEntry   *fEPhi2;             // Number entry for phi2  
   
   virtual void ConnectSignals2Slots();   // Connect the signals to the slots

public:
   TGeoTubeSegEditor(const TGWindow *p = 0,
                   Int_t width = 140, Int_t height = 30,
                   UInt_t options = kChildFrame,
                   Pixel_t back = GetDefaultFrameBackground());
   virtual ~TGeoTubeSegEditor();
   virtual void   SetModel(TObject *obj);

   void           DoPhi();
   void           DoPhi1();
   void           DoPhi2();
   virtual void   DoApply();
   virtual void   DoUndo();
   
   ClassDef(TGeoTubeSegEditor,0)   // TGeoTubeSeg editor
};   

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoCtubEditor                                                      //
//                                                                      //
//  Editor for a tube segment cut with 2 planes.                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

class TGeoCtubEditor : public TGeoTubeSegEditor {

protected:
   Double_t         fThlo;              // Theta angle of the normal to the lower plane (90, 180)
   Double_t         fPhlo;              // Phi angle of the normal to lower Z plane
   Double_t         fThhi;              // Theta angle of the normal to the upper plane (0, 90)
   Double_t         fPhhi;              // Phi angle of the normal to upper Z plane
   TGNumberEntry   *fEThlo;             // Number entry for thlo
   TGNumberEntry   *fEPhlo;             // Number entry for phlo
   TGNumberEntry   *fEThhi;             // Number entry for thhi
   TGNumberEntry   *fEPhhi;             // Number entry for phhi

public:
   TGeoCtubEditor(const TGWindow *p = 0,
                   Int_t width = 140, Int_t height = 30,
                   UInt_t options = kChildFrame,
                   Pixel_t back = GetDefaultFrameBackground());
   virtual ~TGeoCtubEditor();
   virtual void   SetModel(TObject *obj);

   void           DoThlo();
   void           DoPhlo();
   void           DoThhi();
   void           DoPhhi();
   virtual void   DoApply();
   virtual void   DoUndo();
   
   ClassDef(TGeoCtubEditor,0)   // TGeoCtub editor
};
  
#endif                    
 TGeoTubeEditor.h:1
 TGeoTubeEditor.h:2
 TGeoTubeEditor.h:3
 TGeoTubeEditor.h:4
 TGeoTubeEditor.h:5
 TGeoTubeEditor.h:6
 TGeoTubeEditor.h:7
 TGeoTubeEditor.h:8
 TGeoTubeEditor.h:9
 TGeoTubeEditor.h:10
 TGeoTubeEditor.h:11
 TGeoTubeEditor.h:12
 TGeoTubeEditor.h:13
 TGeoTubeEditor.h:14
 TGeoTubeEditor.h:15
 TGeoTubeEditor.h:16
 TGeoTubeEditor.h:17
 TGeoTubeEditor.h:18
 TGeoTubeEditor.h:19
 TGeoTubeEditor.h:20
 TGeoTubeEditor.h:21
 TGeoTubeEditor.h:22
 TGeoTubeEditor.h:23
 TGeoTubeEditor.h:24
 TGeoTubeEditor.h:25
 TGeoTubeEditor.h:26
 TGeoTubeEditor.h:27
 TGeoTubeEditor.h:28
 TGeoTubeEditor.h:29
 TGeoTubeEditor.h:30
 TGeoTubeEditor.h:31
 TGeoTubeEditor.h:32
 TGeoTubeEditor.h:33
 TGeoTubeEditor.h:34
 TGeoTubeEditor.h:35
 TGeoTubeEditor.h:36
 TGeoTubeEditor.h:37
 TGeoTubeEditor.h:38
 TGeoTubeEditor.h:39
 TGeoTubeEditor.h:40
 TGeoTubeEditor.h:41
 TGeoTubeEditor.h:42
 TGeoTubeEditor.h:43
 TGeoTubeEditor.h:44
 TGeoTubeEditor.h:45
 TGeoTubeEditor.h:46
 TGeoTubeEditor.h:47
 TGeoTubeEditor.h:48
 TGeoTubeEditor.h:49
 TGeoTubeEditor.h:50
 TGeoTubeEditor.h:51
 TGeoTubeEditor.h:52
 TGeoTubeEditor.h:53
 TGeoTubeEditor.h:54
 TGeoTubeEditor.h:55
 TGeoTubeEditor.h:56
 TGeoTubeEditor.h:57
 TGeoTubeEditor.h:58
 TGeoTubeEditor.h:59
 TGeoTubeEditor.h:60
 TGeoTubeEditor.h:61
 TGeoTubeEditor.h:62
 TGeoTubeEditor.h:63
 TGeoTubeEditor.h:64
 TGeoTubeEditor.h:65
 TGeoTubeEditor.h:66
 TGeoTubeEditor.h:67
 TGeoTubeEditor.h:68
 TGeoTubeEditor.h:69
 TGeoTubeEditor.h:70
 TGeoTubeEditor.h:71
 TGeoTubeEditor.h:72
 TGeoTubeEditor.h:73
 TGeoTubeEditor.h:74
 TGeoTubeEditor.h:75
 TGeoTubeEditor.h:76
 TGeoTubeEditor.h:77
 TGeoTubeEditor.h:78
 TGeoTubeEditor.h:79
 TGeoTubeEditor.h:80
 TGeoTubeEditor.h:81
 TGeoTubeEditor.h:82
 TGeoTubeEditor.h:83
 TGeoTubeEditor.h:84
 TGeoTubeEditor.h:85
 TGeoTubeEditor.h:86
 TGeoTubeEditor.h:87
 TGeoTubeEditor.h:88
 TGeoTubeEditor.h:89
 TGeoTubeEditor.h:90
 TGeoTubeEditor.h:91
 TGeoTubeEditor.h:92
 TGeoTubeEditor.h:93
 TGeoTubeEditor.h:94
 TGeoTubeEditor.h:95
 TGeoTubeEditor.h:96
 TGeoTubeEditor.h:97
 TGeoTubeEditor.h:98
 TGeoTubeEditor.h:99
 TGeoTubeEditor.h:100
 TGeoTubeEditor.h:101
 TGeoTubeEditor.h:102
 TGeoTubeEditor.h:103
 TGeoTubeEditor.h:104
 TGeoTubeEditor.h:105
 TGeoTubeEditor.h:106
 TGeoTubeEditor.h:107
 TGeoTubeEditor.h:108
 TGeoTubeEditor.h:109
 TGeoTubeEditor.h:110
 TGeoTubeEditor.h:111
 TGeoTubeEditor.h:112
 TGeoTubeEditor.h:113
 TGeoTubeEditor.h:114
 TGeoTubeEditor.h:115
 TGeoTubeEditor.h:116
 TGeoTubeEditor.h:117
 TGeoTubeEditor.h:118
 TGeoTubeEditor.h:119
 TGeoTubeEditor.h:120
 TGeoTubeEditor.h:121
 TGeoTubeEditor.h:122
 TGeoTubeEditor.h:123
 TGeoTubeEditor.h:124
 TGeoTubeEditor.h:125
 TGeoTubeEditor.h:126
 TGeoTubeEditor.h:127
 TGeoTubeEditor.h:128
 TGeoTubeEditor.h:129
 TGeoTubeEditor.h:130
 TGeoTubeEditor.h:131
 TGeoTubeEditor.h:132
 TGeoTubeEditor.h:133
 TGeoTubeEditor.h:134
 TGeoTubeEditor.h:135
 TGeoTubeEditor.h:136
 TGeoTubeEditor.h:137
 TGeoTubeEditor.h:138
 TGeoTubeEditor.h:139
 TGeoTubeEditor.h:140
 TGeoTubeEditor.h:141
 TGeoTubeEditor.h:142
 TGeoTubeEditor.h:143
 TGeoTubeEditor.h:144
 TGeoTubeEditor.h:145
 TGeoTubeEditor.h:146
 TGeoTubeEditor.h:147
 TGeoTubeEditor.h:148
 TGeoTubeEditor.h:149
 TGeoTubeEditor.h:150
 TGeoTubeEditor.h:151
 TGeoTubeEditor.h:152
 TGeoTubeEditor.h:153
 TGeoTubeEditor.h:154
 TGeoTubeEditor.h:155
 TGeoTubeEditor.h:156
 TGeoTubeEditor.h:157
 TGeoTubeEditor.h:158
 TGeoTubeEditor.h:159
 TGeoTubeEditor.h:160
 TGeoTubeEditor.h:161