- for ( int i = 0; i < m_menuCount; i++ )
- {
-// if ( !::AppendMenu((HMENU)m_hMenu, MF_POPUP | MF_STRING,
-// (UINT)m_menus[i]->GetHMenu(),
-// m_titles[i]) )
-// {
-// wxLogLastError("AppendMenu");
-// }
- }
- }
-
- return m_hMenu;
-}
-
-// ---------------------------------------------------------------------------
-// wxMenuBar functions forwarded to wxMenuItem
-// ---------------------------------------------------------------------------
-
-// Must only be used AFTER menu has been attached to frame,
-// otherwise use individual menus to enable/disable items
-void wxMenuBar::Enable(int id, bool enable)
-{
- wxMenu *itemMenu = NULL;
- wxMenuItem *item = FindItemForId(id, &itemMenu) ;
-
- wxCHECK_RET( item, wxT("attempt to enable an item which doesn't exist") );
-
- item->Enable(enable);
-}
-
-void wxMenuBar::EnableTop(int pos, bool enable)
-{
- int flag = 0; // TODO enable ? MF_ENABLED : MF_GRAYED;;
-
-// EnableMenuItem((HMENU)m_hMenu, pos, MF_BYPOSITION | flag);
-}
-
-// Must only be used AFTER menu has been attached to frame,
-// otherwise use individual menus
-void wxMenuBar::Check(int id, bool check)
-{
- wxMenu *itemMenu = NULL;
- wxMenuItem *item = FindItemForId(id, &itemMenu) ;
-
- wxCHECK_RET( item, wxT("attempt to check an item which doesn't exist") );
- wxCHECK_RET( item->IsCheckable(), wxT("attempt to check an uncheckable item") );
-
- item->Check(check);
-}
-
-bool wxMenuBar::IsChecked(int id) const
-{
- wxMenu *itemMenu = NULL;
- wxMenuItem *item = FindItemForId(id, &itemMenu) ;
-
- wxCHECK_MSG( item, FALSE, wxT("wxMenuBar::IsChecked(): no such item") );
-
-// int flag = ::GetMenuState(GetHmenuOf(itemMenu), id, MF_BYCOMMAND);
-
-// return (flag & MF_CHECKED) != 0;
- return FALSE;
-}
-
-bool wxMenuBar::IsEnabled(int id) const
-{
- wxMenu *itemMenu = NULL;
- wxMenuItem *item = FindItemForId(id, &itemMenu) ;
-
- wxCHECK_MSG( item, FALSE, wxT("wxMenuBar::IsEnabled(): no such item") );