+ if ( (int)id == idMenuTitle )
+ {
+ // visually select the menu title
+ SetDefaultMenuItem(GetHmenu(), id);
+ }
+#endif // __WIN32__
+
+ // if we're already attached to the menubar, we must update it
+ if ( IsAttached() && m_menuBar->IsAttached() )
+ {
+ m_menuBar->Refresh();
+ }
+
+ return TRUE;
+}
+
+void wxMenu::EndRadioGroup()
+{
+ // we're not inside a radio group any longer
+ m_startRadioGroup = -1;
+}
+
+bool wxMenu::DoAppend(wxMenuItem *item)
+{
+ wxCHECK_MSG( item, FALSE, _T("NULL item in wxMenu::DoAppend") );
+
+ bool check = FALSE;
+
+ if ( item->GetKind() == wxITEM_RADIO )
+ {
+ int count = GetMenuItemCount();
+
+ if ( m_startRadioGroup == -1 )
+ {
+ // start a new radio group
+ m_startRadioGroup = count;
+
+ // for now it has just one element
+ item->SetAsRadioGroupStart();
+ item->SetRadioGroupEnd(m_startRadioGroup);
+
+ // ensure that we have a checked item in the radio group
+ check = TRUE;
+ }
+ else // extend the current radio group