1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/NSControl.cpp
3 // Purpose: wxCocoaNSControl
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #include "wx/wxprec.h"
25 #include "wx/cocoa/NSControl.h"
27 #import <Foundation/NSObject.h>
29 // ============================================================================
30 // @class wxNSControlTarget
31 // ============================================================================
32 @interface wxNSControlTarget : NSObject
36 - (void)wxNSControlAction: (id)sender;
37 @end //interface wxNSControlTarget
39 @implementation wxNSControlTarget : NSObject
41 - (void)wxNSControlAction: (id)sender
43 wxLogDebug(wxT("wxNSControlAction"));
44 wxCocoaNSControl *wxcontrol = wxCocoaNSControl::GetFromCocoa(sender);
45 wxCHECK_RET(wxcontrol,wxT("wxNSControlAction received but no wxCocoaNSControl exists!"));
46 wxcontrol->CocoaTarget_action();
49 @end //implementation wxNSControlTarget
51 // ============================================================================
53 // ============================================================================
54 WX_IMPLEMENT_OBJC_INTERFACE(NSControl)
56 struct objc_object *wxCocoaNSControl::sm_cocoaTarget = [[wxNSControlTarget alloc] init];