]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/NSWindow.h
remove unused wxAppTraits-related files
[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
1c4e8f38 7// RCS-ID: $Id$
fb896a32 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
b5dbe15d
VS
20class WXDLLIMPEXP_FWD_CORE wxMenuBar;
21class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowCocoa;
360be3c0 22
7dd8b1ea 23DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
c6f73d05
DE
24DECLARE_WXCOCOA_OBJC_CLASS(wxNSWindowDelegate);
25
8da116cf 26class WXDLLIMPEXP_CORE wxCocoaNSWindow
fb896a32
DE
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);
8e33de15 33 virtual bool Cocoa_canBecomeKeyWindow(bool &WXUNUSED(canBecome))
3d012d1b 34 { return false; }
8e33de15 35 virtual bool Cocoa_canBecomeMainWindow(bool &WXUNUSED(canBecome))
8fc821cc 36 { return false; }
aa992c59 37 virtual bool CocoaDelegate_windowShouldClose(void) = 0;
9692f42b 38 virtual void CocoaDelegate_windowWillClose(void) = 0;
aa992c59
DE
39 virtual void CocoaDelegate_windowDidBecomeKey(void) { }
40 virtual void CocoaDelegate_windowDidResignKey(void) { }
8fc821cc
DE
41 virtual void CocoaDelegate_windowDidBecomeMain(void) { }
42 virtual void CocoaDelegate_windowDidResignMain(void) { }
7dd8b1ea
DE
43 virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem) = 0;
44 virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem) = 0;
8ded703d 45 virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win);
0092ef0d
DE
46 inline wxTopLevelWindowCocoa* GetWxTopLevelWindowCocoa()
47 { return m_wxTopLevelWindowCocoa; }
720e01c3 48protected:
0092ef0d 49 wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw = NULL);
c6f73d05
DE
50 virtual ~wxCocoaNSWindow();
51 WX_wxNSWindowDelegate m_cocoaDelegate;
0092ef0d 52 wxTopLevelWindowCocoa *m_wxTopLevelWindowCocoa;
fb896a32
DE
53};
54
55#endif // _WX_COCOA_NSWINDOW_H_