Subclass/Override NSWindow

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Subclass/Override NSWindow

Postby inplainenglish » Sat Jan 18, 2020 6:05 pm

Hello all! I'm looking to subclass NSWindow. I want to override "constrainFrameRect" so as to prevent the window from maxing out it's size relative to the OSX Toolbar and Dock.

What's odd is that CefWindow inherits from CefPanel, which inherits from CefView, which finally inherits from CefBaseRefCounted (which I'm guessing is CEF's base object). None of these actually inherit from NSWindow.

So I want to confirm that: in order to override a function affixed to NSWIndow I need to find where the actual cocoa NSWindow object is being created and instead call my own class inheriting from NSWindow. Also, I need to know where it is that that happens. Any ideas?
inplainenglish
Newbie
 
Posts: 6
Joined: Thu Oct 24, 2019 12:50 pm

Re: Subclass/Override NSWindow

Postby magreenblatt » Sat Jan 18, 2020 10:37 pm

The classes you reference are part of the views framework which is not supported on macOS. Look instead at how the cefclient sample app creates an NSWindow on macOS.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 106 guests