ROOT logo
// @(#)root/gl:$Id: TGLPShapeObjEditor.cxx 28197 2009-04-14 13:59:27Z matevz $
// Author: Matevz Tadel   25/09/2006

#include <cstring>

#include "TGLPShapeObjEditor.h"
#include "TGLPShapeObj.h"
#include "TGedEditor.h"

#include "TG3DLine.h"
#include "TGButton.h"
#include "TGButtonGroup.h"
#include "TString.h"
#include "TGLabel.h"
#include "TClass.h"
#include "TGCanvas.h"
#include "TGTab.h"
#include "TGSlider.h"
#include "TGNumberEntry.h"
#include "TGButtonGroup.h"
#include "TROOT.h"

#include "TVirtualGL.h"
#include "TVirtualX.h"
#include "TGLViewer.h"
#include "TGLUtil.h"
#include "TGLPhysicalShape.h"
#include "TGLWidget.h"
#include "TGLIncludes.h"

#include "Buttons.h"

//______________________________________________________________________________
//
// GUI editor for TGLPShapeObj.

ClassImp(TGLPShapeObjEditor);

enum EGeometry {
      kCenterX,
      kCenterY,
      kCenterZ,
      kScaleX,
      kScaleY,
      kScaleZ,
      kTot
};

enum EApplyButtonIds {
      kTBcp,
      kTBcpm,
      kTBda,
      kTBa,
      kTBaf,
      kTBEndOfList
};

enum EGLEditorIdent {
      kCPa = kTBEndOfList + 1,
      kCPd, kCPs, kCPe,
      kHSr, kHSg, kHSb,
      kHSa, kHSs, kHSe,
      kNExc, kNEyc, kNEzc,
      kNExs, kNEys, kNEzs,
      kNExp, kNEyp, kNEzp,
      kNEat
};

//______________________________________________________________________________
TGLPShapeObjEditor::TGLPShapeObjEditor(const TGWindow *p,  Int_t width, Int_t height, UInt_t options, Pixel_t back)
   : TGedFrame(p,  width, height, options | kVerticalFrame, back),
     fLb(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 2, 3, 3), //button
     fLe(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 3, 3), //entries
     fLl(kLHintsLeft, 0, 8, 6, 0), // labels
     fLs(kLHintsTop | kLHintsCenterX, 2, 2, 0, 0),  ///sliders
     fGeoFrame(0),fGeoApplyButton(0),
     fColorFrame(0),
     fRedSlider(0), fGreenSlider(0), fBlueSlider(0), fAlphaSlider(0), fShineSlider(0),
     fColorApplyButton(0), fColorApplyFamily(0),
     fRGBA(),
     fPShapeObj(0)
{
   // Constructor of TGLPhysicalShape editor GUI.

   fRGBA[12] = fRGBA[13] = fRGBA[14] = 0.0f;
   fRGBA[15] = 1.0f;
   fRGBA[16] = 60.0f;

   CreateColorControls();
   CreateGeoControls();
}

//______________________________________________________________________________
TGLPShapeObjEditor::~TGLPShapeObjEditor()
{
   // Destroy color editor GUI component.
   // Done automatically.
}

//______________________________________________________________________________
void TGLPShapeObjEditor::SetPShape(TGLPhysicalShape * shape)
{
   // Shape has changed.
   // Check if set to zero and make sure we're no longer in editor.

   TGLPShapeRef::SetPShape(shape);
   if (shape == 0 && fGedEditor->GetModel() == fPShapeObj)
      fGedEditor->SetModel(fGedEditor->GetPad(), fPShapeObj->fViewer, kButton1Down);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::PShapeModified()
{
   // Shape has been modified.
   // Update editor if we're still shown. Otherwise unref.

   if (fGedEditor->GetModel() == fPShapeObj)
      fGedEditor->SetModel(fGedEditor->GetPad(), fPShapeObj, kButton1Down);
   else
      SetPShape(0);
}

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

   fPShapeObj = 0;

   fPShapeObj = static_cast<TGLPShapeObj *>(obj);
   SetPShape(fPShapeObj->fPShape);

   SetRGBA(fPShapeObj->fPShape->Color());
   SetCenter(fPShapeObj->fPShape->GetTranslation().CArr());
   SetScale(fPShapeObj->fPShape->GetScale().CArr());
   fGeoApplyButton->SetState(kButtonDisabled);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::SetCenter(const Double_t *c)
{
   // Set internal center data from 3 component 'c'.

   fGeomData[kCenterX]->SetNumber(c[0]);
   fGeomData[kCenterY]->SetNumber(c[1]);
   fGeomData[kCenterZ]->SetNumber(c[2]);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::SetScale(const Double_t *s)
{
   // Set internal scale data from 3 component 'c'.

   fGeomData[kScaleX]->SetNumber(s[0]);
   fGeomData[kScaleY]->SetNumber(s[1]);
   fGeomData[kScaleZ]->SetNumber(s[2]);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::DoGeoButton()
{
   // Process 'Apply' - update the viewer object from GUI.

   TGLVertex3 trans;
   TGLVector3 scale;
   GetObjectData(trans.Arr(), scale.Arr());
   if (fPShape) {
      fPShape->SetTranslation(trans);
      fPShape->Scale(scale);
   }
   fPShapeObj->fViewer->RequestDraw();
   fGeoApplyButton->SetState(kButtonDisabled);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::GetObjectData(Double_t *center, Double_t *scale)
{
   // Extract the GUI object data, return center in 3 component 'center'
   // scale in 3 component 'scale'.

   center[0] = fGeomData[kCenterX]->GetNumber();
   center[1] = fGeomData[kCenterY]->GetNumber();
   center[2] = fGeomData[kCenterZ]->GetNumber();
   scale[0] = fGeomData[kScaleX]->GetNumber();
   scale[1] = fGeomData[kScaleY]->GetNumber();
   scale[2] = fGeomData[kScaleZ]->GetNumber();
}

//______________________________________________________________________________
void TGLPShapeObjEditor::GeoValueSet(Long_t)
{
   // Process setting of value in edit box - activate 'Apply' button.

   if (fGeoApplyButton->GetState() != kButtonUp)
       fGeoApplyButton->SetState(kButtonUp);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::CreateGeoControls()
{
   // Create GUI for setting scale and position.

   fGeoFrame = CreateEditorTabSubFrame("Geometry");

   TGLabel *label=0;

   // Postion container
   TGGroupFrame* container = new TGGroupFrame(fGeoFrame, "Object position:");
   container->SetTitlePos(TGGroupFrame::kLeft);
   fGeoFrame->AddFrame(container, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 8, 8, 3, 3));//-
   TGLayoutHints lh =  TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 0, 0);

   TGHorizontalFrame* hf;

   hf = new TGHorizontalFrame(container);
   label = new TGLabel(hf, "X:");
   hf->AddFrame(label, new TGLayoutHints(fLl));
   fGeomData[kCenterX] = new TGNumberEntry(hf, 0.0, 8, kNExc);
   hf->AddFrame(fGeomData[kCenterX], new TGLayoutHints(fLe));
   fGeomData[kCenterX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
                                this, "GeoValueSet(Long_t)");
   container->AddFrame(hf, new TGLayoutHints(lh));

   hf = new TGHorizontalFrame(container);
   label = new TGLabel(hf, "Y:");
   hf->AddFrame(label, new TGLayoutHints(fLl));
   fGeomData[kCenterY] = new TGNumberEntry(hf, 0.0, 8, kNEyc);
   hf->AddFrame(fGeomData[kCenterY], new TGLayoutHints(fLe));
   fGeomData[kCenterY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
                                this, "GeoValueSet(Long_t)");
   container->AddFrame(hf, new TGLayoutHints(lh));

   hf = new TGHorizontalFrame(container);
   hf->AddFrame(new TGLabel(hf, "Z:"), new TGLayoutHints(fLl));
   fGeomData[kCenterZ] = new TGNumberEntry(hf, 1.0, 8, kNEzc);
   hf->AddFrame(fGeomData[kCenterZ], new TGLayoutHints(fLe));
   fGeomData[kCenterZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
                                this, "GeoValueSet(Long_t)");
   container->AddFrame(hf, new TGLayoutHints(lh));

   // Scale container
   TGGroupFrame* osf = new TGGroupFrame(fGeoFrame, "Object scale:", kLHintsTop | kLHintsCenterX);
   osf->SetTitlePos(TGGroupFrame::kLeft);
   fGeoFrame->AddFrame(osf, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 8, 8, 3, 3));

   hf = new TGHorizontalFrame(osf);
   hf->AddFrame(new TGLabel(hf, "X:"),new TGLayoutHints(fLl));
   fGeomData[kScaleX] = new TGNumberEntry(hf, 1.0, 5, kNExs);
   hf->AddFrame(fGeomData[kScaleX], new TGLayoutHints(fLe));
   fGeomData[kScaleX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
                               this, "GeoValueSet(Long_t)");
   osf->AddFrame(hf, new TGLayoutHints(lh));

   hf = new TGHorizontalFrame(osf);
   hf->AddFrame(new TGLabel(hf, "Y:"),new TGLayoutHints(fLl));
   fGeomData[kScaleY] = new TGNumberEntry(hf, 1.0, 5, kNEys);
   hf->AddFrame(fGeomData[kScaleY], new TGLayoutHints(fLe));
   fGeomData[kScaleY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
                               this, "GeoValueSet(Long_t)");
   osf->AddFrame(hf, new TGLayoutHints(lh));

   hf = new TGHorizontalFrame(osf);
   hf->AddFrame(new TGLabel(hf, "Z:"),new TGLayoutHints(fLl));
   fGeomData[kScaleZ] = new TGNumberEntry(hf, 1.0, 5, kNEzs);
   hf->AddFrame(fGeomData[kScaleZ], new TGLayoutHints(fLe));
   fGeomData[kScaleZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
                               this, "GeoValueSet(Long_t)");
   osf->AddFrame(hf, new TGLayoutHints(lh));

   hf = new TGHorizontalFrame(osf);
   fGeomData[kScaleX]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1);
   fGeomData[kScaleY]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1);
   fGeomData[kScaleZ]->SetLimits(TGNumberFormat::kNELLimitMin, 0.1);
   osf->AddFrame(hf, new TGLayoutHints(lh));

   // Modify button
   fGeoApplyButton = new TGTextButton(fGeoFrame, "Modify object");
   fGeoFrame->AddFrame(fGeoApplyButton, new TGLayoutHints(fLb));
   fGeoApplyButton->SetState(kButtonDisabled);
   fGeoApplyButton->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoGeoButton()");
}

//______________________________________________________________________________
void TGLPShapeObjEditor::SetRGBA(const Float_t *rgba)
{
   // Set color sliders from 17 component 'rgba'.

   fColorApplyButton->SetState(kButtonDisabled);
   fColorApplyFamily->SetState(kButtonDisabled);

   for (Int_t i = 0; i < 17; ++i) fRGBA[i] = rgba[i];

   fRedSlider->SetPosition(Int_t(fRGBA[fLMode * 4] * 100));
   fGreenSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 1] * 100));
   fBlueSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 2] * 100));
   fShineSlider->SetPosition(Int_t(fRGBA[16]));

   DrawSphere();
}

//______________________________________________________________________________
void TGLPShapeObjEditor::DoColorSlider(Int_t val)
{
   // Process slider movement.

   TGSlider *frm = (TGSlider *)gTQSender;

   if (frm) {
      Int_t wid = frm->WidgetId();

      switch (wid) {
      case kHSr:
         fRGBA[fLMode * 4] = val / 100.f;
         break;
      case kHSg:
         fRGBA[fLMode * 4 + 1] = val / 100.f;
         break;
      case kHSb:
         fRGBA[fLMode * 4 + 2] = val / 100.f;
         break;
      case kHSa:
         fRGBA[fLMode * 4 + 3] = val / 100.f;
         break;
      case kHSs:
         fRGBA[16] = val;
         break;
      }

      fColorApplyButton->SetState(kButtonUp);
      fColorApplyFamily->SetState(kButtonUp);
      DrawSphere();
   }
}

//______________________________________________________________________________
void TGLPShapeObjEditor::DoColorButton()
{
   // Process button action.

   TGButton *btn = (TGButton *) gTQSender;
   Int_t id = btn->WidgetId();

   switch (id) {
   case kCPd:
      fLightTypes[fLMode]->SetState(kButtonUp);
      fLMode = kDiffuse;
      SetColorSlidersPos();
      break;
   case kCPa:
      fLightTypes[fLMode]->SetState(kButtonUp);
      fLMode = kAmbient;
      SetColorSlidersPos();
      break;
   case kCPs:
      fLightTypes[fLMode]->SetState(kButtonUp);
      fLMode = kSpecular;
      SetColorSlidersPos();
      break;
   case kCPe:
      fLightTypes[fLMode]->SetState(kButtonUp);
      fLMode = kEmission;
      SetColorSlidersPos();
      break;
   case kTBa:
      fColorApplyButton->SetState(kButtonDisabled);
      fColorApplyFamily->SetState(kButtonDisabled);
      if (fPShape) {
         fPShape->SetColor(GetRGBA());
      }
      fPShapeObj->fViewer->RequestDraw();
      break;
   case kTBaf:
      fColorApplyButton->SetState(kButtonDisabled);
      fColorApplyFamily->SetState(kButtonDisabled);
      if (fPShape) {
         fPShape->SetColorOnFamily(GetRGBA());
      }
      fPShapeObj->fViewer->RequestDraw();
      break;
   }
}

//______________________________________________________________________________
void TGLPShapeObjEditor::CreateColorRadioButtons()
{
   // Create Diffuse/Ambient/Specular/Emissive radio buttons and sub-frames.

   TGGroupFrame *partFrame = new TGGroupFrame(fColorFrame, "Color components:", kLHintsTop | kLHintsCenterX);
   fColorFrame->AddFrame(partFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 0, 2, 2));

   partFrame->SetTitlePos(TGGroupFrame::kLeft);
   TGMatrixLayout *ml = new TGMatrixLayout(partFrame, 0, 1, 10);
   partFrame->SetLayoutManager(ml);

   // partFrame will delete the layout manager ml for us so don't add to fTrash
   fLightTypes[kDiffuse] = new TGRadioButton(partFrame, "Diffuse", kCPd);
   fLightTypes[kDiffuse]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
   fLightTypes[kDiffuse]->SetToolTipText("Diffuse component of color");
   partFrame->AddFrame(fLightTypes[kDiffuse]);

   fLightTypes[kAmbient] = new TGRadioButton(partFrame, "Ambient", kCPa);
   fLightTypes[kAmbient]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
   fLightTypes[kAmbient]->SetToolTipText("Ambient component of color");
   partFrame->AddFrame(fLightTypes[kAmbient]);

   fLightTypes[kSpecular] = new TGRadioButton(partFrame, "Specular", kCPs);
   fLightTypes[kSpecular]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
   fLightTypes[kSpecular]->SetToolTipText("Specular component of color");
   partFrame->AddFrame(fLightTypes[kSpecular]);

   fLightTypes[kEmission] = new TGRadioButton(partFrame, "Emissive", kCPe);
   fLightTypes[kEmission]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
   fLightTypes[kEmission]->SetToolTipText("Emissive component of color");
   partFrame->AddFrame(fLightTypes[kEmission]);

   fLMode = kDiffuse;
   fLightTypes[fLMode]->SetState(kButtonDown);
}

//______________________________________________________________________________
void TGLPShapeObjEditor::CreateColorSliders()
{
   // Create GUI for setting light color.

   UInt_t sw = 120; //fColorFrame->GetDefalutWidth();,

   // Create Red/Green/BlueAlpha/Shine sliders
   fColorFrame->AddFrame(new TGLabel(fColorFrame, "Red :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
   fRedSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSr);
   fRedSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
   fRedSlider->SetRange(0, 100);
   fRedSlider->SetPosition(Int_t(fRGBA[0] * 100));
   fColorFrame->AddFrame(fRedSlider, new TGLayoutHints(fLs));


   fColorFrame->AddFrame(new TGLabel(fColorFrame, "Green :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
   fGreenSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSg);
   fGreenSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
   fGreenSlider->SetRange(0, 100);
   fGreenSlider->SetPosition(Int_t(fRGBA[1] * 100));
   fColorFrame->AddFrame(fGreenSlider, new TGLayoutHints(fLs));


   fColorFrame->AddFrame(new TGLabel(fColorFrame, "Blue :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
   fBlueSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSb);
   fBlueSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
   fBlueSlider->SetRange(0, 100);
   fBlueSlider->SetPosition(Int_t(fRGBA[2] * 100));
   fColorFrame->AddFrame(fBlueSlider, new TGLayoutHints(fLs));

   fColorFrame->AddFrame(new TGLabel(fColorFrame, "Shine :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
   fShineSlider = new TGHSlider(fColorFrame, sw, kSlider1 | kScaleBoth, kHSs);
   fShineSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
   fShineSlider->SetRange(0, 128);
   fColorFrame->AddFrame(fShineSlider, new TGLayoutHints(fLs));
}

//______________________________________________________________________________
void TGLPShapeObjEditor::SetColorSlidersPos()
{
   // Update GUI sliders from internal data.

   fRedSlider->SetPosition(Int_t(fRGBA[fLMode * 4] * 100));
   fGreenSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 1] * 100));
   fBlueSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 2] * 100));
   //   fAlphaSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 3] * 100));

   if (fRGBA[16] >= 0.f)
      fShineSlider->SetPosition(Int_t(fRGBA[16]));
}

//______________________________________________________________________________
void TGLPShapeObjEditor::DoRedraw()
{
   // Redraw widget. Render sphere and pass to base-class.

   DrawSphere();
   TGedFrame::DoRedraw();
}

//______________________________________________________________________________
namespace {

   GLUquadric *GetQuadric()
   {
      // GLU quadric.

      static struct Init {
         Init()
         {
            fQuad = gluNewQuadric();
            if (!fQuad) {
               Error("GetQuadric::Init", "could not create quadric object");
            } else {
               gluQuadricOrientation(fQuad, (GLenum)GLU_OUTSIDE);
               gluQuadricDrawStyle(fQuad,   (GLenum)GLU_FILL);
               gluQuadricNormals(fQuad,     (GLenum)GLU_FLAT);
            }
         }
         ~Init()
         {
            if(fQuad)
               gluDeleteQuadric(fQuad);
         }
         GLUquadric *fQuad;
      }singleton;

      return singleton.fQuad;
   }

}

//______________________________________________________________________________
void TGLPShapeObjEditor::DrawSphere()const
{
   // Draw local sphere reflecting current color options.

   if (!gVirtualX->IsCmdThread()) {
      gROOT->ProcessLineFast(Form("((TGLPShapeObjEditor *)0x%lx)->DrawSphere()", this));
      return;
   }

   fMatView->MakeCurrent();
   glViewport(0, 0, fMatView->GetWidth(), fMatView->GetHeight());
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

   glEnable(GL_LIGHTING);
   glEnable(GL_LIGHT0);
   glEnable(GL_DEPTH_TEST);
   glEnable(GL_CULL_FACE);
   glCullFace(GL_BACK);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   glFrustum(-0.5, 0.5, -0.5, 0.5, 1., 10.);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
   Float_t ligPos[] = {0.f, 0.f, 0.f, 1.f};
   glLightfv(GL_LIGHT0, GL_POSITION, ligPos);
   glTranslated(0., 0., -3.);

   const Float_t whiteColor[] = {1.f, 1.f, 1.f, 1.f};
   const Float_t nullColor[] = {0.f, 0.f, 0.f, 1.f};

   if (fRGBA[16] < 0.f) {
      glLightfv(GL_LIGHT0, GL_DIFFUSE, fRGBA);
      glLightfv(GL_LIGHT0, GL_AMBIENT, fRGBA + 4);
      glLightfv(GL_LIGHT0, GL_SPECULAR, fRGBA + 8);
      glMaterialfv(GL_FRONT, GL_DIFFUSE, whiteColor);
      glMaterialfv(GL_FRONT, GL_AMBIENT, nullColor);
      glMaterialfv(GL_FRONT, GL_SPECULAR, whiteColor);
      glMaterialfv(GL_FRONT, GL_EMISSION, nullColor);
      glMaterialf(GL_FRONT, GL_SHININESS, 60.f);
   } else {
      glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteColor);
      glLightfv(GL_LIGHT0, GL_AMBIENT, nullColor);
      glLightfv(GL_LIGHT0, GL_SPECULAR, whiteColor);
      glMaterialfv(GL_FRONT, GL_DIFFUSE, fRGBA);
      glMaterialfv(GL_FRONT, GL_AMBIENT, fRGBA + 4);
      glMaterialfv(GL_FRONT, GL_SPECULAR, fRGBA + 8);
      glMaterialfv(GL_FRONT, GL_EMISSION, fRGBA + 12);
      glMaterialf(GL_FRONT, GL_SHININESS, fRGBA[16]);
   }

   glEnable(GL_BLEND);
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
   GLUquadric * quad = GetQuadric();
   if (quad) {
      glRotated(-90., 1., 0., 0.);
      gluSphere(quad, 1., 100, 100);
   }
   glDisable(GL_BLEND);

   fMatView->SwapBuffers();
}

//______________________________________________________________________________
void TGLPShapeObjEditor::CreateColorControls()
{
   // Create widgets to chhos colors componnet and its RGBA values on fGedEditor
   // model or family it belongs to.

   fColorFrame = this;

   fMatView = TGLWidget::Create(fColorFrame, kFALSE, kTRUE, 0, 120, 120);
   fColorFrame->AddFrame(fMatView, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 0, 2, 2));

   CreateColorRadioButtons();

   CreateColorSliders();

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