- wxCHECK_MSG( menu, FALSE, wxT("invalid menu") );
- wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), FALSE,
+ return Insert(GetMenuCount(), menu, title);
+}
+
+bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
+{
+ wxCHECK_MSG( pos <= GetMenuCount(), false, wxT("invalid position") );
+ wxCHECK_MSG( menu, false, wxT("invalid menu") );
+ wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), false,