// @(#):$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_TGeoVolumeEditor
#define ROOT_TGeoVolumeEditor

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoVolumeEditor                                                    //
//                                                                      //
//  Editor for a TGeoVolume.                                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

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

class TGeoManager;
class TGeoVolume;
class TGeoShape;
class TGeoMedium;
class TGeoMaterial;
class TGeoMatrix;
class TGTextEntry;
class TGNumberEntry;
class TGTab;
class TGComboBox;
class TGTextButton;
class TGPictureButton;
class TGCheckButton;
class TGRadioButton;
class TGShutter;
class TGShutterItem;
class TGeoTabManager;

class TGeoVolumeEditor : public TGeoGedFrame {

protected:

   TGeoManager         *fGeometry;          // Selected geometry manager
   TGeoVolume          *fVolume;            // Volume object
   Bool_t               fIsModified;        // Flag that volume was modified
   Bool_t               fIsAssembly;        // Flag that the volume is an assembly
   Bool_t               fIsDivided;         // Flag that the volume is divided
   TGShutter           *fCategories;        // Categories shutter
   TGTextEntry         *fVolumeName;        // Volume name text entry
//   TGComboBox          *fShapeList;         // All-shapes combo box
   TGeoShape           *fSelectedShape;     // Selected shape
   TGLabel             *fLSelShape;         // Selected shape label
   TGPictureButton     *fBSelShape;         // Button for selecting a shape
//   TGComboBox          *fMediaList;         // All-media combo box
   TGeoMedium          *fSelectedMedium;    // Selected medium
   TGLabel             *fLSelMedium;        // Selected medium label
   TGPictureButton     *fBSelMedium;      // Button for selecting a medium
//   TGComboBox          *fVolumeList;        // All-volume combo box
   TGeoVolume          *fSelectedVolume;    // Selected volume
   TGLabel             *fLSelVolume;        // Selected volume label
   TGPictureButton     *fBSelVolume;        // Button for selecting a volume
//   TGComboBox          *fMatrixList;        // All-matrix combo box
   TGeoMatrix          *fSelectedMatrix;    // Selected matrix
   TGLabel             *fLSelMatrix;        // Selected matrix label
   TGPictureButton     *fBSelMatrix;        // Button for selecting a matrix
   TGNumberEntry       *fCopyNumber;        // Node copy number
   TGTextButton        *fAddNode;           // Button for adding a node
   TGTextButton        *fEditShape;         // Check button for shape editing
   TGTextButton        *fEditMedium;        // Check button for medium editing
   TGComboBox          *fNodeList;          // Daughters combo box
   TGTextButton        *fEditMatrix;        // Button for editing the position of a daughter
   TGTextButton        *fRemoveNode;        // Button for removing a daughter
   TGCheckButton       *fBVis[2];           // Buttons for setting vis. on/off
   TGRadioButton       *fBView[3];          // Radio for selecting view options
   TGCheckButton       *fBRaytrace;         // Raytracing on/off
   TGCheckButton       *fBAuto;             // Check button for auto vis level
   TGNumberEntry       *fEVisLevel;         // Number entry for visibility level
   TGTextButton        *fApplyDiv;          // Button for applying division settings
   TGTextEntry         *fDivName;           // Division volume name text entry
   TGRadioButton       *fBDiv[3];           // Radio for selecting division type
   TGNumberEntry       *fEDivFrom;          // Number entry for division start
   TGNumberEntry       *fEDivStep;          // Number entry for division step
   TGNumberEntry       *fEDivN;             // Number entry for division Nslices

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

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

   void           DoAddNode();
   void           DoVolumeName();
   void           DoSelectShape();
   void           DoSelectMedium();
   void           DoSelectMatrix();
   void           DoSelectVolume();
   void           DoEditShape();
   void           DoEditMedium();
   void           DoEditMatrix();
   void           DoRemoveNode();
   void           DoVisVolume();
   void           DoVisDaughters();
   void           DoVisAuto();
   void           DoVisLevel();
   void           DoViewAll();
   void           DoViewLeaves();
   void           DoViewOnly();
   void           DoDivSelAxis();
   void           DoDivFromTo();
   void           DoDivStep();
   void           DoDivN();
   void           DoDivName();
   void           DoApplyDiv();
   void           DoRaytrace();
   
   ClassDef(TGeoVolumeEditor,0)   // TGeoVolume editor
};   
  
#endif                    
 TGeoVolumeEditor.h:1
 TGeoVolumeEditor.h:2
 TGeoVolumeEditor.h:3
 TGeoVolumeEditor.h:4
 TGeoVolumeEditor.h:5
 TGeoVolumeEditor.h:6
 TGeoVolumeEditor.h:7
 TGeoVolumeEditor.h:8
 TGeoVolumeEditor.h:9
 TGeoVolumeEditor.h:10
 TGeoVolumeEditor.h:11
 TGeoVolumeEditor.h:12
 TGeoVolumeEditor.h:13
 TGeoVolumeEditor.h:14
 TGeoVolumeEditor.h:15
 TGeoVolumeEditor.h:16
 TGeoVolumeEditor.h:17
 TGeoVolumeEditor.h:18
 TGeoVolumeEditor.h:19
 TGeoVolumeEditor.h:20
 TGeoVolumeEditor.h:21
 TGeoVolumeEditor.h:22
 TGeoVolumeEditor.h:23
 TGeoVolumeEditor.h:24
 TGeoVolumeEditor.h:25
 TGeoVolumeEditor.h:26
 TGeoVolumeEditor.h:27
 TGeoVolumeEditor.h:28
 TGeoVolumeEditor.h:29
 TGeoVolumeEditor.h:30
 TGeoVolumeEditor.h:31
 TGeoVolumeEditor.h:32
 TGeoVolumeEditor.h:33
 TGeoVolumeEditor.h:34
 TGeoVolumeEditor.h:35
 TGeoVolumeEditor.h:36
 TGeoVolumeEditor.h:37
 TGeoVolumeEditor.h:38
 TGeoVolumeEditor.h:39
 TGeoVolumeEditor.h:40
 TGeoVolumeEditor.h:41
 TGeoVolumeEditor.h:42
 TGeoVolumeEditor.h:43
 TGeoVolumeEditor.h:44
 TGeoVolumeEditor.h:45
 TGeoVolumeEditor.h:46
 TGeoVolumeEditor.h:47
 TGeoVolumeEditor.h:48
 TGeoVolumeEditor.h:49
 TGeoVolumeEditor.h:50
 TGeoVolumeEditor.h:51
 TGeoVolumeEditor.h:52
 TGeoVolumeEditor.h:53
 TGeoVolumeEditor.h:54
 TGeoVolumeEditor.h:55
 TGeoVolumeEditor.h:56
 TGeoVolumeEditor.h:57
 TGeoVolumeEditor.h:58
 TGeoVolumeEditor.h:59
 TGeoVolumeEditor.h:60
 TGeoVolumeEditor.h:61
 TGeoVolumeEditor.h:62
 TGeoVolumeEditor.h:63
 TGeoVolumeEditor.h:64
 TGeoVolumeEditor.h:65
 TGeoVolumeEditor.h:66
 TGeoVolumeEditor.h:67
 TGeoVolumeEditor.h:68
 TGeoVolumeEditor.h:69
 TGeoVolumeEditor.h:70
 TGeoVolumeEditor.h:71
 TGeoVolumeEditor.h:72
 TGeoVolumeEditor.h:73
 TGeoVolumeEditor.h:74
 TGeoVolumeEditor.h:75
 TGeoVolumeEditor.h:76
 TGeoVolumeEditor.h:77
 TGeoVolumeEditor.h:78
 TGeoVolumeEditor.h:79
 TGeoVolumeEditor.h:80
 TGeoVolumeEditor.h:81
 TGeoVolumeEditor.h:82
 TGeoVolumeEditor.h:83
 TGeoVolumeEditor.h:84
 TGeoVolumeEditor.h:85
 TGeoVolumeEditor.h:86
 TGeoVolumeEditor.h:87
 TGeoVolumeEditor.h:88
 TGeoVolumeEditor.h:89
 TGeoVolumeEditor.h:90
 TGeoVolumeEditor.h:91
 TGeoVolumeEditor.h:92
 TGeoVolumeEditor.h:93
 TGeoVolumeEditor.h:94
 TGeoVolumeEditor.h:95
 TGeoVolumeEditor.h:96
 TGeoVolumeEditor.h:97
 TGeoVolumeEditor.h:98
 TGeoVolumeEditor.h:99
 TGeoVolumeEditor.h:100
 TGeoVolumeEditor.h:101
 TGeoVolumeEditor.h:102
 TGeoVolumeEditor.h:103
 TGeoVolumeEditor.h:104
 TGeoVolumeEditor.h:105
 TGeoVolumeEditor.h:106
 TGeoVolumeEditor.h:107
 TGeoVolumeEditor.h:108
 TGeoVolumeEditor.h:109
 TGeoVolumeEditor.h:110
 TGeoVolumeEditor.h:111
 TGeoVolumeEditor.h:112
 TGeoVolumeEditor.h:113
 TGeoVolumeEditor.h:114
 TGeoVolumeEditor.h:115
 TGeoVolumeEditor.h:116
 TGeoVolumeEditor.h:117
 TGeoVolumeEditor.h:118
 TGeoVolumeEditor.h:119
 TGeoVolumeEditor.h:120
 TGeoVolumeEditor.h:121
 TGeoVolumeEditor.h:122
 TGeoVolumeEditor.h:123
 TGeoVolumeEditor.h:124
 TGeoVolumeEditor.h:125
 TGeoVolumeEditor.h:126
 TGeoVolumeEditor.h:127
 TGeoVolumeEditor.h:128
 TGeoVolumeEditor.h:129
 TGeoVolumeEditor.h:130
 TGeoVolumeEditor.h:131
 TGeoVolumeEditor.h:132
 TGeoVolumeEditor.h:133