X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b3dc8019a520ce5e166c8ae9098ba020f8b3f94..1fdce0aeb9c0411184c786bfffc7c47900834c63:/src/palmos/menuitem.cpp diff --git a/src/palmos/menuitem.cpp b/src/palmos/menuitem.cpp index 111a44c494..228183be23 100644 --- a/src/palmos/menuitem.cpp +++ b/src/palmos/menuitem.cpp @@ -32,7 +32,6 @@ #include "wx/font.h" #include "wx/bitmap.h" #include "wx/settings.h" - #include "wx/font.h" #include "wx/window.h" #include "wx/accel.h" #include "wx/string.h" @@ -59,53 +58,6 @@ // implementation // ============================================================================ -// ---------------------------------------------------------------------------- -// dynamic classes implementation -// ---------------------------------------------------------------------------- - -#if wxUSE_EXTENDED_RTTI - -bool wxMenuItemStreamingCallback( const wxObject *object, wxWriter * , wxPersister * , wxxVariantArray & ) -{ - const wxMenuItem * mitem = dynamic_cast(object) ; - if ( mitem->GetMenu() && !mitem->GetMenu()->GetTitle().empty() ) - { - // we don't stream out the first two items for menus with a title, they will be reconstructed - if ( mitem->GetMenu()->FindItemByPosition(0) == mitem || mitem->GetMenu()->FindItemByPosition(1) == mitem ) - return false ; - } - return true ; -} - -wxBEGIN_ENUM( wxItemKind ) - wxENUM_MEMBER( wxITEM_SEPARATOR ) - wxENUM_MEMBER( wxITEM_NORMAL ) - wxENUM_MEMBER( wxITEM_CHECK ) - wxENUM_MEMBER( wxITEM_RADIO ) -wxEND_ENUM( wxItemKind ) - -IMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuItem, wxObject,"wx/menuitem.h",wxMenuItemStreamingCallback) - -wxBEGIN_PROPERTIES_TABLE(wxMenuItem) - wxPROPERTY( Parent,wxMenu*, SetMenu, GetMenu, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Id,int, SetId, GetId, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Text, wxString , SetText, GetText, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Help, wxString , SetHelp, GetHelp, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxREADONLY_PROPERTY( Kind, wxItemKind , GetKind , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( SubMenu,wxMenu*, SetSubMenu, GetSubMenu, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Enabled , bool , Enable , IsEnabled , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Checked , bool , Check , IsChecked , wxxVariant((bool)false) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Checkable , bool , SetCheckable , IsCheckable , wxxVariant((bool)false) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) -wxEND_PROPERTIES_TABLE() - -wxBEGIN_HANDLERS_TABLE(wxMenuItem) -wxEND_HANDLERS_TABLE() - -wxDIRECT_CONSTRUCTOR_6( wxMenuItem , wxMenu* , Parent , int , Id , wxString , Text , wxString , Help , wxItemKind , Kind , wxMenu* , SubMenu ) -#else -IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) -#endif - // ---------------------------------------------------------------------------- // wxMenuItem // ---------------------------------------------------------------------------- @@ -159,12 +111,6 @@ bool wxMenuItem::IsChecked() const return false; } -/* static */ -wxString wxMenuItemBase::GetLabelFromText(const wxString& text) -{ - return wxStripMenuCodes(text); -} - // radio group stuff // ----------------- @@ -191,7 +137,7 @@ void wxMenuItem::Check(bool check) { } -void wxMenuItem::SetText(const wxString& text) +void wxMenuItem::SetItemLabel(const wxString& text) { }