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