Robert Stephenson <[EMAIL PROTECTED]> writes:

> An alternative would be to bring up a borderless full-screen window.
> Can that be done easily?

I don't know about easily, but it's doable form PyObjC.  Hacked out
from somewhere else:

class PQFullScreenWindow(NSWindow):

    def makeForView_(cls, view):
        screen = NSScreen.mainScreen()
        self = cls.alloc().initWithContentRect_styleMask_backing_defer_(
            screen.frame(), NSBorderlessWindowMask, NSBackingStoreBuffered, 
True)
        self.view = view
        return self
    makeForView_ = classmethod(makeForView_)


    def canBecomeKeyWindow(self):
        return True


    def resignKeyWindow(self):
        super(PQFullScreenWindow, self).resignKeyWindow()
        if self.view.fullscreen > 0:
            self.view.toggleFullScreen_(self)


class PQView:
    def awakeFromNib(self):
        ...
        self.fsw = PQFullScreenWindow.makeForView_(self)


    def toggleFullScreen_(self, sender):
        ...
        # some mucking about with contentViews, etc
            self.fsw.makeKeyAndOrderFront_(self)
            self.fsw.makeFirstResponder_(self)
            self.fsw.setLevel_(NSPopUpMenuWindowLevel)

HTH,
mwh

-- 
  > Touche! But this confirms you are composed of logic gates.
  Crud, I thought those were neurons in there.
                    -- Thomas F. Burdick, Kenny Tilton, comp.lang.lisp
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to