#include "wx/wxprec.h"
+#if wxUSE_MENUS
+
#include "wx/menu.h"
#ifndef WX_PRECOMP
m_startRadioGroup = -1;
m_allowRearrange = true;
m_noEventsMode = false;
-
+
m_peer = wxMenuImpl::Create( this, wxStripMenuCodes(m_title) );
pSubMenu->DoRearrange();
}
else
- {
+ {
if ( pItem->GetId() == idMenuTitle )
pItem->GetMenu()->Enable( idMenuTitle, false );
}
wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
{
- wxCHECK_MSG( item, NULL, _T("NULL item in wxMenu::DoAppend") );
+ wxCHECK_MSG( item, NULL, wxT("NULL item in wxMenu::DoAppend") );
bool check = false;
}
else
{
- wxFAIL_MSG( _T("where is the radio group start item?") );
+ wxFAIL_MSG( wxT("where is the radio group start item?") );
}
}
}
{
if ( !AllowRearrange() )
return;
-
+
wxMenuItem* previousItem = NULL ;
size_t pos ;
wxMenuItemList::compatibility_iterator node;
{
// next (i.e. second as we must be first) item is
// the separator to hide
- wxASSERT_MSG( pos == 0, _T("should be the menu start") );
+ wxASSERT_MSG( pos == 0, wxT("should be the menu start") );
sepToHide = next;
}
else if ( GetMenuItems().GetCount() == pos + 1 &&
{
if ( s_macInstalledMenuBar == this )
return ;
-
+
m_rootMenu->GetPeer()->MakeRoot();
// DisableMenuCommand( NULL , kHICommandPreferences ) ;
#if 0
subMenu = item->GetSubMenu() ;
if (subMenu)
{
- // we don't support hierarchical menus in the help menu yet
+ UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding() );
+ MenuItemIndex position = CountMenuItems(mh);
+ ::SetMenuItemHierarchicalMenu(mh, position, MAC_WXHMENU(subMenu->GetHMenu()));
}
else
{
void wxMenuBar::EnableTop(size_t pos, bool enable)
{
wxCHECK_RET( IsAttached(), wxT("doesn't work with unattached menubars") );
-
+
m_rootMenu->FindItemByPosition( pos )->Enable(enable);
Refresh();
return false;
m_titles.Insert(title, pos);
-
+
m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) );
if (m_invokingWindow)
{
m_invokingWindow = frame;
wxMenubarSetInvokingWindow(m_appleMenu, frame);
-
+
wxMenu *menu;
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
return item;
}
+
+#endif