]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/menuitem.h
don't deprecate the entire wxDrawObject class, this results in warnings when we just...
[wxWidgets.git] / include / wx / cocoa / menuitem.h
index b312bc7489b1589d8820be5a601787e9850d79da..01e3f5133610254ee412086d03dad6b146d58b46 100644 (file)
@@ -4,9 +4,9 @@
 // Author:      David Elliott
 // Modified by:
 // Created:     2002/12/13
-// RCS-ID:      $Id
+// RCS-ID:      $Id$
 // Copyright:   (c) 2002 David Elliott
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_COCOA_MENUITEM_H_
@@ -15,6 +15,8 @@
 #include "wx/hashmap.h"
 #include "wx/bitmap.h"
 
+#include "wx/cocoa/ObjcRef.h"
+
 // ========================================================================
 // wxMenuItem
 // ========================================================================
 class wxMenuItemCocoa;
 WX_DECLARE_HASH_MAP(WX_NSMenuItem,wxMenuItem*,wxPointerHash,wxPointerEqual,wxMenuItemCocoaHash);
 
-class WXDLLEXPORT wxMenuItemCocoa : public wxMenuItemBase
+class WXDLLIMPEXP_CORE wxMenuItemCocoa : public wxMenuItemBase
 {
 public:
 // ------------------------------------------------------------------------
 // initialization
 // ------------------------------------------------------------------------
-    wxMenuItemCocoa(wxMenu *parentMenu = (wxMenu *)NULL,
+    wxMenuItemCocoa(wxMenu *parentMenu = NULL,
                int id = wxID_SEPARATOR,
                const wxString& name = wxEmptyString,
                const wxString& help = wxEmptyString,
                wxItemKind kind = wxITEM_NORMAL,
-               wxMenu *subMenu = (wxMenu *)NULL);
+               wxMenu *subMenu = NULL);
     virtual ~wxMenuItemCocoa();
 
 // ------------------------------------------------------------------------
@@ -49,16 +51,19 @@ public:
             return iter->second;
         return NULL;
     }
+    void CocoaItemSelected();
+    bool Cocoa_validateMenuItem();
 protected:
+    void CocoaSetKeyEquivalent();
     WX_NSMenuItem m_cocoaNSMenuItem;
     static wxMenuItemCocoaHash sm_cocoaHash;
-    static struct objc_object *sm_cocoaTarget;
+    static wxObjcAutoRefFromAlloc<struct objc_object *> sm_cocoaTarget;
 // ------------------------------------------------------------------------
 // Implementation
 // ------------------------------------------------------------------------
 public:
     // override base class virtuals to update the item appearance on screen
-    virtual void SetText(const wxString& text);
+    virtual void SetItemLabel(const wxString& text);
     virtual void SetCheckable(bool checkable);
 
     virtual void Enable(bool enable = TRUE);