void CMainMenuListContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType ) { if( aListBox == iListBox && aEventType == EEventItemClicked ) { iView->UpdateSelectedIndex(GetActiveSelection()); iView->SetNaviPaneLabelL(GetActiveSelection()); } else if (aListBox == iListBox && aEventType == EEventEnterKeyPressed || aListBox == iListBox && aEventType == EEventItemDoubleClicked) { ActivateSelection(); } }
void CMainMenuGridContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType ) { if( aListBox == iGrid && aEventType == EEventItemClicked ){ iView->UpdateSelectedIndex(GetActiveSelection()); iView->SetNaviPaneLabelL(GetActiveSelection()); // In new s60v5 the grids should activate directly instead of // select first and then activate. ActivateSelection(); } /* else if ( aListBox == iGrid && aEventType == EEventItemDoubleClicked) { ActivateSelection(); } */ }
TKeyResponse CMainMenuGridContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) { if (aType == EEventKey && (aKeyEvent.iScanCode == EStdKeyEnter || aKeyEvent.iScanCode == EStdKeyDevice3)) { ActivateSelection(); return EKeyWasConsumed; } TKeyResponse retVal = EKeyWasNotConsumed; if (iGrid) { retVal = iGrid->OfferKeyEventL(aKeyEvent, aType); if (retVal == EKeyWasConsumed && aType == EEventKey) { iView->UpdateSelectedIndex(GetActiveSelection()); iView->SetNaviPaneLabelL(GetActiveSelection()); } } return retVal; }