class TGLWidget: public TGCanvas, public TGLPaintDevice


 GL window with context. _Must_ _have_ a parent window
 (the 'parent' parameter of ctors). The current version inherits
 TGCanvas (I'm not sure about future versions), probably, in future
 multiple inheritance will be added - the second
 base class will be TGLPaintDevice or something like this.

 Usage:
 - Simply create TGLWidget as an embedded widget, and
   connect your slots to signals you need: HandleExpose, HandleConfigureNotify, etc.
   In your slots you can use gl API directly - under Win32 TGLWidget switches
   between threads internally (look TGLPShapeObjEditor for such usage).
 - You can write your own class, derived from TGLWidget, with PaintGL and InitGL
   overriden.

 Resources (and invariants):
 -fContainer (TGLWidgetContainer) - controlled by std::auto_ptr
 -fWindowIndex - controlled manually (see CreateWidget and dtor)
 -fGLContext - controlled by std::auto_ptr
 -visual info for X11 version, controlled manually (see CreateGLContainer and dtor)

 Exceptions:
 -can be thrown only during construction.
 -under win32 class does not throw itself (but some internal operations can throw)
 -under X11 can throw std::runtime_error (from CreateGLContext).
 -In case of exceptions resources will be freed.

 TGLWidget object is immutable as far as it was created.

 Boolean parameter defines, if you want to grab user's input or not.
 By default you want, but for example when not - see TGLPShapeObjEditor.

 Non-copyable.

Function Members (Methods)

public:
TGLWidget(const TGWindow& parent, Bool_t selectInput, UInt_t width, UInt_t height, UInt_t options = kSunkenFrame|kDoubleBorder, Pixel_t back = GetDefaultFrameBackground())
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, 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())
virtual~TGLWidget()
voidTObject::AbstractMethod(const char* method) const
virtual voidTGFrame::Activate(Bool_t)
virtual voidTGCanvas::AddFrame(TGFrame* f, TGLayoutHints* l = 0)
voidTGFrame::AddInput(UInt_t emask)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidTGFrame::ChangeBackground(Pixel_t back)
virtual voidTQObject::ChangedBy(const char* method)
virtual voidTGFrame::ChangeOptions(UInt_t options)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual voidTGCanvas::ClearViewPort()
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
Bool_tTGFrame::Contains(Int_t x, Int_t y) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTGFrame::Delete(Option_t* = "")
virtual voidTGFrame::DeleteWindow()
virtual voidTQObject::Destroyed()
virtual voidTGWindow::DestroySubwindows()
virtual voidTGWindow::DestroyWindow()
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTGCanvas::DrawBorder()
virtual voidTGFrame::DrawClass() const
virtual TObject*TGFrame::DrawClone(Option_t* = "") const
virtual voidTGFrame::DrawCopy(Handle_t, Int_t, Int_t)
virtual voidTGFrame::Dump() const
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidExtractViewport(Int_t* vp) const
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Pixel_tTGFrame::GetBackground() const
static const TGGC&TGFrame::GetBckgndGC()
static const TGGC&TGFrame::GetBlackGC()
static Pixel_tTGFrame::GetBlackPixel()
Int_tTGFrame::GetBorderWidth() const
TGClient*TGObject::GetClient() const
TGFrame*TGCanvas::GetContainer() const
virtual const TGLContext*GetContext() const
Int_tGetContId() const
static Int_tTGWindow::GetCounter()
static Pixel_tTGFrame::GetDefaultFrameBackground()
virtual UInt_tTGFrame::GetDefaultHeight() const
static Pixel_tTGFrame::GetDefaultSelectedBackground()
virtual TGDimensionTGCanvas::GetDefaultSize() const
virtual UInt_tTGFrame::GetDefaultWidth() const
virtual TDNDData*TGFrame::GetDNDData(Atom_t)
virtual Int_tTGFrame::GetDragType() const
virtual Option_t*TObject::GetDrawOption() const
virtual Int_tTGFrame::GetDropType() const
static Long_tTObject::GetDtorOnly()
virtual UInt_tTGWindow::GetEditDisabled() const
UInt_tTGFrame::GetEventMask() const
virtual Pixel_tTGFrame::GetForeground() const
TGFrameElement*TGFrame::GetFrameElement() const
virtual TGFrame*TGFrame::GetFrameFromPoint(Int_t x, Int_t y)
UInt_tTGFrame::GetHeight() const
static const TGGC&TGFrame::GetHilightGC()
virtual Int_tTGCanvas::GetHsbPosition() const
TGHScrollBar*TGCanvas::GetHScrollbar() const
virtual const char*TObject::GetIconName() const
Handle_tTGObject::GetId() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*TQObject::GetListOfSignals() const
virtual const TGWindow*TGWindow::GetMainFrame() const
UInt_tTGFrame::GetMaxHeight() const
UInt_tTGFrame::GetMaxWidth() const
UInt_tTGFrame::GetMinHeight() const
UInt_tTGFrame::GetMinWidth() const
virtual const char*TGWindow::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual UInt_tTGFrame::GetOptions() const
const TGWindow*TGWindow::GetParent() const
virtual const TGLFormat*GetPixelFormat() const
Int_tTGCanvas::GetScrolling() const
static const TGGC&TGFrame::GetShadowGC()
TGDimensionTGFrame::GetSize() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
TGViewPort*TGCanvas::GetViewPort() const
virtual Int_tTGCanvas::GetVsbPosition() const
TGVScrollBar*TGCanvas::GetVScrollbar() const
static const TGGC&TGFrame::GetWhiteGC()
static Pixel_tTGFrame::GetWhitePixel()
UInt_tTGFrame::GetWidth() const
Int_tGetWindowIndex() const
Int_tTGFrame::GetX() const
Int_tTGFrame::GetY() const
virtual Bool_tHandleButton(Event_t* event)
virtual Bool_tTGFrame::HandleClientMessage(Event_t* event)
virtual Bool_tTGFrame::HandleColormapChange(Event_t*)
virtual Bool_tHandleConfigureNotify(Event_t* event)
virtual Bool_tTGFrame::HandleCrossing(Event_t*)
virtual Bool_tTGFrame::HandleDNDDrop(TDNDData*)
virtual Atom_tTGFrame::HandleDNDEnter(Atom_t*)
virtual Bool_tTGFrame::HandleDNDFinished()
virtual Bool_tTGFrame::HandleDNDLeave()
virtual Atom_tTGFrame::HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
virtual Bool_tHandleDoubleClick(Event_t* event)
virtual Bool_tTGFrame::HandleDragDrop(TGFrame*, Int_t, Int_t, TGLayoutHints*)
virtual Bool_tTGFrame::HandleDragEnter(TGFrame*)
virtual Bool_tTGFrame::HandleDragLeave(TGFrame*)
virtual Bool_tTGFrame::HandleDragMotion(TGFrame*)
virtual Bool_tTGFrame::HandleEvent(Event_t* event)
virtual Bool_tTGWindow::HandleExpose(Event_t* event)
virtual Bool_tTGFrame::HandleFocusChange(Event_t*)
virtual Bool_tTGWindow::HandleIdleEvent(TGIdleHandler*)
virtual Bool_tHandleKey(Event_t* event)
virtual Bool_tHandleMotion(Event_t* event)
virtual Bool_tTGFrame::HandleSelection(Event_t*)
virtual Bool_tTGFrame::HandleSelectionClear(Event_t*)
virtual Bool_tTGFrame::HandleSelectionRequest(Event_t*)
virtual Bool_tTGWindow::HandleTimer(TTimer*)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
virtual ULong_tTGObject::Hash() const
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTGWindow::IconifyWindow()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidInitGL()
virtual voidTGFrame::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTGFrame::IsActive() const
virtual Bool_tTGFrame::IsComposite() const
Bool_tTGFrame::IsDNDSource() const
Bool_tTGFrame::IsDNDTarget() const
virtual Bool_tTGFrame::IsEditable() const
virtual Bool_tTGObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tTGFrame::IsLayoutBroken() const
virtual Bool_tTGWindow::IsMapped()
virtual Bool_tTGWindow::IsMapSubwindows() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTGCanvas::Layout()
static voidTQObject::LoadRQ_OBJECT()
virtual voidTGWindow::LowerWindow()
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTObject::ls(Option_t* option = "") const
virtual Bool_tMakeCurrent()
virtual voidTGFrame::MapRaised()
virtual voidTGCanvas::MapSubwindows()
virtual voidTGFrame::MapWindow()
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)
virtual voidTGFrame::Move(Int_t x, Int_t y)
virtual voidTGFrame::MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0)
virtual Int_tTGWindow::MustCleanup() const
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidPaintGL()
virtual voidTObject::Pop()
virtual voidTGFrame::Print(Option_t* option = "") const
virtual voidTGFrame::ProcessedEvent(Event_t* event)
virtual Bool_tTGCanvas::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
virtual voidTGWindow::RaiseWindow()
virtual Int_tTObject::Read(const char* name)
virtual voidTGFrame::ReallyDelete()
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTGFrame::RemoveInput(UInt_t emask)
voidRepaint()
virtual voidTGFrame::ReparentWindow(const TGWindow* p, Int_t x = 0, Int_t y = 0)
virtual voidTGWindow::RequestFocus()
voidTObject::ResetBit(UInt_t f)
virtual voidTGFrame::Resize(TGDimension size)
virtual voidTGFrame::Resize(UInt_t w = 0, UInt_t h = 0)
virtual voidTGObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTGCanvas::SavePrimitive(ostream& out, Option_t* option = "")
voidTGFrame::SaveUserColor(ostream& out, Option_t*)
virtual voidTGFrame::SendMessage(const TGWindow* w, Long_t msg, Long_t parm1, Long_t parm2)
virtual voidTGFrame::SetBackgroundColor(Pixel_t back)
virtual voidTGWindow::SetBackgroundPixmap(Pixmap_t pixmap)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTGFrame::SetCleanup(Int_t = kLocalCleanup)
virtual voidTGCanvas::SetContainer(TGFrame* f)
voidTGFrame::SetDNDSource(Bool_t onoff)
voidTGFrame::SetDNDTarget(Bool_t onoff)
virtual voidTGFrame::SetDragType(Int_t type)
virtual voidTGFrame::SetDrawOption(Option_t* = "")
virtual voidTGFrame::SetDropType(Int_t type)
static voidTObject::SetDtorOnly(void* obj)
virtual voidTGFrame::SetEditable(Bool_t)
virtual voidTGWindow::SetEditDisabled(UInt_t on = kEditDisable)
virtual voidTGFrame::SetForegroundColor(Pixel_t)
voidSetFormat()
voidTGFrame::SetFrameElement(TGFrameElement* fe)
virtual voidTGFrame::SetHeight(UInt_t h)
virtual voidTGCanvas::SetHsbPosition(Int_t newPos)
virtual voidTGFrame::SetLayoutBroken(Bool_t = kTRUE)
virtual voidTGWindow::SetMapSubwindows(Bool_t)
virtual voidTGFrame::SetMaxHeight(UInt_t h)
virtual voidTGFrame::SetMaxWidth(UInt_t w)
virtual voidTGFrame::SetMinHeight(UInt_t h)
virtual voidTGFrame::SetMinWidth(UInt_t w)
virtual voidTGWindow::SetName(const char* name)
static voidTObject::SetObjectStat(Bool_t stat)
voidTGCanvas::SetScrolling(Int_t scrolling)
virtual voidTGFrame::SetSize(const TGDimension& s)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTGCanvas::SetVsbPosition(Int_t newPos)
virtual voidTGFrame::SetWidth(UInt_t w)
virtual voidTGWindow::SetWindowName(const char* name = 0)
virtual voidTGFrame::SetX(Int_t x)
virtual voidTGFrame::SetY(Int_t y)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidSwapBuffers()
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTGFrame::UnmapWindow()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidTGFrame::DoRedraw()
virtual voidTGFrame::Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
static Time_tTGFrame::GetLastClick()
TStringTGFrame::GetOptionString() const
const TGResourcePool*TGFrame::GetResourcePool() const
virtual void*TGFrame::GetSender()
virtual const char*TQObject::GetSenderClassName() const
voidTObject::MakeZombie()
virtual voidTGFrame::StartGuiBuilding(Bool_t on = kTRUE)
private:
TGLWidget(const TGLWidget&)
virtual voidAddContext(TGLContext* ctx)
voidCreateWidget()
voidCreateWidget(const TGLPaintDevice* shareDevice)
pair<void*,void*>GetInnerData() const
TGLWidget&operator=(const TGLWidget&)
virtual voidRemoveContext(TGLContext* ctx)

Data Members

public:
enum TGCanvas::[unnamed] { kCanvasNoScroll
kCanvasScrollHorizontal
kCanvasScrollVertical
kCanvasScrollBoth
};
enum TGWindow::EEditMode { kEditEnable
kEditDisable
kEditDisableEvents
kEditDisableGrab
kEditDisableLayout
kEditDisableResize
kEditDisableHeight
kEditDisableWidth
kEditDisableBtnEnable
kEditDisableKeyEnable
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Pixel_tTGFrame::fBackgroundframe background color
Int_tTGFrame::fBorderWidthframe border width
TGClient*TGObject::fClientConnection to display server
Int_tTGFrame::fDNDStateEDNDFlags
UInt_tTGWindow::fEditDisabledflags used for "guibuilding"
UInt_tTGFrame::fEventMaskcurrenty active event mask
TGFrameElement*TGFrame::fFEpointer to frame element
TGHScrollBar*TGCanvas::fHScrollbarhorizontal scrollbar
UInt_tTGFrame::fHeightframe height
Handle_tTGObject::fIdX11/Win32 Window identifier
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
UInt_tTGFrame::fMaxHeightmaximal frame height
UInt_tTGFrame::fMaxWidthmaximal frame width
UInt_tTGFrame::fMinHeightminimal frame height
UInt_tTGFrame::fMinWidthminimal frame width
TStringTGWindow::fNamename of the window used in SavePrimitive()
Bool_tTGWindow::fNeedRedrawkTRUE if window needs to be redrawn
UInt_tTGFrame::fOptionsframe options
const TGWindow*TGWindow::fParentParent window
Int_tTGCanvas::fScrollingflag which scrolling modes are allowed
TGVScrollBar*TGCanvas::fVScrollbarvertical scrollbar
TGViewPort*TGCanvas::fVportviewport through which we look at contents
UInt_tTGFrame::fWidthframe width
Int_tTGFrame::fXframe x position
Int_tTGFrame::fYframe y position
static const TGGC*TGFrame::fgBckgndGC
static const TGGC*TGFrame::fgBlackGC
static Pixel_tTGFrame::fgBlackPixel
static Int_tTGWindow::fgCountercounter of created windows in SavePrimitive
static Window_tTGFrame::fgDbw
static Int_tTGFrame::fgDbx
static Int_tTGFrame::fgDby
static Pixel_tTGFrame::fgDefaultFrameBackground
static Pixel_tTGFrame::fgDefaultSelectedBackground
static const TGGC*TGFrame::fgHilightGC
static Bool_tTGFrame::fgInit
static UInt_tTGFrame::fgLastButton
static Time_tTGFrame::fgLastClick
static const TGGC*TGFrame::fgShadowGC
static UInt_tTGFrame::fgUserColor
static const TGGC*TGFrame::fgWhiteGC
static Pixel_tTGFrame::fgWhitePixel
private:
auto_ptr<TGLWidgetContainer>fContainer
Bool_tfFromCtor
auto_ptr<TGLContext>fGLContext
TGLFormatfGLFormat
pair<void*,void*>fInnerData
set<TGLContext*>fValidContexts
Int_tfWindowIndex

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLWidget(const TGWindow &p, Bool_t select, const TGLPaintDevice *shareDevice, UInt_t w, UInt_t h, UInt_t opt, Pixel_t back)
Creates widget with default pixel format.
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())
Create widget with the requested pixel format.
TGLWidget(const TGWindow& parent, Bool_t selectInput, UInt_t width, UInt_t height, UInt_t options = kSunkenFrame|kDoubleBorder, Pixel_t back = GetDefaultFrameBackground())
Creates widget with default pixel format, default shareList.
TGLWidget(const TGLFormat &format, const TGWindow &p, Bool_t select, UInt_t w, UInt_t h, UInt_t opt, Pixel_t back)
Create widget with the requested pixel format, default shareList.
~TGLWidget()
Destructor. Deletes window ???? and XVisualInfo
void InitGL()
Call glEnable(... in overrider of InitGL.
void PaintGL()
Do actual drawing in overrider of PaintGL.
Bool_t MakeCurrent()
Make the gl-context current.
void SwapBuffers()
Swap buffers.
const TGLContext * GetContext()
Get gl context.
Bool_t HandleButton(Event_t* event)
Signal. Under Win32 I have to switch between
threads to let direct usage of gl code.
Bool_t HandleDoubleClick(Event_t* event)
Signal. Under Win32 I have to switch between
threads to let direct usage of gl code.
Bool_t HandleConfigureNotify(Event_t* event)
Signal. Under Win32 I have to switch between
threads to let direct usage of gl code.
Bool_t HandleKey(Event_t* event)
Signal. Under Win32 I have to switch between
threads to let direct usage of gl code.
Bool_t HandleMotion(Event_t* event)
Signal. Under Win32 I have to switch between
threads to let direct usage of gl code.
Int_t GetWindowIndex()
Index of window, registered by gVirtualX.
const TGLFormat * GetPixelFormat()
Pixel format.
Int_t GetContId()
Id of container.
std::pair<void *, void *> GetInnerData()
Dpy*, XVisualInfo *
void CreateWidget(const TGLPaintDevice* shareDevice)
CreateWidget. This function called only during construction,
I've extracted this code from ctors to make WIN32/X11
separation simpler and because of gInterpreter usage.
new, TGLContext can throw
std::bad_alloc and std::runtime_error. Before try block, the only
resource allocated is pointed by fWindowIndex (InitWindow cannot throw).
In try block (and after successful constraction)
resources are controlled by std::auto_ptrs and dtor.
void CreateWidget(const TGLPaintDevice* shareDevice)
CreateWidget. Copy of the above for default shareList.
void SetFormat()
Set pixel format.
Resource - hDC, owned and freed by guard object.
void Repaint()
Forse re-drawing of gl-widget.
   if (!gVirtualX->IsCmdThread()) {
gROOT->ProcessLineFast(Form("((TGLWidget *)0x%lx)->Repaint()", this));
return;
}

MakeCurrent();
InitGL();
PaintGL();
SwapBuffers();
void AddContext(TGLContext* ctx)
Register gl-context created for this window.
void RemoveContext(TGLContext* ctx)
Remove context (no real deletion, done by TGLContex dtor).
void ExtractViewport(Int_t* vp) const
For camera.
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())

Author: Timur Pocheptsov, Jun 2007
Last update: root/gl:$Id: TGLWidget.h 21702 2008-01-14 18:55:14Z matevz $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *

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.