void CPcWindowBase::PointerL(const TPointerEvent &pointer,const TTime &) { #if defined(LOGGING) _LIT(KLog1,"Pointer Event Recieved Type=%S State=%d SubState=%d"); _LIT(KDown,"Down"); _LIT(KUp,"Up"); iTest->LOG_MESSAGE4(KLog1,&(pointer.iType?KUp():KDown()),iTest->State(),iTest->SubState()); #endif if (pointer.iType==TPointerEvent::EButton1Down && !iTest->iFailed) { if (iTest->SubState()==ERootWindow) // Root window click, must not be inside this window { if (TRect(Size()).Contains(pointer.iPosition)) { iTest->TestFailed(); return; } } TInt ret; if ((ret=PointerDown())==EFailed) iTest->TestFailed(); else iTest->IncSubStateL(ret==ENeedsDDEvent); } #if defined(LOGGING) _LIT(KLog2,"End of processing Pointer Event"); iTest->LOG_MESSAGE(KLog2); #endif }
// CFepLayoutChoiceList::HandlePointerUpEventL // Handle pointer up event. // (other items were commented in a header). // --------------------------------------------------------------------------- // EXPORT_C CFepUiBaseCtrl* CFepLayoutChoiceList::HandlePointerUpEventL(const TPoint& aPoint) { if( iFreezeTimer && iFreezeTimer->IsActive() || !PointerDown()) { return this; } CFepUiBaseCtrl* ctrl = CFepLayoutPopupWnd::HandlePointerUpEventL(aPoint); TInt index = HitTest(aPoint); if( index >= EListItemFirst ) { CFepLayoutChoiceList::SEvent event; event.iIndex = index; event.iCommand = iItemList[index]->iCommand; CloseWindow(); ReportChoiceEvent(event); #ifdef RD_TACTILE_FEEDBACK if (UiLayout()->SupportTactileFeedback()) { UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse); } #endif //RD_TACTILE_FEEDBACK } else if( index == EListOutside ) { SetPointerDown( EFalse ); } return this; }
// CFepLayoutChoiceList::HandlePointerMoveEventL // Handle pointer move event. // (other items were commented in a header). // --------------------------------------------------------------------------- // EXPORT_C CFepUiBaseCtrl* CFepLayoutChoiceList::HandlePointerMoveEventL(const TPoint& aPoint) { if( iFreezeTimer && iFreezeTimer->IsActive() ) { return this; } CFepLayoutPopupWnd::HandlePointerMoveEventL(aPoint); if( PointerDown() ) { TInt index = HitTest(aPoint); if( index != iCurFocusItem && index >= 0) { //TInt prev = iCurFocusItem; iCurFocusItem = index; /* if( prev != -1 ) { DrawItem(prev, ETrue); } if( iCurFocusItem != -1 ) { DrawItem(iCurFocusItem, ETrue); } */ #ifdef RD_TACTILE_FEEDBACK if (UiLayout()->SupportTactileFeedback()) { if ( iLastSelIndex != iCurFocusItem) { UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad); iLastSelIndex = iCurFocusItem; } } #endif //RD_TACTILE_FEEDBACK Draw(); UpdateArea(Rect(),EFalse); } } return this; }
bool ActiveWidget::AcceptInputButton( const InputButton &mb) { if (!IsActive()) return false; DBG_AcceptB _result = false; int i; for (i=0; i!=NUM_BUTTONS; ++i) { if ( mb.Changed()&(1<<i) ) { if ( mb.Status()&(1<<i) ) { if ( 0 == _mb_down[i] ) //< also set by keyboard { if ( mb.Cond()==Widget::NORMAL ) { _mb_down[i] = true; _result |= PointerDown(_cursor,i); } else { DBG_Text("> . <"); _result |= OffPress[i].Schedule_1(_cursor); _was_touched[i]=false; } } } else { if ( 1 == _mb_down[i] ) { _mb_down[i] = false; _result |= PointerUp(_cursor,i); } } } } return (_result = _was_over && (mb.Cond()==Widget::NORMAL) );//_result; }