ROOT logo
#include <cstring>

#include "TGedEditor.h"
#include "TGNumberEntry.h"
#include "TGButtonGroup.h"
#include "TGColorSelect.h"
#include "TVirtualGL.h"
#include "TG3DLine.h"
#include "TGButton.h"
#include "TColor.h"
#include "TString.h"
#include "TGLabel.h"
#include "TClass.h"
#include "TGTab.h"
#include "TGComboBox.h"

#include "TGLViewerEditor.h"
#include "TGLViewer.h"
#include "TGLLightSetEditor.h"
#include "TGLClipSetEditor.h"
#include "TGLUtil.h"
#include "TGLCameraOverlay.h"

//______________________________________________________________________________
//
// GUI editor for TGLViewer.

ClassImp(TGLViewerEditor);

//______________________________________________________________________________
TGLViewerEditor::TGLViewerEditor(const TGWindow *p,  Int_t width, Int_t height, UInt_t options, Pixel_t back) :
   TGedFrame(p,  width, height, options | kVerticalFrame, back),
   fGuidesFrame(0),
   fClipFrame(0),
   fClearColor(0),
   fIgnoreSizesOnUpdate(0),
   fResetCamerasOnUpdate(0),
   fUpdateScene(0),
   fCameraHome(0),
   fMaxSceneDrawTimeHQ(0),
   fMaxSceneDrawTimeLQ(0),
   fPointSizeScale(0),  fLineWidthScale(0),
   fPointSmooth(0),     fLineSmooth(0),
   fWFLineWidth(0),     fOLLineWidth(0),

   fCameraCenterExt(0),
   fCaptureCenter(0),
   fCameraCenterX(0),
   fCameraCenterY(0),
   fCameraCenterZ(0),
   fCaptureAnnotate(),
   fAxesType(0),
   fAxesContainer(0),
   fAxesNone(0),
   fAxesEdge(0),
   fAxesOrigin(0),
   fAxesDepthTest(0),
   fRefContainer(0),
   fReferenceOn(0),
   fReferencePosX(0),
   fReferencePosY(0),
   fReferencePosZ(0),
   fCamContainer(0),
   fCamMode(0),
   fCamOverlayOn(0),
   fClipSet(0),
   fStereoZeroParallax(0),
   fStereoEyeOffsetFac(0),
   fStereoFrustumAsymFac(0),
   fViewer(0),
   fIsInPad(kTRUE)
{
  //  Constructor.

   CreateStyleTab();
   CreateGuidesTab();
   CreateClippingTab();
   CreateStereoTab();
}

//______________________________________________________________________________

TGLViewerEditor::~TGLViewerEditor()
{
   // Destructor.

}

//______________________________________________________________________________
void TGLViewerEditor::ConnectSignals2Slots()
{
   // Connect signals to slots.

   fClearColor->Connect("ColorSelected(Pixel_t)", "TGLViewerEditor", this, "DoClearColor(Pixel_t)");
   fIgnoreSizesOnUpdate->Connect("Toggled(Bool_t)", "TGLViewerEditor", this, "DoIgnoreSizesOnUpdate()");
   fResetCamerasOnUpdate->Connect("Toggled(Bool_t)", "TGLViewerEditor", this, "DoResetCamerasOnUpdate()");
   fUpdateScene->Connect("Pressed()", "TGLViewerEditor", this, "DoUpdateScene()");
   fCameraHome->Connect("Pressed()", "TGLViewerEditor", this, "DoCameraHome()");
   fMaxSceneDrawTimeHQ->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateMaxDrawTimes()");
   fMaxSceneDrawTimeLQ->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateMaxDrawTimes()");
   fPointSizeScale->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdatePointLineStuff()");
   fLineWidthScale->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdatePointLineStuff()");
   fPointSmooth->Connect("Clicked()", "TGLViewerEditor", this, "UpdatePointLineStuff()");
   fLineSmooth ->Connect("Clicked()", "TGLViewerEditor", this, "UpdatePointLineStuff()");
   fWFLineWidth->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdatePointLineStuff()");
   fOLLineWidth->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdatePointLineStuff()");

   fCameraCenterExt->Connect("Clicked()", "TGLViewerEditor", this, "DoCameraCenterExt()");
   fCaptureCenter->Connect("Clicked()", "TGLViewerEditor", this, "DoCaptureCenter()");
   fDrawCameraCenter->Connect("Clicked()", "TGLViewerEditor", this, "DoDrawCameraCenter()");
   fCameraCenterX->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateCameraCenter()");
   fCameraCenterY->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateCameraCenter()");
   fCameraCenterZ->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateCameraCenter()");

   fCaptureAnnotate->Connect("Clicked()", "TGLViewerEditor", this, "DoAnnotation()");

   fAxesContainer->Connect("Clicked(Int_t)", "TGLViewerEditor", this, "UpdateViewerAxes(Int_t)");

   fReferenceOn->Connect("Clicked()", "TGLViewerEditor", this, "UpdateViewerReference()");
   fReferencePosX->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateViewerReference()");
   fReferencePosY->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateViewerReference()");
   fReferencePosZ->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateViewerReference()");

   fCamMode->Connect("Selected(Int_t)", "TGLViewerEditor", this, "DoCameraOverlay()");
   fCamOverlayOn->Connect("Clicked()", "TGLViewerEditor", this, "DoCameraOverlay()");

   fStereoZeroParallax  ->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateStereo()");
   fStereoEyeOffsetFac  ->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateStereo()");
   fStereoFrustumAsymFac->Connect("ValueSet(Long_t)", "TGLViewerEditor", this, "UpdateStereo()");
   fStereoZeroParallax  ->Connect("ValueChanged(Long_t)", "TGLViewerEditor", this, "UpdateStereo()");
   fStereoEyeOffsetFac  ->Connect("ValueChanged(Long_t)", "TGLViewerEditor", this, "UpdateStereo()");
   fStereoFrustumAsymFac->Connect("ValueChanged(Long_t)", "TGLViewerEditor", this, "UpdateStereo()");

   fInit = kFALSE;
}

//______________________________________________________________________________
void TGLViewerEditor::ViewerRedraw()
{
   // Initiate redraw of the viewer.

   if (gGLManager && fIsInPad)
      gGLManager->MarkForDirectCopy(fViewer->GetDev(), kTRUE);
   fViewer->RequestDraw();
}

//______________________________________________________________________________
void TGLViewerEditor::SetModel(TObject* obj)
{
   // Sets model or disables/hides viewer.

   fViewer = 0;

   fViewer = static_cast<TGLViewer *>(obj);
   fIsInPad = (fViewer->GetDev() != -1);

   SetGuides();

   if (fInit)
      ConnectSignals2Slots();

   fLightSet->SetModel(fViewer->GetLightSet());
   fClipSet->SetModel(fViewer->GetClipSet());

   // style tab
   fClearColor->SetColor(TColor::Number2Pixel(fViewer->RnrCtx().ColorSet().Background().GetColorIndex()), kFALSE);
   fClearColor->Enable(!fViewer->IsUsingDefaultColorSet());
   fIgnoreSizesOnUpdate->SetState(fViewer->GetIgnoreSizesOnUpdate() ? kButtonDown : kButtonUp);
   fResetCamerasOnUpdate->SetState(fViewer->GetResetCamerasOnUpdate() ? kButtonDown : kButtonUp);
   fMaxSceneDrawTimeHQ->SetNumber(fViewer->GetMaxSceneDrawTimeHQ());
   fMaxSceneDrawTimeLQ->SetNumber(fViewer->GetMaxSceneDrawTimeLQ());
   fPointSizeScale->SetNumber(fViewer->GetPointScale());
   fLineWidthScale->SetNumber(fViewer->GetLineScale ());
   fPointSmooth->SetState(fViewer->GetSmoothPoints() ? kButtonDown : kButtonUp);
   fLineSmooth ->SetState(fViewer->GetSmoothLines () ? kButtonDown : kButtonUp);
   fWFLineWidth->SetNumber(fViewer->WFLineW());
   fOLLineWidth->SetNumber(fViewer->OLLineW());
   //camera look at
   TGLCamera & cam = fViewer->CurrentCamera();
   fCameraCenterExt->SetDown(cam.GetExternalCenter());
   fDrawCameraCenter->SetDown(fViewer->GetDrawCameraCenter());
   Double_t* la = cam.GetCenterVec();
   fCameraCenterX->SetNumber(la[0]);
   fCameraCenterY->SetNumber(la[1]);
   fCameraCenterZ->SetNumber(la[2]);
   fCameraCenterX->SetState(fCameraCenterExt->IsDown());
   fCameraCenterY->SetState(fCameraCenterExt->IsDown());
   fCameraCenterZ->SetState(fCameraCenterExt->IsDown());

   // push action
   fCaptureCenter->SetTextColor((fViewer->GetPushAction() == TGLViewer::kPushCamCenter) ? 0xa03060 : 0x000000);
   fCaptureAnnotate->SetDown( (fViewer->GetPushAction() == TGLViewer::kPushAnnotate), kFALSE);

   if (fViewer->GetStereo())
   {
      fStereoZeroParallax  ->SetNumber(fViewer->GetStereoZeroParallax());
      fStereoEyeOffsetFac  ->SetNumber(fViewer->GetStereoEyeOffsetFac());
      fStereoFrustumAsymFac->SetNumber(fViewer->GetStereoFrustumAsymFac());
      fStereoFrame->MapWindow();
   }
   else
   {
      fStereoFrame->UnmapWindow();
   }
}

//______________________________________________________________________________
void TGLViewerEditor::DoClearColor(Pixel_t color)
{
   // Clear-color was changed.

   fViewer->RnrCtx().ColorSet().Background().SetColor(Color_t(TColor::GetColor(color)));
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::DoIgnoreSizesOnUpdate()
{
   // ResetCamerasOnUpdate was toggled.

   fViewer->SetIgnoreSizesOnUpdate(fIgnoreSizesOnUpdate->IsOn());
   if (fIgnoreSizesOnUpdate->IsOn())
      fViewer->UpdateScene();
}

//______________________________________________________________________________
void TGLViewerEditor::DoResetCamerasOnUpdate()
{
   // ResetCamerasOnUpdate was toggled.

   fViewer->SetResetCamerasOnUpdate(fResetCamerasOnUpdate->IsOn());
}

//______________________________________________________________________________
void TGLViewerEditor::DoUpdateScene()
{
   // UpdateScene was clicked.

   fViewer->UpdateScene();
}

//______________________________________________________________________________
void TGLViewerEditor::DoCameraHome()
{
   // CameraHome was clicked.

   fViewer->ResetCurrentCamera();
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::UpdateMaxDrawTimes()
{
   // Slot for fMaxSceneDrawTimeHQ and fMaxSceneDrawTimeLQ.

   fViewer->SetMaxSceneDrawTimeHQ(fMaxSceneDrawTimeHQ->GetNumber());
   fViewer->SetMaxSceneDrawTimeLQ(fMaxSceneDrawTimeLQ->GetNumber());
}

//______________________________________________________________________________
void TGLViewerEditor::UpdatePointLineStuff()
{
   // Slot for point-sizes and line-widths.

   fViewer->SetPointScale(fPointSizeScale->GetNumber());
   fViewer->SetLineScale (fLineWidthScale->GetNumber());
   fViewer->SetSmoothPoints(fPointSmooth->IsDown());
   fViewer->SetSmoothLines (fLineSmooth->IsDown());
   fViewer->SetWFLineW(fWFLineWidth->GetNumber());
   fViewer->SetOLLineW(fOLLineWidth->GetNumber());
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::DoCameraOverlay()
{
   // Update viewer with GUI state.

   TGLCameraOverlay* co = fViewer->GetCameraOverlay();

   if (fViewer->CurrentCamera().IsPerspective())
   {
      co->SetShowPerspective(fCamOverlayOn->IsDown());
      co->SetPerspectiveMode((TGLCameraOverlay::EMode)fCamMode->GetSelected());
   }
   else
   {
      co->SetShowOrthographic(fCamOverlayOn->IsDown());
      co->SetOrthographicMode((TGLCameraOverlay::EMode)fCamMode->GetSelected());
   }
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::DoCameraCenterExt()
{
   // Set external camera center.

   TGLCamera& cam = fViewer->CurrentCamera();
   cam.SetExternalCenter(fCameraCenterExt->GetState());

   fCameraCenterX->SetState(fCameraCenterExt->IsDown());
   fCameraCenterY->SetState(fCameraCenterExt->IsDown());
   fCameraCenterZ->SetState(fCameraCenterExt->IsDown());

   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::DoCaptureCenter()
{
   // Capture camera-center via picking.

   fViewer->PickCameraCenter();
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::DoDrawCameraCenter()
{
   // Draw camera center.

   fViewer->SetDrawCameraCenter(fDrawCameraCenter->IsDown());
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::UpdateCameraCenter()
{
   // Update current camera with GUI state.

   TGLCamera& cam = fViewer->CurrentCamera();
   cam.SetCenterVec(fCameraCenterX->GetNumber(), fCameraCenterY->GetNumber(), fCameraCenterZ->GetNumber());
   ViewerRedraw();
}

//______________________________________________________________________________
void TGLViewerEditor::DoAnnotation()
{
   // Create annotation via picking.

   fViewer->PickAnnotate();
}

//______________________________________________________________________________
void TGLViewerEditor::UpdateViewerAxes(Int_t id)
{
   // Update viewer with GUI state.

   if(id < 4)
   {
      fAxesType = id -1;
      for (Int_t i = 1; i < 4; i++) {
         TGButton * button = fAxesContainer->GetButton(i);
         if (i == id)
            button->SetDown(kTRUE);
         else
            button->SetDown(kFALSE);
      }
   }
   Bool_t axdt = fAxesContainer->GetButton(4)->IsDown();
   const Double_t refPos[] = {fReferencePosX->GetNumber(), fReferencePosY->GetNumber(), fReferencePosZ->GetNumber()};
   fViewer->SetGuideState(fAxesType, axdt, fReferenceOn->IsDown(), refPos);
   UpdateReferencePosState();
}

//______________________________________________________________________________
void TGLViewerEditor::UpdateViewerReference()
{
   // Update viewer with GUI state.

   const Double_t refPos[] = {fReferencePosX->GetNumber(), fReferencePosY->GetNumber(), fReferencePosZ->GetNumber()};
   fViewer->SetGuideState(fAxesType,  fAxesContainer->GetButton(4)->IsDown(), fReferenceOn->IsDown(), refPos);
   UpdateReferencePosState();
}

//______________________________________________________________________________
TGNumberEntry* TGLViewerEditor::MakeLabeledNEntry(TGCompositeFrame* p, const char* name,
                                                  Int_t labelw,Int_t nd, Int_t style)
{
   // Helper function to create fixed width TGLabel and TGNumberEntry in same row.

   TGHorizontalFrame *rfr   = new TGHorizontalFrame(p);
   TGHorizontalFrame *labfr = new TGHorizontalFrame(rfr, labelw, 20, kFixedSize);
   TGLabel           *lab   = new TGLabel(labfr, name);
   labfr->AddFrame(lab, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 0, 0, 0) );
   rfr->AddFrame(labfr, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 0, 0, 0));

   TGNumberEntry* ne = new TGNumberEntry(rfr, 0.0f, nd, -1, (TGNumberFormat::EStyle)style);
   rfr->AddFrame(ne, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsBottom, 2, 0, 0));

   p->AddFrame(rfr, new TGLayoutHints(kLHintsLeft, 0, 0, 1, 0));
   return ne;
}

//______________________________________________________________________________
void TGLViewerEditor::CreateStyleTab()
{
   // Creates "Style" tab.

   MakeTitle("Update behaviour");
   fIgnoreSizesOnUpdate  = new TGCheckButton(this, "Ignore sizes");
   fIgnoreSizesOnUpdate->SetToolTipText("Ignore bounding-box sizes on scene update");
   AddFrame(fIgnoreSizesOnUpdate, new TGLayoutHints(kLHintsLeft, 4, 1, 1, 1));
   fResetCamerasOnUpdate = new TGCheckButton(this, "Reset on update");
   fResetCamerasOnUpdate->SetToolTipText("Reset camera on scene update");
   AddFrame(fResetCamerasOnUpdate, new TGLayoutHints(kLHintsLeft, 4, 1, 1, 1));

   TGCompositeFrame* af = this;
   fUpdateScene = new TGTextButton(af, "Update Scene", 130);
   af->AddFrame(fUpdateScene, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 8, 1));
   fCameraHome = new TGTextButton(af, "Camera Home", 130);
   af->AddFrame(fCameraHome, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 1, 1, 1, 3));
   fMaxSceneDrawTimeHQ = MakeLabeledNEntry(af, "Max HQ draw time:", 120, 6, TGNumberFormat::kNESInteger);
   fMaxSceneDrawTimeHQ->SetLimits(TGNumberFormat::kNELLimitMin, 0, 1e6);
   fMaxSceneDrawTimeHQ->GetNumberEntry()->SetToolTipText("Maximum time spent in scene drawing\nin high-quality mode [ms].");
   fMaxSceneDrawTimeLQ = MakeLabeledNEntry(af, "Max LQ draw time:", 120, 6, TGNumberFormat::kNESInteger);
   fMaxSceneDrawTimeLQ->SetLimits(TGNumberFormat::kNELLimitMin, 0, 1e6);
   fMaxSceneDrawTimeLQ->GetNumberEntry()->SetToolTipText("Maximum time spent in scene drawing\nin low-quality mode (during rotation etc).");

   TGHorizontalFrame* hf = new TGHorizontalFrame(this);
   TGLabel* lab = new TGLabel(hf, "Clear Color");
   hf->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 4, 8, 3));
   fClearColor = new TGColorSelect(hf, 0, -1);
   hf->AddFrame(fClearColor, new TGLayoutHints(kLHintsLeft, 1, 1, 8, 1));
   AddFrame(hf, new TGLayoutHints(kLHintsLeft, 2, 1, 1, 1));

   // LightSet
   fLightSet = new TGLLightSetSubEditor(this);
   fLightSet->Connect("Changed()", "TGLViewerEditor", this, "ViewerRedraw()");
   AddFrame(fLightSet, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));

   // Point-sizes / line-widths.
   hf = new TGHorizontalFrame(af);
   fPointSizeScale = MakeLabeledNEntry(hf, "Point-size scale:", 116, 4, TGNumberFormat::kNESRealOne);
   fPointSizeScale->SetLimits(TGNumberFormat::kNELLimitMinMax, 0.1, 16);
   fPointSmooth = new TGCheckButton(hf);
   fPointSmooth->SetToolTipText("Use smooth points.");
   hf->AddFrame(fPointSmooth, new TGLayoutHints(kLHintsNormal, 3, 0, 3, 0));
   af->AddFrame(hf);
   hf = new TGHorizontalFrame(af);
   fLineWidthScale = MakeLabeledNEntry(hf, "Line-width scale:", 116, 4, TGNumberFormat::kNESRealOne);
   fLineWidthScale->SetLimits(TGNumberFormat::kNELLimitMinMax, 0.1, 16);
   fLineSmooth = new TGCheckButton(hf);
   fLineSmooth->SetToolTipText("Use smooth lines.");
   hf->AddFrame(fLineSmooth, new TGLayoutHints(kLHintsNormal, 3, 0, 3, 0));
   af->AddFrame(hf);
   fWFLineWidth = MakeLabeledNEntry(af, "Wireframe line-width:", 116, 4, TGNumberFormat::kNESRealOne);
   fWFLineWidth->SetLimits(TGNumberFormat::kNELLimitMinMax, 0.1, 16);
   fOLLineWidth = MakeLabeledNEntry(af, "Outline line-width:", 116, 4, TGNumberFormat::kNESRealOne);
   fOLLineWidth->SetLimits(TGNumberFormat::kNELLimitMinMax, 0.1, 16);
}

//______________________________________________________________________________
void TGLViewerEditor::CreateGuidesTab()
{
   // Create "Guides" tab.
   fGuidesFrame = CreateEditorTabSubFrame("Guides");

   // external camera look at point
   TGGroupFrame* grf = new TGGroupFrame(fGuidesFrame, "Camera center:", kVerticalFrame);
   fDrawCameraCenter = new TGCheckButton(grf, "Show", 50);
   grf->AddFrame(fDrawCameraCenter, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 1));
   fCameraCenterExt = new TGCheckButton(grf, "External", 50);
   grf->AddFrame(fCameraCenterExt, new TGLayoutHints(kLHintsLeft, 0, 0, 1, 0));
   fGuidesFrame->AddFrame(grf, new TGLayoutHints(kLHintsTop| kLHintsLeft | kLHintsExpandX, 2, 3, 3, 0));
   Int_t labw = 20;
   fCameraCenterX = MakeLabeledNEntry(grf, "X:", labw, 8, TGNumberFormat::kNESRealThree);
   fCameraCenterY = MakeLabeledNEntry(grf, "Y:", labw, 8, TGNumberFormat::kNESRealThree);
   fCameraCenterZ = MakeLabeledNEntry(grf, "Z:", labw, 8, TGNumberFormat::kNESRealThree);
   fCaptureCenter = new TGTextButton(grf, " Pick center ");
   grf->AddFrame(fCaptureCenter, new TGLayoutHints(kLHintsNormal, labw + 2, 0, 2, 0));

   // annotate
   TGGroupFrame* annf  = new TGGroupFrame(fGuidesFrame, "Annotation");
   fGuidesFrame->AddFrame(annf, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 3, 0, 0));
   fCaptureAnnotate = new TGCheckButton(annf, "Pick annotation");
   annf->AddFrame(fCaptureAnnotate, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX));

   // reference container
   fRefContainer = new TGGroupFrame(fGuidesFrame, "Reference marker");
   fGuidesFrame->AddFrame(fRefContainer, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 3, 0, 0));
   fReferenceOn = new TGCheckButton(fRefContainer, "Show");
   fRefContainer->AddFrame(fReferenceOn, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX));
   fReferencePosX = MakeLabeledNEntry(fRefContainer, "X:", labw, 8, TGNumberFormat::kNESRealThree );
   fReferencePosY = MakeLabeledNEntry(fRefContainer, "Y:", labw, 8, TGNumberFormat::kNESRealThree );
   fReferencePosZ = MakeLabeledNEntry(fRefContainer, "Z:", labw, 8, TGNumberFormat::kNESRealThree );

   // axes
   fAxesContainer = new TGButtonGroup(fGuidesFrame, "Axes");
   fAxesNone = new TGRadioButton(fAxesContainer, "None", 1);
   fAxesEdge = new TGRadioButton(fAxesContainer, "Edge", 2);
   fAxesOrigin = new TGRadioButton(fAxesContainer, "Origin", 3);
   fAxesDepthTest = new TGCheckButton(fAxesContainer, "DepthTest",4);
   fGuidesFrame->AddFrame(fAxesContainer, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 3, 0, 0));

   // camera overlay
   fCamContainer = new TGGroupFrame(fGuidesFrame, "Camera overlay");
   fGuidesFrame->AddFrame(fCamContainer, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 3, 0, 0));
   fCamOverlayOn = new TGCheckButton(fCamContainer, "Show");
   fCamContainer->AddFrame(fCamOverlayOn, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX));
   TGHorizontalFrame* chf = new TGHorizontalFrame(fCamContainer);
   TGLabel* lab = new TGLabel(chf, "Mode");
   chf->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 4, 1, 2));
   fCamMode = new TGComboBox(chf);
   fCamMode->AddEntry("Plane", TGLCameraOverlay::kPlaneIntersect);
   fCamMode->AddEntry("Bar", TGLCameraOverlay::kBar);
   fCamMode->AddEntry("Axis", TGLCameraOverlay::kAxis);
   fCamMode->AddEntry("Grid Front", TGLCameraOverlay::kGridFront);
   fCamMode->AddEntry("Grid Back", TGLCameraOverlay::kGridBack);
   TGListBox* lb = fCamMode->GetListBox();
   lb->Resize(lb->GetWidth(), 5*18);
   fCamMode->Resize(90, 20);
   chf->AddFrame(fCamMode, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
   fCamContainer->AddFrame(chf);
}

//______________________________________________________________________________
void TGLViewerEditor::CreateClippingTab()
{
   // Create GUI controls - clip type (none/plane/box) and plane/box properties.

   fClipFrame = CreateEditorTabSubFrame("Clipping");

   fClipSet = new TGLClipSetSubEditor(fClipFrame);
   fClipSet->Connect("Changed()", "TGLViewerEditor", this, "ViewerRedraw()");
   fClipFrame->AddFrame(fClipSet, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));
}

//______________________________________________________________________________
void TGLViewerEditor::CreateStereoTab()
{
   // Create GUI controls - clip type (none/plane/box) and plane/box properties.

   fStereoFrame = CreateEditorTabSubFrame("Stereo");

   Int_t labw = 80;
   TGCompositeFrame *p = fStereoFrame;

   fStereoZeroParallax = MakeLabeledNEntry(p, "Zero parallax:", labw, 5, TGNumberFormat::kNESRealThree);
   fStereoZeroParallax->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 1);

   fStereoEyeOffsetFac = MakeLabeledNEntry(p, "Eye offset:", labw, 5, TGNumberFormat::kNESRealTwo);
   fStereoEyeOffsetFac->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 2);

   fStereoFrustumAsymFac = MakeLabeledNEntry(p, "Asymetry:", labw, 5, TGNumberFormat::kNESRealTwo);
   fStereoFrustumAsymFac->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 2);
}


//______________________________________________________________________________
void TGLViewerEditor::UpdateReferencePosState()
{
   // Enable/disable reference position (x/y/z) number edits based on
   // reference check box.

   fReferencePosX->SetState(fReferenceOn->IsDown());
   fReferencePosY->SetState(fReferenceOn->IsDown());
   fReferencePosZ->SetState(fReferenceOn->IsDown());
}

//______________________________________________________________________________
void TGLViewerEditor::SetGuides()
{
   // Configuration of guides GUI called from SetModel().

   Bool_t axesDepthTest = kFALSE;
   Bool_t referenceOn = kFALSE;
   Double_t referencePos[3] = {0.};
   fViewer->GetGuideState(fAxesType, axesDepthTest, referenceOn, referencePos);

   for (Int_t i = 1; i < 4; i++) {
      TGButton * btn = fAxesContainer->GetButton(i);
      if (fAxesType+1 == i)
         btn->SetDown(kTRUE);
      else
         btn->SetDown(kFALSE);
   }
   fAxesContainer->GetButton(4)->SetOn(axesDepthTest, kFALSE);

   fReferenceOn->SetDown(referenceOn);
   fReferencePosX->SetNumber(referencePos[0]);
   fReferencePosY->SetNumber(referencePos[1]);
   fReferencePosZ->SetNumber(referencePos[2]);
   UpdateReferencePosState();

   // overlay
   TGLCameraOverlay*  co = fViewer->GetCameraOverlay();
   TGCompositeFrame *fr = (TGCompositeFrame*)((TGFrameElement*) fCamContainer->GetList()->Last() )->fFrame;

   if (fViewer->CurrentCamera().IsOrthographic())
   {
      fCamOverlayOn->SetDown(co->GetShowOrthographic());
      fr->ShowFrame(fCamMode);


      if (! fr->IsMapped()) {
         fr->MapSubwindows();
         fr->MapWindow();
         fCamContainer->MapWindow();
         fCamContainer->MapWindow();
         fCamMode->Select(co->GetOrthographicMode(), kFALSE);
      }
   }
   else
   {
      fCamOverlayOn->SetDown(co->GetShowPerspective());

      // only mode implemented for perspective camera
      fCamMode->Select(co->GetPerspectiveMode(), kFALSE);
      fr->HideFrame(fCamMode);
      if (fr->IsMapped())
         fr->UnmapWindow();
   }
}

//______________________________________________________________________________
void TGLViewerEditor::UpdateStereo()
{
   // Update stereo related variables.

   fViewer->SetStereoZeroParallax  (fStereoZeroParallax->GetNumber());
   fViewer->SetStereoEyeOffsetFac  (fStereoEyeOffsetFac->GetNumber());
   fViewer->SetStereoFrustumAsymFac(fStereoFrustumAsymFac->GetNumber());
   ViewerRedraw(); 
}
 TGLViewerEditor.cxx:1
 TGLViewerEditor.cxx:2
 TGLViewerEditor.cxx:3
 TGLViewerEditor.cxx:4
 TGLViewerEditor.cxx:5
 TGLViewerEditor.cxx:6
 TGLViewerEditor.cxx:7
 TGLViewerEditor.cxx:8
 TGLViewerEditor.cxx:9
 TGLViewerEditor.cxx:10
 TGLViewerEditor.cxx:11
 TGLViewerEditor.cxx:12
 TGLViewerEditor.cxx:13
 TGLViewerEditor.cxx:14
 TGLViewerEditor.cxx:15
 TGLViewerEditor.cxx:16
 TGLViewerEditor.cxx:17
 TGLViewerEditor.cxx:18
 TGLViewerEditor.cxx:19
 TGLViewerEditor.cxx:20
 TGLViewerEditor.cxx:21
 TGLViewerEditor.cxx:22
 TGLViewerEditor.cxx:23
 TGLViewerEditor.cxx:24
 TGLViewerEditor.cxx:25
 TGLViewerEditor.cxx:26
 TGLViewerEditor.cxx:27
 TGLViewerEditor.cxx:28
 TGLViewerEditor.cxx:29
 TGLViewerEditor.cxx:30
 TGLViewerEditor.cxx:31
 TGLViewerEditor.cxx:32
 TGLViewerEditor.cxx:33
 TGLViewerEditor.cxx:34
 TGLViewerEditor.cxx:35
 TGLViewerEditor.cxx:36
 TGLViewerEditor.cxx:37
 TGLViewerEditor.cxx:38
 TGLViewerEditor.cxx:39
 TGLViewerEditor.cxx:40
 TGLViewerEditor.cxx:41
 TGLViewerEditor.cxx:42
 TGLViewerEditor.cxx:43
 TGLViewerEditor.cxx:44
 TGLViewerEditor.cxx:45
 TGLViewerEditor.cxx:46
 TGLViewerEditor.cxx:47
 TGLViewerEditor.cxx:48
 TGLViewerEditor.cxx:49
 TGLViewerEditor.cxx:50
 TGLViewerEditor.cxx:51
 TGLViewerEditor.cxx:52
 TGLViewerEditor.cxx:53
 TGLViewerEditor.cxx:54
 TGLViewerEditor.cxx:55
 TGLViewerEditor.cxx:56
 TGLViewerEditor.cxx:57
 TGLViewerEditor.cxx:58
 TGLViewerEditor.cxx:59
 TGLViewerEditor.cxx:60
 TGLViewerEditor.cxx:61
 TGLViewerEditor.cxx:62
 TGLViewerEditor.cxx:63
 TGLViewerEditor.cxx:64
 TGLViewerEditor.cxx:65
 TGLViewerEditor.cxx:66
 TGLViewerEditor.cxx:67
 TGLViewerEditor.cxx:68
 TGLViewerEditor.cxx:69
 TGLViewerEditor.cxx:70
 TGLViewerEditor.cxx:71
 TGLViewerEditor.cxx:72
 TGLViewerEditor.cxx:73
 TGLViewerEditor.cxx:74
 TGLViewerEditor.cxx:75
 TGLViewerEditor.cxx:76
 TGLViewerEditor.cxx:77
 TGLViewerEditor.cxx:78
 TGLViewerEditor.cxx:79
 TGLViewerEditor.cxx:80
 TGLViewerEditor.cxx:81
 TGLViewerEditor.cxx:82
 TGLViewerEditor.cxx:83
 TGLViewerEditor.cxx:84
 TGLViewerEditor.cxx:85
 TGLViewerEditor.cxx:86
 TGLViewerEditor.cxx:87
 TGLViewerEditor.cxx:88
 TGLViewerEditor.cxx:89
 TGLViewerEditor.cxx:90
 TGLViewerEditor.cxx:91
 TGLViewerEditor.cxx:92
 TGLViewerEditor.cxx:93
 TGLViewerEditor.cxx:94
 TGLViewerEditor.cxx:95
 TGLViewerEditor.cxx:96
 TGLViewerEditor.cxx:97
 TGLViewerEditor.cxx:98
 TGLViewerEditor.cxx:99
 TGLViewerEditor.cxx:100
 TGLViewerEditor.cxx:101
 TGLViewerEditor.cxx:102
 TGLViewerEditor.cxx:103
 TGLViewerEditor.cxx:104
 TGLViewerEditor.cxx:105
 TGLViewerEditor.cxx:106
 TGLViewerEditor.cxx:107
 TGLViewerEditor.cxx:108
 TGLViewerEditor.cxx:109
 TGLViewerEditor.cxx:110
 TGLViewerEditor.cxx:111
 TGLViewerEditor.cxx:112
 TGLViewerEditor.cxx:113
 TGLViewerEditor.cxx:114
 TGLViewerEditor.cxx:115
 TGLViewerEditor.cxx:116
 TGLViewerEditor.cxx:117
 TGLViewerEditor.cxx:118
 TGLViewerEditor.cxx:119
 TGLViewerEditor.cxx:120
 TGLViewerEditor.cxx:121
 TGLViewerEditor.cxx:122
 TGLViewerEditor.cxx:123
 TGLViewerEditor.cxx:124
 TGLViewerEditor.cxx:125
 TGLViewerEditor.cxx:126
 TGLViewerEditor.cxx:127
 TGLViewerEditor.cxx:128
 TGLViewerEditor.cxx:129
 TGLViewerEditor.cxx:130
 TGLViewerEditor.cxx:131
 TGLViewerEditor.cxx:132
 TGLViewerEditor.cxx:133
 TGLViewerEditor.cxx:134
 TGLViewerEditor.cxx:135
 TGLViewerEditor.cxx:136
 TGLViewerEditor.cxx:137
 TGLViewerEditor.cxx:138
 TGLViewerEditor.cxx:139
 TGLViewerEditor.cxx:140
 TGLViewerEditor.cxx:141
 TGLViewerEditor.cxx:142
 TGLViewerEditor.cxx:143
 TGLViewerEditor.cxx:144
 TGLViewerEditor.cxx:145
 TGLViewerEditor.cxx:146
 TGLViewerEditor.cxx:147
 TGLViewerEditor.cxx:148
 TGLViewerEditor.cxx:149
 TGLViewerEditor.cxx:150
 TGLViewerEditor.cxx:151
 TGLViewerEditor.cxx:152
 TGLViewerEditor.cxx:153
 TGLViewerEditor.cxx:154
 TGLViewerEditor.cxx:155
 TGLViewerEditor.cxx:156
 TGLViewerEditor.cxx:157
 TGLViewerEditor.cxx:158
 TGLViewerEditor.cxx:159
 TGLViewerEditor.cxx:160
 TGLViewerEditor.cxx:161
 TGLViewerEditor.cxx:162
 TGLViewerEditor.cxx:163
 TGLViewerEditor.cxx:164
 TGLViewerEditor.cxx:165
 TGLViewerEditor.cxx:166
 TGLViewerEditor.cxx:167
 TGLViewerEditor.cxx:168
 TGLViewerEditor.cxx:169
 TGLViewerEditor.cxx:170
 TGLViewerEditor.cxx:171
 TGLViewerEditor.cxx:172
 TGLViewerEditor.cxx:173
 TGLViewerEditor.cxx:174
 TGLViewerEditor.cxx:175
 TGLViewerEditor.cxx:176
 TGLViewerEditor.cxx:177
 TGLViewerEditor.cxx:178
 TGLViewerEditor.cxx:179
 TGLViewerEditor.cxx:180
 TGLViewerEditor.cxx:181
 TGLViewerEditor.cxx:182
 TGLViewerEditor.cxx:183
 TGLViewerEditor.cxx:184
 TGLViewerEditor.cxx:185
 TGLViewerEditor.cxx:186
 TGLViewerEditor.cxx:187
 TGLViewerEditor.cxx:188
 TGLViewerEditor.cxx:189
 TGLViewerEditor.cxx:190
 TGLViewerEditor.cxx:191
 TGLViewerEditor.cxx:192
 TGLViewerEditor.cxx:193
 TGLViewerEditor.cxx:194
 TGLViewerEditor.cxx:195
 TGLViewerEditor.cxx:196
 TGLViewerEditor.cxx:197
 TGLViewerEditor.cxx:198
 TGLViewerEditor.cxx:199
 TGLViewerEditor.cxx:200
 TGLViewerEditor.cxx:201
 TGLViewerEditor.cxx:202
 TGLViewerEditor.cxx:203
 TGLViewerEditor.cxx:204
 TGLViewerEditor.cxx:205
 TGLViewerEditor.cxx:206
 TGLViewerEditor.cxx:207
 TGLViewerEditor.cxx:208
 TGLViewerEditor.cxx:209
 TGLViewerEditor.cxx:210
 TGLViewerEditor.cxx:211
 TGLViewerEditor.cxx:212
 TGLViewerEditor.cxx:213
 TGLViewerEditor.cxx:214
 TGLViewerEditor.cxx:215
 TGLViewerEditor.cxx:216
 TGLViewerEditor.cxx:217
 TGLViewerEditor.cxx:218
 TGLViewerEditor.cxx:219
 TGLViewerEditor.cxx:220
 TGLViewerEditor.cxx:221
 TGLViewerEditor.cxx:222
 TGLViewerEditor.cxx:223
 TGLViewerEditor.cxx:224
 TGLViewerEditor.cxx:225
 TGLViewerEditor.cxx:226
 TGLViewerEditor.cxx:227
 TGLViewerEditor.cxx:228
 TGLViewerEditor.cxx:229
 TGLViewerEditor.cxx:230
 TGLViewerEditor.cxx:231
 TGLViewerEditor.cxx:232
 TGLViewerEditor.cxx:233
 TGLViewerEditor.cxx:234
 TGLViewerEditor.cxx:235
 TGLViewerEditor.cxx:236
 TGLViewerEditor.cxx:237
 TGLViewerEditor.cxx:238
 TGLViewerEditor.cxx:239
 TGLViewerEditor.cxx:240
 TGLViewerEditor.cxx:241
 TGLViewerEditor.cxx:242
 TGLViewerEditor.cxx:243
 TGLViewerEditor.cxx:244
 TGLViewerEditor.cxx:245
 TGLViewerEditor.cxx:246
 TGLViewerEditor.cxx:247
 TGLViewerEditor.cxx:248
 TGLViewerEditor.cxx:249
 TGLViewerEditor.cxx:250
 TGLViewerEditor.cxx:251
 TGLViewerEditor.cxx:252
 TGLViewerEditor.cxx:253
 TGLViewerEditor.cxx:254
 TGLViewerEditor.cxx:255
 TGLViewerEditor.cxx:256
 TGLViewerEditor.cxx:257
 TGLViewerEditor.cxx:258
 TGLViewerEditor.cxx:259
 TGLViewerEditor.cxx:260
 TGLViewerEditor.cxx:261
 TGLViewerEditor.cxx:262
 TGLViewerEditor.cxx:263
 TGLViewerEditor.cxx:264
 TGLViewerEditor.cxx:265
 TGLViewerEditor.cxx:266
 TGLViewerEditor.cxx:267
 TGLViewerEditor.cxx:268
 TGLViewerEditor.cxx:269
 TGLViewerEditor.cxx:270
 TGLViewerEditor.cxx:271
 TGLViewerEditor.cxx:272
 TGLViewerEditor.cxx:273
 TGLViewerEditor.cxx:274
 TGLViewerEditor.cxx:275
 TGLViewerEditor.cxx:276
 TGLViewerEditor.cxx:277
 TGLViewerEditor.cxx:278
 TGLViewerEditor.cxx:279
 TGLViewerEditor.cxx:280
 TGLViewerEditor.cxx:281
 TGLViewerEditor.cxx:282
 TGLViewerEditor.cxx:283
 TGLViewerEditor.cxx:284
 TGLViewerEditor.cxx:285
 TGLViewerEditor.cxx:286
 TGLViewerEditor.cxx:287
 TGLViewerEditor.cxx:288
 TGLViewerEditor.cxx:289
 TGLViewerEditor.cxx:290
 TGLViewerEditor.cxx:291
 TGLViewerEditor.cxx:292
 TGLViewerEditor.cxx:293
 TGLViewerEditor.cxx:294
 TGLViewerEditor.cxx:295
 TGLViewerEditor.cxx:296
 TGLViewerEditor.cxx:297
 TGLViewerEditor.cxx:298
 TGLViewerEditor.cxx:299
 TGLViewerEditor.cxx:300
 TGLViewerEditor.cxx:301
 TGLViewerEditor.cxx:302
 TGLViewerEditor.cxx:303
 TGLViewerEditor.cxx:304
 TGLViewerEditor.cxx:305
 TGLViewerEditor.cxx:306
 TGLViewerEditor.cxx:307
 TGLViewerEditor.cxx:308
 TGLViewerEditor.cxx:309
 TGLViewerEditor.cxx:310
 TGLViewerEditor.cxx:311
 TGLViewerEditor.cxx:312
 TGLViewerEditor.cxx:313
 TGLViewerEditor.cxx:314
 TGLViewerEditor.cxx:315
 TGLViewerEditor.cxx:316
 TGLViewerEditor.cxx:317
 TGLViewerEditor.cxx:318
 TGLViewerEditor.cxx:319
 TGLViewerEditor.cxx:320
 TGLViewerEditor.cxx:321
 TGLViewerEditor.cxx:322
 TGLViewerEditor.cxx:323
 TGLViewerEditor.cxx:324
 TGLViewerEditor.cxx:325
 TGLViewerEditor.cxx:326
 TGLViewerEditor.cxx:327
 TGLViewerEditor.cxx:328
 TGLViewerEditor.cxx:329
 TGLViewerEditor.cxx:330
 TGLViewerEditor.cxx:331
 TGLViewerEditor.cxx:332
 TGLViewerEditor.cxx:333
 TGLViewerEditor.cxx:334
 TGLViewerEditor.cxx:335
 TGLViewerEditor.cxx:336
 TGLViewerEditor.cxx:337
 TGLViewerEditor.cxx:338
 TGLViewerEditor.cxx:339
 TGLViewerEditor.cxx:340
 TGLViewerEditor.cxx:341
 TGLViewerEditor.cxx:342
 TGLViewerEditor.cxx:343
 TGLViewerEditor.cxx:344
 TGLViewerEditor.cxx:345
 TGLViewerEditor.cxx:346
 TGLViewerEditor.cxx:347
 TGLViewerEditor.cxx:348
 TGLViewerEditor.cxx:349
 TGLViewerEditor.cxx:350
 TGLViewerEditor.cxx:351
 TGLViewerEditor.cxx:352
 TGLViewerEditor.cxx:353
 TGLViewerEditor.cxx:354
 TGLViewerEditor.cxx:355
 TGLViewerEditor.cxx:356
 TGLViewerEditor.cxx:357
 TGLViewerEditor.cxx:358
 TGLViewerEditor.cxx:359
 TGLViewerEditor.cxx:360
 TGLViewerEditor.cxx:361
 TGLViewerEditor.cxx:362
 TGLViewerEditor.cxx:363
 TGLViewerEditor.cxx:364
 TGLViewerEditor.cxx:365
 TGLViewerEditor.cxx:366
 TGLViewerEditor.cxx:367
 TGLViewerEditor.cxx:368
 TGLViewerEditor.cxx:369
 TGLViewerEditor.cxx:370
 TGLViewerEditor.cxx:371
 TGLViewerEditor.cxx:372
 TGLViewerEditor.cxx:373
 TGLViewerEditor.cxx:374
 TGLViewerEditor.cxx:375
 TGLViewerEditor.cxx:376
 TGLViewerEditor.cxx:377
 TGLViewerEditor.cxx:378
 TGLViewerEditor.cxx:379
 TGLViewerEditor.cxx:380
 TGLViewerEditor.cxx:381
 TGLViewerEditor.cxx:382
 TGLViewerEditor.cxx:383
 TGLViewerEditor.cxx:384
 TGLViewerEditor.cxx:385
 TGLViewerEditor.cxx:386
 TGLViewerEditor.cxx:387
 TGLViewerEditor.cxx:388
 TGLViewerEditor.cxx:389
 TGLViewerEditor.cxx:390
 TGLViewerEditor.cxx:391
 TGLViewerEditor.cxx:392
 TGLViewerEditor.cxx:393
 TGLViewerEditor.cxx:394
 TGLViewerEditor.cxx:395
 TGLViewerEditor.cxx:396
 TGLViewerEditor.cxx:397
 TGLViewerEditor.cxx:398
 TGLViewerEditor.cxx:399
 TGLViewerEditor.cxx:400
 TGLViewerEditor.cxx:401
 TGLViewerEditor.cxx:402
 TGLViewerEditor.cxx:403
 TGLViewerEditor.cxx:404
 TGLViewerEditor.cxx:405
 TGLViewerEditor.cxx:406
 TGLViewerEditor.cxx:407
 TGLViewerEditor.cxx:408
 TGLViewerEditor.cxx:409
 TGLViewerEditor.cxx:410
 TGLViewerEditor.cxx:411
 TGLViewerEditor.cxx:412
 TGLViewerEditor.cxx:413
 TGLViewerEditor.cxx:414
 TGLViewerEditor.cxx:415
 TGLViewerEditor.cxx:416
 TGLViewerEditor.cxx:417
 TGLViewerEditor.cxx:418
 TGLViewerEditor.cxx:419
 TGLViewerEditor.cxx:420
 TGLViewerEditor.cxx:421
 TGLViewerEditor.cxx:422
 TGLViewerEditor.cxx:423
 TGLViewerEditor.cxx:424
 TGLViewerEditor.cxx:425
 TGLViewerEditor.cxx:426
 TGLViewerEditor.cxx:427
 TGLViewerEditor.cxx:428
 TGLViewerEditor.cxx:429
 TGLViewerEditor.cxx:430
 TGLViewerEditor.cxx:431
 TGLViewerEditor.cxx:432
 TGLViewerEditor.cxx:433
 TGLViewerEditor.cxx:434
 TGLViewerEditor.cxx:435
 TGLViewerEditor.cxx:436
 TGLViewerEditor.cxx:437
 TGLViewerEditor.cxx:438
 TGLViewerEditor.cxx:439
 TGLViewerEditor.cxx:440
 TGLViewerEditor.cxx:441
 TGLViewerEditor.cxx:442
 TGLViewerEditor.cxx:443
 TGLViewerEditor.cxx:444
 TGLViewerEditor.cxx:445
 TGLViewerEditor.cxx:446
 TGLViewerEditor.cxx:447
 TGLViewerEditor.cxx:448
 TGLViewerEditor.cxx:449
 TGLViewerEditor.cxx:450
 TGLViewerEditor.cxx:451
 TGLViewerEditor.cxx:452
 TGLViewerEditor.cxx:453
 TGLViewerEditor.cxx:454
 TGLViewerEditor.cxx:455
 TGLViewerEditor.cxx:456
 TGLViewerEditor.cxx:457
 TGLViewerEditor.cxx:458
 TGLViewerEditor.cxx:459
 TGLViewerEditor.cxx:460
 TGLViewerEditor.cxx:461
 TGLViewerEditor.cxx:462
 TGLViewerEditor.cxx:463
 TGLViewerEditor.cxx:464
 TGLViewerEditor.cxx:465
 TGLViewerEditor.cxx:466
 TGLViewerEditor.cxx:467
 TGLViewerEditor.cxx:468
 TGLViewerEditor.cxx:469
 TGLViewerEditor.cxx:470
 TGLViewerEditor.cxx:471
 TGLViewerEditor.cxx:472
 TGLViewerEditor.cxx:473
 TGLViewerEditor.cxx:474
 TGLViewerEditor.cxx:475
 TGLViewerEditor.cxx:476
 TGLViewerEditor.cxx:477
 TGLViewerEditor.cxx:478
 TGLViewerEditor.cxx:479
 TGLViewerEditor.cxx:480
 TGLViewerEditor.cxx:481
 TGLViewerEditor.cxx:482
 TGLViewerEditor.cxx:483
 TGLViewerEditor.cxx:484
 TGLViewerEditor.cxx:485
 TGLViewerEditor.cxx:486
 TGLViewerEditor.cxx:487
 TGLViewerEditor.cxx:488
 TGLViewerEditor.cxx:489
 TGLViewerEditor.cxx:490
 TGLViewerEditor.cxx:491
 TGLViewerEditor.cxx:492
 TGLViewerEditor.cxx:493
 TGLViewerEditor.cxx:494
 TGLViewerEditor.cxx:495
 TGLViewerEditor.cxx:496
 TGLViewerEditor.cxx:497
 TGLViewerEditor.cxx:498
 TGLViewerEditor.cxx:499
 TGLViewerEditor.cxx:500
 TGLViewerEditor.cxx:501
 TGLViewerEditor.cxx:502
 TGLViewerEditor.cxx:503
 TGLViewerEditor.cxx:504
 TGLViewerEditor.cxx:505
 TGLViewerEditor.cxx:506
 TGLViewerEditor.cxx:507
 TGLViewerEditor.cxx:508
 TGLViewerEditor.cxx:509
 TGLViewerEditor.cxx:510
 TGLViewerEditor.cxx:511
 TGLViewerEditor.cxx:512
 TGLViewerEditor.cxx:513
 TGLViewerEditor.cxx:514
 TGLViewerEditor.cxx:515
 TGLViewerEditor.cxx:516
 TGLViewerEditor.cxx:517
 TGLViewerEditor.cxx:518
 TGLViewerEditor.cxx:519
 TGLViewerEditor.cxx:520
 TGLViewerEditor.cxx:521
 TGLViewerEditor.cxx:522
 TGLViewerEditor.cxx:523
 TGLViewerEditor.cxx:524
 TGLViewerEditor.cxx:525
 TGLViewerEditor.cxx:526
 TGLViewerEditor.cxx:527
 TGLViewerEditor.cxx:528
 TGLViewerEditor.cxx:529
 TGLViewerEditor.cxx:530
 TGLViewerEditor.cxx:531
 TGLViewerEditor.cxx:532
 TGLViewerEditor.cxx:533
 TGLViewerEditor.cxx:534
 TGLViewerEditor.cxx:535
 TGLViewerEditor.cxx:536
 TGLViewerEditor.cxx:537
 TGLViewerEditor.cxx:538
 TGLViewerEditor.cxx:539
 TGLViewerEditor.cxx:540
 TGLViewerEditor.cxx:541
 TGLViewerEditor.cxx:542
 TGLViewerEditor.cxx:543
 TGLViewerEditor.cxx:544
 TGLViewerEditor.cxx:545
 TGLViewerEditor.cxx:546
 TGLViewerEditor.cxx:547
 TGLViewerEditor.cxx:548
 TGLViewerEditor.cxx:549
 TGLViewerEditor.cxx:550
 TGLViewerEditor.cxx:551
 TGLViewerEditor.cxx:552
 TGLViewerEditor.cxx:553
 TGLViewerEditor.cxx:554
 TGLViewerEditor.cxx:555
 TGLViewerEditor.cxx:556
 TGLViewerEditor.cxx:557
 TGLViewerEditor.cxx:558
 TGLViewerEditor.cxx:559
 TGLViewerEditor.cxx:560
 TGLViewerEditor.cxx:561
 TGLViewerEditor.cxx:562
 TGLViewerEditor.cxx:563
 TGLViewerEditor.cxx:564
 TGLViewerEditor.cxx:565
 TGLViewerEditor.cxx:566
 TGLViewerEditor.cxx:567
 TGLViewerEditor.cxx:568
 TGLViewerEditor.cxx:569
 TGLViewerEditor.cxx:570
 TGLViewerEditor.cxx:571
 TGLViewerEditor.cxx:572
 TGLViewerEditor.cxx:573
 TGLViewerEditor.cxx:574
 TGLViewerEditor.cxx:575
 TGLViewerEditor.cxx:576
 TGLViewerEditor.cxx:577
 TGLViewerEditor.cxx:578
 TGLViewerEditor.cxx:579
 TGLViewerEditor.cxx:580
 TGLViewerEditor.cxx:581
 TGLViewerEditor.cxx:582
 TGLViewerEditor.cxx:583
 TGLViewerEditor.cxx:584
 TGLViewerEditor.cxx:585
 TGLViewerEditor.cxx:586
 TGLViewerEditor.cxx:587
 TGLViewerEditor.cxx:588
 TGLViewerEditor.cxx:589
 TGLViewerEditor.cxx:590
 TGLViewerEditor.cxx:591
 TGLViewerEditor.cxx:592
 TGLViewerEditor.cxx:593
 TGLViewerEditor.cxx:594
 TGLViewerEditor.cxx:595
 TGLViewerEditor.cxx:596
 TGLViewerEditor.cxx:597
 TGLViewerEditor.cxx:598
 TGLViewerEditor.cxx:599
 TGLViewerEditor.cxx:600
 TGLViewerEditor.cxx:601
 TGLViewerEditor.cxx:602
 TGLViewerEditor.cxx:603
 TGLViewerEditor.cxx:604
 TGLViewerEditor.cxx:605
 TGLViewerEditor.cxx:606
 TGLViewerEditor.cxx:607
 TGLViewerEditor.cxx:608
 TGLViewerEditor.cxx:609
 TGLViewerEditor.cxx:610
 TGLViewerEditor.cxx:611
 TGLViewerEditor.cxx:612
 TGLViewerEditor.cxx:613
 TGLViewerEditor.cxx:614
 TGLViewerEditor.cxx:615
 TGLViewerEditor.cxx:616
 TGLViewerEditor.cxx:617
 TGLViewerEditor.cxx:618
 TGLViewerEditor.cxx:619
 TGLViewerEditor.cxx:620
 TGLViewerEditor.cxx:621
 TGLViewerEditor.cxx:622
 TGLViewerEditor.cxx:623
 TGLViewerEditor.cxx:624
 TGLViewerEditor.cxx:625
 TGLViewerEditor.cxx:626