]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/NSMenu.h
tell user to define _USE_OLD_RW_STL for BC5.6 instead of refusing to compile with...
[wxWidgets.git] / include / wx / cocoa / NSMenu.h
index 354d4738d4da72b599dfc2571c836aa002ee7cfb..6438f1e02d1b75a9f511a4945b5527bea05b2706 100644 (file)
@@ -23,7 +23,27 @@ WX_DECLARE_OBJC_HASHMAP(NSMenu);
 
 class wxCocoaNSMenu
 {
 
 class wxCocoaNSMenu
 {
-    WX_DECLARE_OBJC_INTERFACE(NSMenu)
+    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
+    };
+    virtual void Cocoa_dealloc() {}
+    virtual void CocoaNotification_menuDidAddItem(WX_NSNotification WXUNUSED(notification)) {}
+    virtual void CocoaNotification_menuDidChangeItem(WX_NSNotification WXUNUSED(notification)) {}
+    virtual void CocoaNotification_menuDidRemoveItem(WX_NSNotification WXUNUSED(notification)) {}
+    virtual void CocoaNotification_menuDidSendAction(WX_NSNotification WXUNUSED(notification)) {}
+    virtual void CocoaNotification_menuWillSendAction(WX_NSNotification WXUNUSED(notification)) {}
+    virtual ~wxCocoaNSMenu() { }
+
+protected:
+    static struct objc_object *sm_cocoaObserver;
 };
 
 #endif // _WX_COCOA_NSMENU_H_
 };
 
 #endif // _WX_COCOA_NSMENU_H_