2003-03-21 14:51:47 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/cocoa/NSMenu.h
|
|
|
|
// Purpose: wxCocoaNSMenu class
|
|
|
|
// Author: David Elliott
|
|
|
|
// Modified by:
|
|
|
|
// Created: 2002/12/09
|
2003-09-05 10:00:53 -04:00
|
|
|
// RCS-ID: $Id$
|
2003-03-21 14:51:47 -05:00
|
|
|
// Copyright: (c) 2002 David Elliott
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2003-03-21 14:51:47 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_COCOA_NSMENU_H__
|
|
|
|
#define __WX_COCOA_NSMENU_H__
|
|
|
|
|
|
|
|
#include "wx/hashmap.h"
|
2003-04-19 13:51:50 -04:00
|
|
|
#include "wx/cocoa/ObjcAssociate.h"
|
2003-03-21 14:51:47 -05:00
|
|
|
|
|
|
|
WX_DECLARE_OBJC_HASHMAP(NSMenu);
|
|
|
|
|
|
|
|
// ========================================================================
|
|
|
|
// wxCocoaNSMenu
|
|
|
|
// ========================================================================
|
|
|
|
|
|
|
|
class wxCocoaNSMenu
|
|
|
|
{
|
2003-09-05 10:50:31 -04:00
|
|
|
WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSMenu)
|
|
|
|
public:
|
|
|
|
void AssociateNSMenu(WX_NSMenu cocoaNSMenu, unsigned int flags = 0);
|
|
|
|
void DisassociateNSMenu(WX_NSMenu cocoaNSMenu);
|
|
|
|
enum
|
|
|
|
{ OBSERVE_DidAddItem = 0x01
|
|
|
|
, OBSERVE_DidChangeItem = 0x02
|
|
|
|
, OBSERVE_DidRemoveItem = 0x04
|
|
|
|
, OBSERVE_DidSendAction = 0x08
|
|
|
|
, OBSERVE_WillSendAction = 0x10
|
|
|
|
};
|
2003-09-05 11:29:17 -04:00
|
|
|
virtual void CocoaNotification_menuDidAddItem(WX_NSNotification notification) {}
|
|
|
|
virtual void CocoaNotification_menuDidChangeItem(WX_NSNotification notification) {}
|
|
|
|
virtual void CocoaNotification_menuDidRemoveItem(WX_NSNotification notification) {}
|
|
|
|
virtual void CocoaNotification_menuDidSendAction(WX_NSNotification notification) {}
|
|
|
|
virtual void CocoaNotification_menuWillSendAction(WX_NSNotification notification) {}
|
2003-09-05 10:50:31 -04:00
|
|
|
protected:
|
|
|
|
static struct objc_object *sm_cocoaObserver;
|
2003-03-21 14:51:47 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_COCOA_NSMENU_H_
|