]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/NSWindow.h
Try loading even English translations if provided.
[wxWidgets.git] / include / wx / cocoa / NSWindow.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/NSWindow.h
3 // Purpose: wxCocoaNSWindow class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/16
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __WX_COCOA_NSWINDOW_H__
12 #define __WX_COCOA_NSWINDOW_H__
13
14 #include "wx/hashmap.h"
15 #include "wx/cocoa/ObjcAssociate.h"
16
17 WX_DECLARE_OBJC_HASHMAP(NSWindow);
18
19 class WXDLLIMPEXP_FWD_CORE wxMenuBar;
20 class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowCocoa;
21
22 DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
23 DECLARE_WXCOCOA_OBJC_CLASS(wxNSWindowDelegate);
24
25 class WXDLLIMPEXP_CORE wxCocoaNSWindow
26 {
27 /* NSWindow is a rather special case and requires some extra attention */
28 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSWindow)
29 public:
30 void AssociateNSWindow(WX_NSWindow cocoaNSWindow);
31 void DisassociateNSWindow(WX_NSWindow cocoaNSWindow);
32 virtual bool Cocoa_canBecomeKeyWindow(bool &WXUNUSED(canBecome))
33 { return false; }
34 virtual bool Cocoa_canBecomeMainWindow(bool &WXUNUSED(canBecome))
35 { return false; }
36 virtual bool CocoaDelegate_windowShouldClose(void) = 0;
37 virtual void CocoaDelegate_windowWillClose(void) = 0;
38 virtual void CocoaDelegate_windowDidBecomeKey(void) { }
39 virtual void CocoaDelegate_windowDidResignKey(void) { }
40 virtual void CocoaDelegate_windowDidBecomeMain(void) { }
41 virtual void CocoaDelegate_windowDidResignMain(void) { }
42 virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem) = 0;
43 virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem) = 0;
44 virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win);
45 inline wxTopLevelWindowCocoa* GetWxTopLevelWindowCocoa()
46 { return m_wxTopLevelWindowCocoa; }
47 protected:
48 wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw = NULL);
49 virtual ~wxCocoaNSWindow();
50 WX_wxNSWindowDelegate m_cocoaDelegate;
51 wxTopLevelWindowCocoa *m_wxTopLevelWindowCocoa;
52 };
53
54 #endif // _WX_COCOA_NSWINDOW_H_