#ifndef ROOT_TGLWidget
#define ROOT_TGLWidget
#include <utility>
#include <memory>
#include <set>
#ifndef ROOT_TGLContext
#include "TGLContext.h"
#endif
#ifndef ROOT_TVirtualGL
#include "TVirtualGL.h"
#endif
#ifndef ROOT_TGLFormat
#include "TGLFormat.h"
#endif
#ifndef ROOT_TGCanvas
#include "TGCanvas.h"
#endif
class TGLWidget;
class TGLWidgetContainer : public TGCompositeFrame {
private:
   TGLWidget *fOwner;
public:
   TGLWidgetContainer(TGLWidget *owner, Window_t id, const TGWindow *parent);
   Bool_t HandleButton(Event_t *ev);
   Bool_t HandleDoubleClick(Event_t *ev);
   Bool_t HandleConfigureNotify(Event_t *ev);
   Bool_t HandleKey(Event_t *ev);
   Bool_t HandleMotion(Event_t *ev);
   
   
   void   DoRedraw();
private:
   TGLWidgetContainer(const TGLWidgetContainer &);
   TGLWidgetContainer &operator = (const TGLWidgetContainer &);
   ClassDef(TGLWidgetContainer, 0)
};
class TGLWidget : public TGCanvas, public TGLPaintDevice {
   friend class TGLContext;
private:
   
   std::auto_ptr<TGLWidgetContainer> fContainer;
   
   Int_t                             fWindowIndex;
   std::auto_ptr<TGLContext>         fGLContext;
   
   std::pair<void *, void *>         fInnerData;
   TGLFormat                         fGLFormat;
   
   Bool_t                            fFromCtor;
   std::set<TGLContext *>            fValidContexts;
public:
   TGLWidget(const TGWindow &parent, Bool_t selectInput,
             const TGLPaintDevice *shareDevice,
             UInt_t width, UInt_t height,
             UInt_t options = kSunkenFrame | kDoubleBorder,
             Pixel_t back = GetDefaultFrameBackground());
   TGLWidget(const TGLFormat &format, const TGWindow &parent, Bool_t selectInput,
             const TGLPaintDevice *shareDevice,
             UInt_t width, UInt_t height,
             UInt_t options = kSunkenFrame | kDoubleBorder,
             Pixel_t back = GetDefaultFrameBackground());
   TGLWidget(const TGWindow &parent, Bool_t selectInput,
             UInt_t width, UInt_t height,
             UInt_t options = kSunkenFrame | kDoubleBorder,
             Pixel_t back = GetDefaultFrameBackground());
   TGLWidget(const TGLFormat &format, const TGWindow &parent, Bool_t selectInput,
             UInt_t width, UInt_t height,
             UInt_t options = kSunkenFrame | kDoubleBorder,
             Pixel_t back = GetDefaultFrameBackground());
   ~TGLWidget();
   virtual void      InitGL();
   virtual void      PaintGL();
   Bool_t            MakeCurrent();
   void              SwapBuffers();
   const TGLContext *GetContext()const;
   
   Bool_t            HandleButton(Event_t *event);         
   Bool_t            HandleDoubleClick(Event_t *event);    
   Bool_t            HandleConfigureNotify(Event_t *event);
   Bool_t            HandleKey(Event_t *event);            
   Bool_t            HandleMotion(Event_t *event);         
   void              Repaint();                           
   Int_t             GetWindowIndex()const;
   const  TGLFormat *GetPixelFormat()const;
   Int_t             GetContId()const;
   
   
   void              SetFormat();
   
   void              ExtractViewport(Int_t *vp)const;
private:
   TGLWidget(const TGLWidget &);
   TGLWidget &operator = (const TGLWidget &);
   void CreateWidget(const TGLPaintDevice *shareDevice);
   void CreateWidget();
   void AddContext(TGLContext *ctx);
   void RemoveContext(TGLContext *ctx);
   std::pair<void *, void *> GetInnerData()const;
   ClassDef(TGLWidget, 0)
};
#endif
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.