]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/menuitem.mm
don't allocate system fonts/colours dynamically
[wxWidgets.git] / src / cocoa / menuitem.mm
index ba92f411a82411b18362aec801eb98b2f586e687..67af3fde333ba7e0ee6be9663ec6a644ad0f823c 100644 (file)
@@ -47,6 +47,7 @@
 }
 
 - (void)wxMenuItemAction: (id)sender;
+- (BOOL)validateMenuItem: (id)menuItem;
 @end //interface wxNSMenuItemTarget
 
 @implementation wxNSMenuItemTarget : NSObject
     }
 }
 
+- (BOOL)validateMenuItem: (id)menuItem
+{
+    // TODO: Do wxWindows validation here and avoid sending during idle time
+    wxLogDebug("wxMenuItemAction");
+    wxMenuItem *item = wxMenuItem::GetFromCocoa(menuItem);
+    wxCHECK_MSG(item,NO,"validateMenuItem received but no wxMenuItem exists!");
+    return item->IsEnabled();
+}
+
 @end //implementation wxNSMenuItemTarget
 
 // ============================================================================