Position window title offscreen
-
In a Carbon app, I can switch monitor resolution to "full screen,"
hide the menu bar, and then position my window such that its top
pixel of content as at the top of the screen. (This requires setting
kWindowNoConstrainAttribute.)
I don't seem to be able to do the same in Cocoa. No matter what, the
title bar remains entirely visible. (I've even tried getting the
Carbon WindowRef and using Carbon calls to move the window -- I'm not
sure this works at all.)
I tried subclassing NSWindow and overriding -
constrainFrameRect:toScreen:, but I don't really think this is
relevant (nor did it help).
I'd greatly prefer not deleting and recreating my NSWindow.
David Dunham
Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/
Imagination is more important than knowledge. -- Albert Einstein -
On Feb 1, 2008, at 5:27 PM, David Dunham wrote:> I don't seem to be able to do the same in Cocoa. No matter what, the
> title bar remains entirely visible. (I've even tried getting the
> Carbon WindowRef and using Carbon calls to move the window -- I'm
> not sure this works at all.)
Leopard has built-in full screen abilities:
NSView
-enterFullScreenMode:withOptions:
-exitFullScreenModeWithOptions:;
-isInFullScreenMode;
Can you use those?
If not, try this:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide
/AdvancedDrawing/chapter_9_section_4.html#//apple_ref/doc/uid/TP40003290-CH
207-DontLinkElementID_8>
- Scott -
On 1 Feb 2008, at 23:38, Scott Stevenson wrote:>> I don't seem to be able to do the same in Cocoa. No matter what,
>> the title bar remains entirely visible. (I've even tried getting
>> the Carbon WindowRef and using Carbon calls to move the window --
>> I'm not sure this works at all.)
>
> Leopard has built-in full screen abilities:
10.3.9 doesn't.
> >
I'd seen this, but it requires making separate windows depending on
whether you're in fullscreen or not. Carbon doesn't.
David Dunham
Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/
Imagination is more important than knowledge. -- Albert Einstein


