25 assert(glView != nil &&
"GLViewIsValid, glView parameter is nil");
27 if ([glView isHiddenOrHasHiddenAncestor]) {
33 const NSRect visibleRect = [glView visibleRect];
34 if (visibleRect.size.width < 1. || visibleRect.size.height < 1.) {
52 - (
id) initWithFrame : (NSRect) frameRect pixelFormat : (NSOpenGLPixelFormat *) format
54 if (
self = [super initWithFrame : frameRect windowAttributes : 0]) {
55 [
self setHidden : YES];
59 if ([[NSScreen mainScreen] backingScaleFactor] > 1.)
60 [
self setWantsBestResolutionOpenGLSurface : YES];
72 self.fOpenGLContext = nil;
85 - (
void) setPixelFormat : (NSOpenGLPixelFormat *) pixelFormat
112 #pragma unused(notUsed) 118 [
self setHidden : NO];
125 assert([[
self subviews] count] == 0 &&
"mapSubwindows, GL-view has children");
134 assert(dynamic_cast<TGCocoa *>(
gVirtualX) &&
135 "configureNotifyTree, gVirtualX is either null or has type different from TGCocoa");
149 - (
void) setOverlapped : (BOOL) overlap
156 [
self setHidden : fIsOverlapped];
159 assert(dynamic_cast<TGCocoa *>(
gVirtualX) != 0 &&
160 "setFrameSize:, gVirtualX is either null or has a type, different from TGCocoa");
177 - (
void) setFrame : (NSRect) newFrame
182 if (NSEqualRects(newFrame,
self.frame))
185 [
super setFrame : newFrame];
189 - (
void) setFrameSize : (NSSize) newSize
193 [
super setFrameSize : newSize];
201 assert(dynamic_cast<TGCocoa *>(
gVirtualX) != 0 &&
202 "setFrameSize:, gVirtualX is either null or has a type, different from TGCocoa");
210 - (
void) drawRect : (NSRect) dirtyRect
212 #pragma unused(dirtyRect) QuartzPixmap * fBackBuffer
void GenerateConfigureNotifyEvent(NSView< X11Window > *view, const NSRect &newFrame)
Namespace for new ROOT classes and functions.
bool GLViewIsValidDrawable(ROOTOpenGLView *glView)
NSOpenGLPixelFormat * fPixelFormat
NSOpenGLPixelFormat * pixelFormat()
void GenerateExposeEvent(NSView< X11Window > *view, const NSRect &exposedRect)
const Mask_t kStructureNotifyMask
NSOpenGLContext * fOpenGLContext
void configureNotifyTree()
typedef void((*Func_t)())
This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D. ...
ROOT::MacOSX::X11::EventTranslator * GetEventTranslator() const