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

Lines Matching refs:item

132     // override the base class version to select the first item initially
148 // get the currently selected item (may be NULL)
154 // find the menu item at given position
157 // refresh the given item
158 void RefreshItem(wxMenuItem *item);
160 // preselect the first item
192 // reset the current item and node
195 // set the current node and item without refreshing anything
198 // change the current item refreshing the old and new items
201 // activate item, i.e. call either ClickItem() or OpenSubmenu() depending
204 bool ActivateItem(wxMenuItem *item, InputMethod how = WithKeyboard);
206 // send the event about the item click
207 void ClickItem(wxMenuItem *item);
209 // show the submenu for this item
210 void OpenSubmenu(wxMenuItem *item, InputMethod how = WithKeyboard);
213 bool CanOpen(wxMenuItem *item)
215 return item && item->IsEnabled() && item->IsSubMenu();
244 // the menu node corresponding to the current item
339 // wxPopupMenuWindow current item/node handling
362 wxMenuItem *item = nodeOldCurrent->GetData();
363 wxCHECK_RET( item, _T("no current item?") );
366 if ( item->IsSubMenu() && item->GetSubMenu()->IsShown() )
368 item->GetSubMenu()->Dismiss();
372 RefreshItem(item);
432 // check that the current item had been properly reset before
435 _T("menu current item preselected incorrectly") );
472 wxMenuItem *item = GetCurrentItem();
473 wxCHECK_RET( item && item->IsSubMenu(), _T("where is our open submenu?") );
475 wxPopupMenuWindow *win = item->GetSubMenu()->m_popupMenu;
526 wxMenuItem *item = node->GetData();
527 y += item->GetHeight();
543 void wxPopupMenuWindow::RefreshItem(wxMenuItem *item)
545 wxCHECK_RET( item, _T("can't refresh NULL item") );
550 RefreshRect(wxRect(0, item->GetPosition() - 1,
551 m_menu->GetGeometryInfo().GetSize().x, item->GetHeight()));
574 wxMenuItem *item = node->GetData();
576 if ( item->IsSeparator() )
583 if ( item->IsCheckable() )
587 if ( item->IsChecked() )
593 if ( !item->IsEnabled() )
596 if ( item->IsSubMenu() )
599 if ( item == GetCurrentItem() )
604 if ( !item->IsEnabled() )
606 bmp = item->GetDisabledBitmap();
611 // strangely enough, for unchecked item we use the
614 bmp = item->GetBitmap(!item->IsCheckable() || item->IsChecked());
622 item->GetLabel(),
623 item->GetAccelString(),
626 item->GetAccelIndex()
630 y += item->GetHeight();
638 void wxPopupMenuWindow::ClickItem(wxMenuItem *item)
640 wxCHECK_RET( item, _T("can't click NULL item") );
642 wxASSERT_MSG( !item->IsSeparator() && !item->IsSubMenu(),
643 _T("can't click this item") );
650 menu->ClickItem(item);
653 void wxPopupMenuWindow::OpenSubmenu(wxMenuItem *item, InputMethod how)
655 wxCHECK_RET( item, _T("can't open NULL submenu") );
657 wxMenu *submenu = item->GetSubMenu();
661 submenu->Popup(ClientToScreen(wxPoint(0, item->GetPosition())),
663 how == WithKeyboard /* preselect first item then */);
668 bool wxPopupMenuWindow::ActivateItem(wxMenuItem *item, InputMethod how)
671 if ( !item || !item->IsEnabled() )
678 if ( item->IsSubMenu() )
680 OpenSubmenu(item, how);
682 else if ( !item->IsSeparator() )
684 ClickItem(item);
702 // don't want to do it: if the mouse was clicked on the parent submenu item
774 wxMenuItem *item = GetCurrentItem();
775 if ( CanOpen(item) )
777 OpenSubmenu(item, WithMouse);
780 //else: same item, nothing to do
782 else // not on an item
785 // parent, so if the mouse moves to another item of the parent menu,
786 // this menu is closed and this other item is selected - in the similar
836 wxMenuItem *item = GetCurrentItem();
837 wxCHECK_RET( CanOpen(item), _T("where is our open submenu?") );
839 wxPopupMenuWindow *win = item->GetSubMenu()->m_popupMenu;
878 wxMenuItem *item = GetCurrentItem();
885 wxCHECK_MSG( CanOpen(item), false,
886 _T("has open submenu but another item selected?") );
888 if ( item->GetSubMenu()->ProcessKeyDown(key) )
917 processed = ActivateItem(item);
960 if ( !HasOpenSubmenu() && CanOpen(item) )
962 OpenSubmenu(item);
971 // look for the menu item starting with this letter
974 // we want to start from the item after this one because
975 // if we're already on the item with the given accel we want to
979 // do we have more than one item with this accel?
985 // loop through all items searching for the item with this
991 item = node->GetData();
993 int idxAccel = item->GetAccelIndex();
995 (wxChar)wxTolower(item->GetLabel()[(size_t)idxAccel])
998 // ok, found an item with this accel
1002 // know if it's the only item with this accel or if
1006 else // we already had found such item
1028 item = nodeFound->GetData();
1030 // go to this item anyhow
1033 if ( !notUnique && item->IsEnabled() )
1035 // unique item with this accel - activate it
1036 processed = ActivateItem(item);
1039 // have wanted to activate another item
1110 void wxMenu::OnItemAdded(wxMenuItem *item)
1115 AddAccelFor(item);
1120 if ( m_invokingWindow && item->IsSubMenu() )
1122 item->GetSubMenu()->SetInvokingWindow(m_invokingWindow);
1132 wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
1134 if ( item->GetKind() == wxITEM_RADIO )
1144 item->SetAsRadioGroupStart();
1145 item->SetRadioGroupEnd(m_startRadioGroup);
1149 // we need to update its end item
1150 item->SetRadioGroupStart(m_startRadioGroup);
1159 wxFAIL_MSG( _T("where is the radio group start item?") );
1163 else // not a radio item
1168 if ( !wxMenuBase::DoAppend(item) )
1171 OnItemAdded(item);
1173 return item;
1176 wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item)
1178 if ( !wxMenuBase::DoInsert(pos, item) )
1181 OnItemAdded(item);
1183 return item;
1186 wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
1188 wxMenuItem *itemOld = wxMenuBase::DoRemove(item);
1195 RemoveAccelFor(item);
1283 void wxMenu::RefreshItem(wxMenuItem *item)
1285 // the item geometry changed, so our might have changed as well
1293 // recalc geometry to update the item height and such
1296 m_popupMenu->RefreshItem(item);
1359 // select the first item unless disabled
1401 bool wxMenu::ClickItem(wxMenuItem *item)
1404 if ( item->IsCheckable() )
1406 // update the item state
1407 isChecked = !item->IsChecked();
1409 item->Check(isChecked != 0);
1417 return SendEvent(item->GetId(), isChecked);
1428 // do we have an item for this accel?
1429 wxMenuItem *item = m_accelTable.GetMenuItem(event);
1430 if ( item && item->IsEnabled() )
1432 return ClickItem(item);
1440 const wxMenuItem *item = node->GetData();
1441 if ( item->IsSubMenu() && item->IsEnabled() )
1444 if ( item->GetSubMenu()->ProcessAccelEvent(event) )
1454 void wxMenu::AddAccelFor(wxMenuItem *item)
1456 wxAcceleratorEntry *accel = item->GetAccel();
1459 accel->SetMenuItem(item);
1467 void wxMenu::RemoveAccelFor(wxMenuItem *item)
1469 wxAcceleratorEntry *accel = item->GetAccel();
1550 // (and also check if we don't have a stock menu item)
1597 // it doesn't make sense to uncheck a radio item - what would this do?
1601 // get the index of this item in the menu
1617 else // next radio group item
1619 // get the radio group end from the start item
1660 _T("should only be called for the first radio item") );
1775 // so we need to refresh everything beyond this item as well
1877 _T("invalid item in wxMenuBar::RefreshItem") );
1920 // this item is still to the left of rectUpdate
1952 wxASSERT_MSG( pos < GetCount(), _T("invalid menu bar item index") );
2002 for ( size_t item = 0; item < count; item++ )
2004 x += GetItemWidth(item);
2008 return item;
2012 // to the right of the last menu item
2110 else // on item
2119 PopupCurrentMenu(false /* don't select first item - as Windows does */);
2158 // select the new active item
2166 PopupCurrentMenu(false /* don't select first item - as Windows does */);
2174 // ensure that we have a current item - we might not have it if we're
2185 // we always maintain a valid current item while we're in modal
2187 wxFAIL_MSG( _T("how did we manage to lose current item?") );
2229 // the item won't change anyhow
2235 // show the new menu after changing the item
2287 // if the item is not unique, just select it but don't
2289 // another item
2319 // do we have more than one item with this accel?
2326 // the index of the item with this accel
2329 // loop through all items searching for the item with this
2330 // accel starting at the item after the current one
2349 // ok, found an item with this accel
2353 // know if it's the only item with this accel or if
2357 else // we already had found such item
2436 // item, not to the right of it