salframeview.mm (0376cbd9) | salframeview.mm (cd426cce) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 142 unchanged lines hidden (view full) --- 151 return pDispatchFrame; 152} 153 154@implementation SalFrameWindow 155-(id)initWithSalFrame: (AquaSalFrame*)pFrame 156{ 157 mDraggingDestinationHandler = nil; 158 mpFrame = pFrame; | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 142 unchanged lines hidden (view full) --- 151 return pDispatchFrame; 152} 153 154@implementation SalFrameWindow 155-(id)initWithSalFrame: (AquaSalFrame*)pFrame 156{ 157 mDraggingDestinationHandler = nil; 158 mpFrame = pFrame; |
159 NSRect aRect = { { pFrame->maGeometry.nX, pFrame->maGeometry.nY }, 160 { pFrame->maGeometry.nWidth, pFrame->maGeometry.nHeight } }; | 159 NSRect aRect = NSMakeRect( pFrame->maGeometry.nX, pFrame->maGeometry.nY, 160 pFrame->maGeometry.nWidth, pFrame->maGeometry.nHeight); |
161 pFrame->VCLToCocoa( aRect ); 162 NSWindow* pNSWindow = [super initWithContentRect: aRect styleMask: mpFrame->getStyleMask() backing: NSBackingStoreBuffered defer: NO ]; 163 [pNSWindow useOptimizedDrawing: YES]; // OSX recommendation when there are no overlapping subviews within the receiver 164 165 // enable OSX>=10.7 fullscreen options if available and useful 166 bool bAllowFullScreen = (0 == (mpFrame->mnStyle & (SAL_FRAME_STYLE_DIALOG | SAL_FRAME_STYLE_TOOLTIP | SAL_FRAME_STYLE_SYSTEMCHILD | SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_TOOLWINDOW | SAL_FRAME_STYLE_INTRO))); 167 bAllowFullScreen &= (0 == (~mpFrame->mnStyle & (SAL_FRAME_STYLE_SIZEABLE))); 168 bAllowFullScreen &= (mpFrame->mpParent == NULL); --- 288 unchanged lines hidden (view full) --- 457 return mpFrame; 458} 459 460-(void)resetCursorRects 461{ 462 if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) 463 { 464 // FIXME: does this leak the returned NSCursor of getCurrentCursor ? | 161 pFrame->VCLToCocoa( aRect ); 162 NSWindow* pNSWindow = [super initWithContentRect: aRect styleMask: mpFrame->getStyleMask() backing: NSBackingStoreBuffered defer: NO ]; 163 [pNSWindow useOptimizedDrawing: YES]; // OSX recommendation when there are no overlapping subviews within the receiver 164 165 // enable OSX>=10.7 fullscreen options if available and useful 166 bool bAllowFullScreen = (0 == (mpFrame->mnStyle & (SAL_FRAME_STYLE_DIALOG | SAL_FRAME_STYLE_TOOLTIP | SAL_FRAME_STYLE_SYSTEMCHILD | SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_TOOLWINDOW | SAL_FRAME_STYLE_INTRO))); 167 bAllowFullScreen &= (0 == (~mpFrame->mnStyle & (SAL_FRAME_STYLE_SIZEABLE))); 168 bAllowFullScreen &= (mpFrame->mpParent == NULL); --- 288 unchanged lines hidden (view full) --- 457 return mpFrame; 458} 459 460-(void)resetCursorRects 461{ 462 if( mpFrame && AquaSalFrame::isAlive( mpFrame ) ) 463 { 464 // FIXME: does this leak the returned NSCursor of getCurrentCursor ? |
465 NSRect aRect = { { 0, 0 }, { mpFrame->maGeometry.nWidth, mpFrame->maGeometry.nHeight } }; | 465 const NSRect aRect = NSMakeRect( 0, 0, mpFrame->maGeometry.nWidth, mpFrame->maGeometry.nHeight); |
466 [self addCursorRect: aRect cursor: mpFrame->getCurrentCursor()]; 467 } 468} 469 470-(BOOL)acceptsFirstResponder 471{ 472 return YES; 473} --- 1305 unchanged lines hidden --- | 466 [self addCursorRect: aRect cursor: mpFrame->getCurrentCursor()]; 467 } 468} 469 470-(BOOL)acceptsFirstResponder 471{ 472 return YES; 473} --- 1305 unchanged lines hidden --- |