X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb896a322a2ed53d393ee738765ddd3f72cee004..a6fc611aa1fe1b5880e9e5489c5b5b3a25d61be9:/src/cocoa/NSControl.mm diff --git a/src/cocoa/NSControl.mm b/src/cocoa/NSControl.mm index 01bd97f297..53d42d1697 100644 --- a/src/cocoa/NSControl.mm +++ b/src/cocoa/NSControl.mm @@ -19,12 +19,39 @@ #include "wx/wxprec.h" #ifndef WX_PRECOMP + #include "wx/log.h" #endif // WX_PRECOMP #include "wx/cocoa/NSControl.h" -// ---------------------------------------------------------------------------- -// globals -// ---------------------------------------------------------------------------- +#import + +// ============================================================================ +// @class wxNSControlTarget +// ============================================================================ +@interface wxNSControlTarget : NSObject +{ +} + +- (void)wxNSControlAction: (id)sender; +@end //interface wxNSControlTarget + +@implementation wxNSControlTarget : NSObject + +- (void)wxNSControlAction: (id)sender +{ + wxLogDebug("wxNSControlAction"); + wxCocoaNSControl *wxcontrol = wxCocoaNSControl::GetFromCocoa(sender); + wxCHECK_RET(wxcontrol,"wxNSControlAction received but no wxCocoaNSControl exists!"); + wxcontrol->CocoaTarget_action(); +} + +@end //implementation wxNSControlTarget + +// ============================================================================ +// wxNSControl +// ============================================================================ WX_IMPLEMENT_OBJC_INTERFACE(NSControl) +struct objc_object *wxCocoaNSControl::sm_cocoaTarget = [[wxNSControlTarget alloc] init]; +