• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/src/mac/carbon/

Lines Matching refs:item

46 // Find an item given the Macintosh Menu Reference
87 wxMenuItem *item;
93 item = (wxMenuItem *)node->GetData();
94 subMenu = item->GetSubMenu() ;
99 if ( item->IsSeparator() )
110 entry = wxAcceleratorEntry::Create( item->GetText() ) ;
114 wxIdToMacCommand ( item->GetId() ), 1, NULL, &winListPos);
122 UMAInsertMenuItem(wm, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), insertAfter, entry);
123 SetMenuItemCommandID( wm , insertAfter+1 , wxIdToMacCommand ( item->GetId() ) ) ;
124 SetMenuItemRefCon( wm , insertAfter+1 , (URefCon) item ) ;
203 // function appends a new item or submenu to the menu
204 // append a new item or submenu to the menu
207 wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") );
280 wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
282 wxCHECK_MSG( item, NULL, _T("NULL item in wxMenu::DoAppend") );
286 if ( item->GetKind() == wxITEM_RADIO )
296 item->SetAsRadioGroupStart();
297 item->SetRadioGroupEnd(m_startRadioGroup);
299 // ensure that we have a checked item in the radio group
304 // we need to update its end item
305 item->SetRadioGroupStart(m_startRadioGroup);
314 wxFAIL_MSG( _T("where is the radio group start item?") );
318 else // not a radio item
323 if ( !wxMenuBase::DoAppend(item) || !DoInsertOrAppend(item) )
327 // check the item initially
328 item->Check(true);
330 return item;
333 wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item)
335 if (wxMenuBase::DoInsert(pos, item) && DoInsertOrAppend(item, pos))
336 return item;
341 wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
349 if ( node->GetData() == item )
355 // DoRemove() (unlike Remove) can only be called for existing item!
365 return wxMenuBase::DoRemove(item);
405 // helper functions returning the mac menu position for a certain item, note that this is
406 // mac-wise 1 - based, i.e. the first item has index 1 whereas on MSWin it has pos 0
459 wxMenuItem *item;
463 item = (wxMenuItem *)node->GetData();
464 wxMenu* subMenu = item->GetSubMenu() ;
469 else // normal item
475 if ( item->GetId() == wxApp::s_macAboutMenuItemId ||
477 item->GetId() == wxApp::s_macPreferencesMenuItemId ||
478 item->GetId() == wxApp::s_macExitMenuItemId ) ) )
485 // separate this item from the others, so don't leave
494 // next (i.e. second as we must be first) item is
503 // prev item is a trailing separator we want to hide
529 previousItem = item ;
543 wxMenuItem *item;
547 item = (wxMenuItem *)node->GetData();
548 wxMenu* subMenu = item->GetSubMenu() ;
560 wxInt32 wxMenu::MacHandleCommandProcess( wxMenuItem* item, int id, wxWindow* targetWindow )
563 if (item->IsCheckable())
564 item->Check( !item->IsChecked() ) ;
566 if ( SendEvent( id , item->IsCheckable() ? item->IsChecked() : -1 ) )
574 event.SetInt(item->IsCheckable() ? item->IsChecked() : -1);
583 wxInt32 wxMenu::MacHandleCommandUpdateStatus( wxMenuItem* item, int id, wxWindow* targetWindow )
763 wxMenuItem *item = FindItem( wxApp::s_macPreferencesMenuItemId , NULL ) ;
764 if ( item == NULL || !(item->IsEnabled()) )
770 // Unlike preferences which may or may not exist, the Quit item should be always
772 // a program would be required to add an item with wxID_EXIT in order to get the
773 // Quit menu item to be enabled, which seems a bit burdensome.
776 wxMenuItem *item = FindItem( wxApp::s_macExitMenuItemId , NULL ) ;
777 if ( item != NULL && !(item->IsEnabled()) )
793 wxMenuItem *item;
801 item = (wxMenuItem *)node->GetData();
802 subMenu = item->GetSubMenu() ;
805 UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding() );
811 if ( item->GetId() != wxApp::s_macAboutMenuItemId )
824 if ( item->IsSeparator() )
833 entry = wxAcceleratorEntry::Create( item->GetText() ) ;
835 if ( item->GetId() == wxApp::s_macAboutMenuItemId )
843 UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
845 SetMenuItemCommandID( mh , position, wxIdToMacCommand ( item->GetId() ) );
846 SetMenuItemRefCon( mh , position, (URefCon) item );
847 item->DoUpdateItemBitmap( mh, position );
895 // take care of the about menu item wherever it is
1185 // Find the itemString in menuString, and return the item id or wxNOT_FOUND
1206 wxMenuItem *item = NULL;
1208 for ( size_t i = 0; !item && (i < count); i++ )
1209 item = _wxMenuAt(m_menus, i)->FindItem(id, itemMenu);
1211 return item;