// @(#):$Id$
// 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_TGeoTrapEditor
#define ROOT_TGeoTrapEditor

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoTrapEditor                                                      //
//                                                                      //
//  Editor for a TGeoTrap.                                              //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

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

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

class TGeoTrapEditor : public TGeoGedFrame {

protected:

   Double_t             fH1i;               // Initial half length in y at low z
   Double_t             fBl1i;              // Initial  half length in x at low z and y low edge
   Double_t             fTl1i;              // Initial  half length in x at low z and y high edge
   Double_t             fDzi;               // Initial  Dz
   Double_t             fSci;               // Initial  scale factor for upper face
   Double_t             fAlpha1i;           // Initial  angle between centers of x edges an y axis at low z
   Double_t             fThetai;            // Initial  theta
   Double_t             fPhii;              // Initial  phi
   TString              fNamei;             // Initial name
   TGeoTrap            *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       *fEH1;               // Number entry for  H1 
   TGNumberEntry       *fEBl1;              // Number entry for  Bl1
   TGNumberEntry       *fETl1;              // Number entry for  Tl1
   TGNumberEntry       *fESc1;              // Number entry for lower scale
   TGNumberEntry       *fESc2;              // Number entry for  upper scale
   TGNumberEntry       *fEDz;               // Number entry for  DZ
   TGNumberEntry       *fEAlpha1;           // Number entry for  Alpha1
   TGNumberEntry       *fETheta;            // Number entry for  Theta 
   TGNumberEntry       *fEPhi  ;            // Number entry for  Theta 
   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:
   TGeoTrapEditor(const TGWindow *p = 0,
                   Int_t width = 140, Int_t height = 30,
                   UInt_t options = kChildFrame,
                   Pixel_t back = GetDefaultFrameBackground());
   virtual ~TGeoTrapEditor();
   virtual void   SetModel(TObject *obj);

   void           DoH1();
   void           DoBl1();
   void           DoTl1();
   void           DoDz();
   void           DoSc1();
   void           DoSc2();
   void           DoAlpha1();
   void           DoTheta();
   void           DoPhi();
   void           DoModified();
   void           DoName();
   virtual void   DoApply();
   virtual void   DoUndo();
   
   ClassDef(TGeoTrapEditor,0)   // TGeoTrap editor
};   

class TGeoGtraEditor : public TGeoTrapEditor {

protected:

   Double_t             fTwisti;            // Initial twist angle
   TGNumberEntry       *fETwist;            // Number entry for  H1 
   
public:
   TGeoGtraEditor(const TGWindow *p = 0,
                   Int_t width = 140, Int_t height = 30,
                   UInt_t options = kChildFrame,
                   Pixel_t back = GetDefaultFrameBackground());
   virtual ~TGeoGtraEditor();
   virtual void   SetModel(TObject *obj);
  
   void           DoTwist();
   virtual void   DoApply();
   virtual void   DoUndo();

   ClassDef(TGeoGtraEditor,0)   // TGeoGtra editor
};   
   
#endif                    
 TGeoTrapEditor.h:1
 TGeoTrapEditor.h:2
 TGeoTrapEditor.h:3
 TGeoTrapEditor.h:4
 TGeoTrapEditor.h:5
 TGeoTrapEditor.h:6
 TGeoTrapEditor.h:7
 TGeoTrapEditor.h:8
 TGeoTrapEditor.h:9
 TGeoTrapEditor.h:10
 TGeoTrapEditor.h:11
 TGeoTrapEditor.h:12
 TGeoTrapEditor.h:13
 TGeoTrapEditor.h:14
 TGeoTrapEditor.h:15
 TGeoTrapEditor.h:16
 TGeoTrapEditor.h:17
 TGeoTrapEditor.h:18
 TGeoTrapEditor.h:19
 TGeoTrapEditor.h:20
 TGeoTrapEditor.h:21
 TGeoTrapEditor.h:22
 TGeoTrapEditor.h:23
 TGeoTrapEditor.h:24
 TGeoTrapEditor.h:25
 TGeoTrapEditor.h:26
 TGeoTrapEditor.h:27
 TGeoTrapEditor.h:28
 TGeoTrapEditor.h:29
 TGeoTrapEditor.h:30
 TGeoTrapEditor.h:31
 TGeoTrapEditor.h:32
 TGeoTrapEditor.h:33
 TGeoTrapEditor.h:34
 TGeoTrapEditor.h:35
 TGeoTrapEditor.h:36
 TGeoTrapEditor.h:37
 TGeoTrapEditor.h:38
 TGeoTrapEditor.h:39
 TGeoTrapEditor.h:40
 TGeoTrapEditor.h:41
 TGeoTrapEditor.h:42
 TGeoTrapEditor.h:43
 TGeoTrapEditor.h:44
 TGeoTrapEditor.h:45
 TGeoTrapEditor.h:46
 TGeoTrapEditor.h:47
 TGeoTrapEditor.h:48
 TGeoTrapEditor.h:49
 TGeoTrapEditor.h:50
 TGeoTrapEditor.h:51
 TGeoTrapEditor.h:52
 TGeoTrapEditor.h:53
 TGeoTrapEditor.h:54
 TGeoTrapEditor.h:55
 TGeoTrapEditor.h:56
 TGeoTrapEditor.h:57
 TGeoTrapEditor.h:58
 TGeoTrapEditor.h:59
 TGeoTrapEditor.h:60
 TGeoTrapEditor.h:61
 TGeoTrapEditor.h:62
 TGeoTrapEditor.h:63
 TGeoTrapEditor.h:64
 TGeoTrapEditor.h:65
 TGeoTrapEditor.h:66
 TGeoTrapEditor.h:67
 TGeoTrapEditor.h:68
 TGeoTrapEditor.h:69
 TGeoTrapEditor.h:70
 TGeoTrapEditor.h:71
 TGeoTrapEditor.h:72
 TGeoTrapEditor.h:73
 TGeoTrapEditor.h:74
 TGeoTrapEditor.h:75
 TGeoTrapEditor.h:76
 TGeoTrapEditor.h:77
 TGeoTrapEditor.h:78
 TGeoTrapEditor.h:79
 TGeoTrapEditor.h:80
 TGeoTrapEditor.h:81
 TGeoTrapEditor.h:82
 TGeoTrapEditor.h:83
 TGeoTrapEditor.h:84
 TGeoTrapEditor.h:85
 TGeoTrapEditor.h:86
 TGeoTrapEditor.h:87
 TGeoTrapEditor.h:88
 TGeoTrapEditor.h:89
 TGeoTrapEditor.h:90
 TGeoTrapEditor.h:91
 TGeoTrapEditor.h:92
 TGeoTrapEditor.h:93
 TGeoTrapEditor.h:94
 TGeoTrapEditor.h:95
 TGeoTrapEditor.h:96
 TGeoTrapEditor.h:97
 TGeoTrapEditor.h:98
 TGeoTrapEditor.h:99
 TGeoTrapEditor.h:100
 TGeoTrapEditor.h:101
 TGeoTrapEditor.h:102
 TGeoTrapEditor.h:103
 TGeoTrapEditor.h:104
 TGeoTrapEditor.h:105
 TGeoTrapEditor.h:106
 TGeoTrapEditor.h:107
 TGeoTrapEditor.h:108
 TGeoTrapEditor.h:109
 TGeoTrapEditor.h:110
 TGeoTrapEditor.h:111
 TGeoTrapEditor.h:112
 TGeoTrapEditor.h:113
 TGeoTrapEditor.h:114
 TGeoTrapEditor.h:115
 TGeoTrapEditor.h:116
 TGeoTrapEditor.h:117
 TGeoTrapEditor.h:118
 TGeoTrapEditor.h:119
 TGeoTrapEditor.h:120
 TGeoTrapEditor.h:121
 TGeoTrapEditor.h:122