]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/menuitem.h
Adapted to API changes with respect to GetTextExtent (patch #1709152).
[wxWidgets.git] / include / wx / menuitem.h
index 2a619da62330dcb4feb8cd3e7ca01018370ce7ad..23429ed8a2adc47a762bcc856a717adc0342edd7 100644 (file)
@@ -108,9 +108,11 @@ public:
     virtual void SetAccel(wxAcceleratorEntry *accel);
 #endif // wxUSE_ACCEL
 
+#if WXWIN_COMPATIBILITY_2_8
     // compatibility only, use new functions in the new code
-    void SetName(const wxString& str) { SetText(str); }
-    const wxString& GetName() const { return GetText(); }
+    wxDEPRECATED( void SetName(const wxString& str) );
+    wxDEPRECATED( const wxString& GetName() const );
+#endif // WXWIN_COMPATIBILITY_2_8
 
     static wxMenuItem *New(wxMenu *parentMenu,
                            int itemid,
@@ -148,6 +150,13 @@ private:
     wxMenuItemBase& operator=(const wxMenuItemBase& item);
 };
 
+#if WXWIN_COMPATIBILITY_2_8
+inline void wxMenuItemBase::SetName(const wxString &str)
+    { SetText(str); }
+inline const wxString& wxMenuItemBase::GetName() const
+    { return GetText(); }
+#endif // WXWIN_COMPATIBILITY_2_8
+
 // ----------------------------------------------------------------------------
 // include the real class declaration
 // ----------------------------------------------------------------------------