]>
Commit | Line | Data |
---|---|---|
fb896a32 DE |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/cocoa/NSWindow.h | |
3 | // Purpose: wxCocoaNSWindow class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/03/16 | |
7 | // RCS-ID: $Id: | |
8 | // Copyright: (c) 2003 David Elliott | |
9 | // Licence: wxWindows license | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef __WX_COCOA_NSWINDOW_H__ | |
13 | #define __WX_COCOA_NSWINDOW_H__ | |
14 | ||
15 | #include "wx/hashmap.h" | |
e6686511 | 16 | #include "wx/cocoa/ObjcAssociate.h" |
fb896a32 DE |
17 | |
18 | WX_DECLARE_OBJC_HASHMAP(NSWindow); | |
19 | ||
360be3c0 DE |
20 | class WXDLLEXPORT wxMenuBar; |
21 | ||
fb896a32 DE |
22 | class wxCocoaNSWindow |
23 | { | |
24 | /* NSWindow is a rather special case and requires some extra attention */ | |
25 | WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSWindow) | |
26 | public: | |
27 | void AssociateNSWindow(WX_NSWindow cocoaNSWindow); | |
720e01c3 | 28 | void DisassociateNSWindow(WX_NSWindow cocoaNSWindow); |
8fc821cc DE |
29 | virtual bool Cocoa_canBecomeMainWindow(bool &canBecome) |
30 | { return false; } | |
aa992c59 | 31 | virtual bool CocoaDelegate_windowShouldClose(void) = 0; |
9692f42b | 32 | virtual void CocoaDelegate_windowWillClose(void) = 0; |
aa992c59 DE |
33 | virtual void CocoaDelegate_windowDidBecomeKey(void) { } |
34 | virtual void CocoaDelegate_windowDidResignKey(void) { } | |
8fc821cc DE |
35 | virtual void CocoaDelegate_windowDidBecomeMain(void) { } |
36 | virtual void CocoaDelegate_windowDidResignMain(void) { } | |
8ded703d | 37 | virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win); |
720e01c3 | 38 | protected: |
78c67cb6 | 39 | static struct objc_object *sm_cocoaDelegate; |
fb896a32 DE |
40 | }; |
41 | ||
42 | #endif // _WX_COCOA_NSWINDOW_H_ |