]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/NSButton.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / cocoa / NSButton.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/NSButton.h
3 // Purpose: wxCocoaNSButton class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2002/12/09
7 // Copyright: (c) 2002-2004 David Elliott
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_COCOA_NSBUTTON_H__
12 #define _WX_COCOA_NSBUTTON_H__
13
14 #include "wx/hashmap.h"
15 #include "wx/cocoa/ObjcAssociate.h"
16 #include "wx/cocoa/ObjcRef.h"
17
18 WX_DECLARE_OBJC_HASHMAP(NSButton);
19
20 class wxCocoaNSButton
21 {
22 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSButton);
23 public:
24 void AssociateNSButton(WX_NSButton cocoaNSButton);
25 void DisassociateNSButton(WX_NSButton cocoaNSButton)
26 {
27 if(cocoaNSButton)
28 sm_cocoaHash.erase(cocoaNSButton);
29 }
30
31 virtual void Cocoa_wxNSButtonAction(void) = 0;
32 virtual ~wxCocoaNSButton() { }
33
34 protected:
35 static const wxObjcAutoRefFromAlloc<struct objc_object*> sm_cocoaTarget;
36 };
37
38 #endif // _WX_COCOA_NSBUTTON_H__