]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/NSButton.h
wxPyDataObjectSimple::SetData should not be const
[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 // RCS-ID: $Id$
8 // Copyright: (c) 2002-2004 David Elliott
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COCOA_NSBUTTON_H__
13 #define _WX_COCOA_NSBUTTON_H__
14
15 #include "wx/hashmap.h"
16 #include "wx/cocoa/ObjcAssociate.h"
17 #include "wx/cocoa/ObjcRef.h"
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 void DisassociateNSButton(WX_NSButton cocoaNSButton)
27 {
28 if(cocoaNSButton)
29 sm_cocoaHash.erase(cocoaNSButton);
30 }
31
32 virtual void Cocoa_wxNSButtonAction(void) = 0;
33 virtual ~wxCocoaNSButton() { }
34
35 protected:
36 static const wxObjcAutoRefFromAlloc<struct objc_object*> sm_cocoaTarget;
37 };
38
39 #endif // _WX_COCOA_NSBUTTON_H__