]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/NSApplication.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / cocoa / NSApplication.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/NSApplication.h
3// Purpose: wxNSApplicationDelegate definition
4// Author: David Elliott
5// Modified by:
6// Created: 2004/01/26
7// Copyright: (c) 2003,2004 David Elliott
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_COCOA_NSAPPLICATION_H__
12#define _WX_COCOA_NSAPPLICATION_H__
13
14#include "wx/cocoa/objc/objc_uniquifying.h"
15
16// ========================================================================
17// wxNSApplicationDelegate
18// ========================================================================
19/*!
20 @class wxNSApplicationDelegate
21 @discussion Implements an NSApplication delegate which can respond to messages sent by Cocoa to change Cocoa's behaviour.
22
23 wxCocoa will set a singleton instance of this class as the NSApplication delegate upon startup unless wxWidgets is running
24 in a "plugin" manner in which case it would not be appropriate to do this.
25
26 Although Cocoa will send notifications to the delegate it is also possible to register a different object to listen for
27 them. Because we want to support the plugin case, we use a separate notification observer object when we can.
28*/
29@interface wxNSApplicationDelegate : NSObject
30{
31}
32
33// Delegate methods
34- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
35@end // interface wxNSApplicationDelegate : NSObject
36WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationDelegate,NSObject)
37
38// ========================================================================
39// wxNSApplicationObserver
40// ========================================================================
41/*!
42 @class wxNSApplicationObserver
43 @discussion Observes most notifications sent by the NSApplication singleton.
44
45 wxCocoa will create a singleton instance of this class upon startup and register it with the default notification center to
46 listen for several events sent by the NSApplication singleton.
47
48 Because there can be any number of notification observers, this method allows wxCocoa to function properly even when it is
49 running as a plugin of some other (most likely not wxWidgets) application.
50*/
51@interface wxNSApplicationObserver : NSObject
52{
53}
54
55// Methods defined as (but not used here) as NSApplication delegate methods.
56- (void)applicationWillBecomeActive:(NSNotification *)notification;
57- (void)applicationDidBecomeActive:(NSNotification *)notification;
58- (void)applicationWillResignActive:(NSNotification *)notification;
59- (void)applicationDidResignActive:(NSNotification *)notification;
60- (void)applicationWillUpdate:(NSNotification *)notification;
61
62// Other notifications
63- (void)controlTintChanged:(NSNotification *)notification;
64@end // interface wxNSApplicationObserver : NSObject
65WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationObserver,NSObject)
66
67#endif //ndef _WX_COCOA_NSAPPLICATION_H__