Added a virtual wxWindow::OSXGetViewOrWindow() method.

This can be used to retrieve either an NSView for child windows or NSWindow
for non-owned ones without resorting to dynamic casts.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-05 22:57:50 +00:00
parent 3996b21a7f
commit ff6893d2c2
2 changed files with 14 additions and 0 deletions

View File

@@ -97,6 +97,11 @@ public:
wxNonOwnedWindowImpl* GetNonOwnedPeer() const { return m_nowpeer; }
#if wxOSX_USE_COCOA_OR_IPHONE
// override the base class method to return an NSWindow instead of NSView
virtual void *OSXGetViewOrWindow() const { return GetWXWindow(); }
#endif // Cocoa
// osx specific event handling common for all osx-ports
virtual void HandleActivated( double timestampsec, bool didActivate );