22#include "TGLIncludes.h"
26#include "RConfigure.h"
112#elif defined(R__HAS_COCOA)
126 catch (
const std::exception &)
146 fEventHandler(nullptr)
170 Warning(
"~TGLWidget",
"There are some gl-contexts connected to this gl device"
171 "which have longer lifetime than lifetime of gl-device");
305 pfd->cColorBits = 24;
319 Warning(
"TGLContext::SetContext",
"DescribePixelFormat failed");
329 if (
pfd.cStencilBits)
364 Error(
"TGLWidget::SetFormat",
"Sorry, you should not call this function");
368 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->SetFormat()", (
size_t)
this));
378 Error(
"TGLWidget::SetFormat",
"GetWindowDC failed");
379 throw std::runtime_error(
"GetWindowDC failed");
390 Error(
"TGLWidget::SetFormat",
"SetPixelFormat failed");
391 throw std::runtime_error(
"SetPixelFormat failed");
394 Error(
"TGLWidget::SetFormat",
"ChoosePixelFormat failed");
395 throw std::runtime_error(
"ChoosePixelFormat failed");
399#elif defined(R__HAS_COCOA)
408 std::pair<void *, void *>& )
418 if (
format.HasAccumBuffer())
420 if (
format.IsDoubleBuffered())
424 if (
format.HasMultiSampling())
503 std::vector<Int_t>
glxfmt;
506 Display *
dpy =
reinterpret_cast<Display *
>(
gVirtualX->GetDisplay());
508 ::Error(
"TGLWidget::CreateWindow",
"Display is not set!");
509 throw std::runtime_error(
"Display is not set!");
514 ::Error(
"TGLWidget::CreateWindow",
"No good OpenGL visual found!");
515 throw std::runtime_error(
"No good OpenGL visual found!");
522 attr.background_pixel = 0;
524 attr.backing_store = Always;
569 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleCrossing((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
590 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleButton((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
606 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleDoubleClick((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
622 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleConfigureNotify((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
641 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleFocusChange((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
657 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleKey((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
673 gROOT->ProcessLineFast(
Form(
"((TGLWidget *)0x%zx)->HandleMotion((Event_t *)0x%zx)", (
size_t)
this, (
size_t)
ev));
const Mask_t kFocusChangeMask
const Mask_t kButtonPressMask
const Mask_t kExposureMask
Handle_t Window_t
Window handle.
const Mask_t kKeyReleaseMask
const Mask_t kAnyModifier
const Mask_t kKeyPressMask
const Mask_t kPointerMotionMask
const Mask_t kLeaveWindowMask
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
const Mask_t kEnterWindowMask
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t win
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
R__EXTERN TVirtualMutex * gROOTMutex
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
#define R__LOCKGUARD(mutex)
virtual Bool_t HandleKey(Event_t *)
virtual Bool_t HandleMotion(Event_t *)
virtual Bool_t HandleCrossing(Event_t *)
virtual Bool_t HandleButton(Event_t *)
virtual Bool_t HandleConfigureNotify(Event_t *)
virtual Bool_t HandleDoubleClick(Event_t *)
virtual Bool_t HandleFocusChange(Event_t *)
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
This class encapsulates window-system specific information about a GL-context and alows their proper ...
void SwapBuffers()
If context is valid (TGLPaintDevice, for which context was created still exists), swap buffers (in ca...
Bool_t MakeCurrent()
If context is valid (TGLPaintDevice, for which context was created still exists), make it current.
Bool_t ClearCurrent()
Reset current context.
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
ROOT GUI Window base class.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TOneArgGuard< Func, Arg > make_guard(Func f, Arg a)