- // if we just appended the title, highlight it
-#ifdef __WIN32__
- if ( (int)id == idMenuTitle )
+ GetMenuBar()->Refresh();
+ }
+
+ return true;
+} // end of wxMenu::DoInsertOrAppend
+
+void wxMenu::EndRadioGroup()
+{
+ //
+ // We're not inside a radio group any longer
+ //
+ m_nStartRadioGroup = -1;
+} // end of wxMenu::EndRadioGroup
+
+wxMenuItem* wxMenu::DoAppend( wxMenuItem* pItem )
+{
+ wxCHECK_MSG( pItem, NULL, wxT("NULL item in wxMenu::DoAppend") );
+
+ bool bCheck = false;
+
+ if (pItem->GetKind() == wxITEM_RADIO)
+ {
+ int nCount = GetMenuItemCount();
+
+ if (m_nStartRadioGroup == -1)
+ {
+ //
+ // Start a new radio group
+ //
+ m_nStartRadioGroup = nCount;
+
+ //
+ // For now it has just one element
+ //
+ pItem->SetAsRadioGroupStart();
+ pItem->SetRadioGroupEnd(m_nStartRadioGroup);
+
+ //
+ // Ensure that we have a checked item in the radio group
+ //
+ bCheck = true;
+ }
+ else // extend the current radio group