#ifndef ROOT_TGLPShapeObjEditor
#define ROOT_TGLPShapeObjEditor
#include <memory>
#ifndef ROOT_TGedFrame
#include "TGedFrame.h"
#endif
#ifndef ROOT_TGLUtil
#include "TGLUtil.h"
#endif
#include "TGLPShapeRef.h"
class TGLPShapeObj;
class TGLayoutHints;
class TGCheckButton;
class TGNumberEntry;
class TGButtonGroup;
class TGroupFrame;
class TGHSlider;
class TGRadioButton;
class TGTabElement;
class TGButton;
class TGLViewer;
class TGTab;
class TGLWidget;
class TGLPShapeObjEditor : public TGedFrame,
public TGLPShapeRef
{
private:
enum ELightMode { kDiffuse, kAmbient, kSpecular, kEmission };
ELightMode fLMode;
TGLayoutHints fLb;
TGLayoutHints fLe;
TGLayoutHints fLl;
TGLayoutHints fLs;
TGCompositeFrame *fGeoFrame;
TGNumberEntry *fGeomData[6];
TGButton *fGeoApplyButton;
TGCompositeFrame *fColorFrame;
TGLWidget *fMatView;
TGButton *fLightTypes[4];
TGHSlider *fRedSlider;
TGHSlider *fGreenSlider;
TGHSlider *fBlueSlider;
TGHSlider *fAlphaSlider;
TGHSlider *fShineSlider;
TGButton *fColorApplyButton;
TGButton *fColorApplyFamily;
Float_t fRGBA[17];
Window_t fGLWin;
ULong_t fCtx;
TGLPShapeObj *fPShapeObj;
void CreateGeoControls();
void CreateColorControls();
virtual void DoRedraw();
public:
TGLPShapeObjEditor(const TGWindow *p = 0,
Int_t width = 140, Int_t height = 30,
UInt_t options = kChildFrame,
Pixel_t back = GetDefaultFrameBackground());
~TGLPShapeObjEditor();
virtual void SetPShape(TGLPhysicalShape * shape);
virtual void PShapeModified();
virtual void SetModel(TObject* obj);
void SetCenter(const Double_t *center);
void SetScale(const Double_t *scale);
void DoGeoButton();
void GetObjectData(Double_t *shift, Double_t *scale);
void GeoValueSet(Long_t unusedVal);
void CreateColorRadioButtons();
void CreateColorSliders();
void SetColorSlidersPos();
void DrawSphere()const;
void SetRGBA(const Float_t *rgba);
const Float_t *GetRGBA()const{return fRGBA;}
void DoColorSlider(Int_t val);
void DoColorButton();
ClassDef(TGLPShapeObjEditor, 0);
};
#endif