]>
Commit | Line | Data |
---|---|---|
fb896a32 DE |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/cocoa/NSButton.h | |
3 | // Purpose: wxCocoaNSButton class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2002/12/09 | |
feb82768 DE |
7 | // RCS-ID: $Id$ |
8 | // Copyright: (c) 2002-2004 David Elliott | |
65571936 | 9 | // Licence: wxWindows licence |
fb896a32 DE |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
feb82768 DE |
12 | #ifndef _WX_COCOA_NSBUTTON_H__ |
13 | #define _WX_COCOA_NSBUTTON_H__ | |
fb896a32 DE |
14 | |
15 | #include "wx/hashmap.h" | |
e6686511 | 16 | #include "wx/cocoa/ObjcAssociate.h" |
feb82768 | 17 | #include "wx/cocoa/ObjcRef.h" |
fb896a32 DE |
18 | |
19 | WX_DECLARE_OBJC_HASHMAP(NSButton); | |
20 | ||
21 | class wxCocoaNSButton | |
22 | { | |
23 | WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSButton); | |
24 | public: | |
25 | void AssociateNSButton(WX_NSButton cocoaNSButton); | |
26 | inline void DisassociateNSButton(WX_NSButton cocoaNSButton) | |
27 | { | |
bac6f234 DE |
28 | if(cocoaNSButton) |
29 | sm_cocoaHash.erase(cocoaNSButton); | |
fb896a32 DE |
30 | } |
31 | ||
fb896a32 | 32 | virtual void Cocoa_wxNSButtonAction(void) = 0; |
feb82768 DE |
33 | protected: |
34 | static const wxObjcAutoRefFromAlloc<struct objc_object*> sm_cocoaTarget; | |
fb896a32 DE |
35 | }; |
36 | ||
feb82768 | 37 | #endif // _WX_COCOA_NSBUTTON_H__ |