+ 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
+ {
+ //
+ // We need to update its end item
+ //
+ pItem->SetRadioGroupStart(m_nStartRadioGroup);
+
+ wxMenuItemList::Node* pNode = GetMenuItems().Item(m_nStartRadioGroup);
+
+ if (pNode)
+ {
+ pNode->GetData()->SetRadioGroupEnd(nCount);
+ }
+ else
+ {
+ wxFAIL_MSG( _T("where is the radio group start item?") );
+ }
+ }
+ }
+ else // not a radio item
+ {
+ EndRadioGroup();
+ }
+
+ if (!wxMenuBase::DoAppend(pItem) || !DoInsertOrAppend(pItem))
+ {
+ return FALSE;
+ }
+ if (bCheck)
+ {
+ //
+ // Check the item initially
+ //
+ pItem->Check(TRUE);
+ }
+ return TRUE;
+} // end of wxMenu::DoAppend
+
+bool wxMenu::DoInsert(
+ size_t nPos
+, wxMenuItem* pItem
+)
+{
+ return ( wxMenuBase::DoInsert( nPos
+ ,pItem) &&
+ DoInsertOrAppend( pItem
+ ,nPos
+ )
+ );
+} // end of wxMenu::DoInsert
+
+wxMenuItem* wxMenu::DoRemove(
+ wxMenuItem* pItem
+)