+ return text;
+}
+
+wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
+{
+ return wxAcceleratorEntry::Create(label);
+}
+
+#endif // wxUSE_ACCEL
+
+
+// ----------------------------------------------------------------------------
+// wxMenuItem
+// ----------------------------------------------------------------------------
+
+wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu,
+ int id,
+ const wxString& text,
+ const wxString& help,
+ wxItemKind kind,
+ wxMenu *subMenu)
+{
+ wxASSERT_MSG( parentMenu != NULL, wxT("menuitem should have a menu") );
+
+ m_parentMenu = parentMenu;
+ m_subMenu = subMenu;
+ m_isEnabled = true;
+ m_isChecked = false;
+ m_id = id;
+ m_kind = kind;
+ if (m_id == wxID_ANY)
+ m_id = wxNewId();
+ if (m_id == wxID_SEPARATOR)
+ m_kind = wxITEM_SEPARATOR;
+
+ SetText(text);
+ SetHelp(help);
+}
+
+wxMenuItemBase::~wxMenuItemBase()
+{
+ delete m_subMenu;
+}
+
+#if wxUSE_ACCEL
+
+wxAcceleratorEntry *wxMenuItemBase::GetAccel() const
+{
+ return wxAcceleratorEntry::Create(GetText());
+}
+
+void wxMenuItemBase::SetAccel(wxAcceleratorEntry *accel)
+{
+ wxString text = m_text.BeforeFirst(wxT('\t'));
+ if ( accel )
+ {
+ text += wxT('\t');
+ text += accel->ToString();
+ }
+