]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/NSWindow.h
Regenerated makefiles for runtime lib change
[wxWidgets.git] / include / wx / cocoa / NSWindow.h
CommitLineData
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
65571936 9// Licence: wxWindows licence
fb896a32
DE
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
18WX_DECLARE_OBJC_HASHMAP(NSWindow);
19
360be3c0 20class WXDLLEXPORT wxMenuBar;
0092ef0d 21class WXDLLEXPORT wxTopLevelWindowCocoa;
360be3c0 22
7dd8b1ea 23DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
c6f73d05
DE
24DECLARE_WXCOCOA_OBJC_CLASS(wxNSWindowDelegate);
25
fb896a32
DE
26class wxCocoaNSWindow
27{
28/* NSWindow is a rather special case and requires some extra attention */
29 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSWindow)
30public:
31 void AssociateNSWindow(WX_NSWindow cocoaNSWindow);
720e01c3 32 void DisassociateNSWindow(WX_NSWindow cocoaNSWindow);
8fc821cc
DE
33 virtual bool Cocoa_canBecomeMainWindow(bool &canBecome)
34 { return false; }
aa992c59 35 virtual bool CocoaDelegate_windowShouldClose(void) = 0;
9692f42b 36 virtual void CocoaDelegate_windowWillClose(void) = 0;
aa992c59
DE
37 virtual void CocoaDelegate_windowDidBecomeKey(void) { }
38 virtual void CocoaDelegate_windowDidResignKey(void) { }
8fc821cc
DE
39 virtual void CocoaDelegate_windowDidBecomeMain(void) { }
40 virtual void CocoaDelegate_windowDidResignMain(void) { }
7dd8b1ea
DE
41 virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem) = 0;
42 virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem) = 0;
8ded703d 43 virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win);
0092ef0d
DE
44 inline wxTopLevelWindowCocoa* GetWxTopLevelWindowCocoa()
45 { return m_wxTopLevelWindowCocoa; }
720e01c3 46protected:
0092ef0d 47 wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw = NULL);
c6f73d05
DE
48 virtual ~wxCocoaNSWindow();
49 WX_wxNSWindowDelegate m_cocoaDelegate;
0092ef0d 50 wxTopLevelWindowCocoa *m_wxTopLevelWindowCocoa;
fb896a32
DE
51};
52
53#endif // _WX_COCOA_NSWINDOW_H_