2003-03-21 14:51:47 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/cocoa/NSButton.h
|
|
|
|
// Purpose: wxCocoaNSButton class
|
|
|
|
// Author: David Elliott
|
|
|
|
// Modified by:
|
|
|
|
// Created: 2002/12/09
|
2004-06-24 11:14:33 -04:00
|
|
|
// Copyright: (c) 2002-2004 David Elliott
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2003-03-21 14:51:47 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2004-06-24 11:14:33 -04:00
|
|
|
#ifndef _WX_COCOA_NSBUTTON_H__
|
|
|
|
#define _WX_COCOA_NSBUTTON_H__
|
2003-03-21 14:51:47 -05:00
|
|
|
|
|
|
|
#include "wx/hashmap.h"
|
2003-04-19 13:51:50 -04:00
|
|
|
#include "wx/cocoa/ObjcAssociate.h"
|
2004-06-24 11:14:33 -04:00
|
|
|
#include "wx/cocoa/ObjcRef.h"
|
2003-03-21 14:51:47 -05:00
|
|
|
|
|
|
|
WX_DECLARE_OBJC_HASHMAP(NSButton);
|
|
|
|
|
|
|
|
class wxCocoaNSButton
|
|
|
|
{
|
|
|
|
WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSButton);
|
|
|
|
public:
|
|
|
|
void AssociateNSButton(WX_NSButton cocoaNSButton);
|
2006-03-12 10:10:23 -05:00
|
|
|
void DisassociateNSButton(WX_NSButton cocoaNSButton)
|
2003-03-21 14:51:47 -05:00
|
|
|
{
|
2003-07-11 13:47:57 -04:00
|
|
|
if(cocoaNSButton)
|
|
|
|
sm_cocoaHash.erase(cocoaNSButton);
|
2003-03-21 14:51:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Cocoa_wxNSButtonAction(void) = 0;
|
2006-03-12 10:10:23 -05:00
|
|
|
virtual ~wxCocoaNSButton() { }
|
|
|
|
|
2004-06-24 11:14:33 -04:00
|
|
|
protected:
|
|
|
|
static const wxObjcAutoRefFromAlloc<struct objc_object*> sm_cocoaTarget;
|
2003-03-21 14:51:47 -05:00
|
|
|
};
|
|
|
|
|
2004-06-24 11:14:33 -04:00
|
|
|
#endif // _WX_COCOA_NSBUTTON_H__
|