Link against: avkon.lib
#include <aknpointereventsuppressor.h>
Usage pattern, where iSuppressor is a CAknPointerEventSuppressor*:
void CMyControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) { if (iSuppressor->SuppressPointerEvent(aPointerEvent)) return;
switch (aPointerEvent.iType) { case TPointerEvent::EButton1Down: iTap = ETrue; break; case TPointerEvent::EButton1Up: if (iTap) HandleTapL(aPointerEvent); break; case TPointerEvent::EDrag: iTap = EFalse; HandleDragL(aPointerEvent); break; default: break; } }
Public Member Functions | |
IMPORT_C | ~CAknPointerEventSuppressor () |
Destructor. | |
IMPORT_C TBool | SuppressPointerEvent (const TPointerEvent &aPointerEvent) |
Tests whether a pointer event should be suppressed. | |
IMPORT_C void | SetMaxTapDuration (TTimeIntervalMicroSeconds aDuration) |
Set the maximum time period that drag events should be ignored during a pointer interaction. | |
IMPORT_C void | SetMaxTapMove (TSize aMoveLimits) |
Set the maximum pointer movement for which drag events should be ignored during a pointer interaction. | |
IMPORT_C void | SetMinInterDragInterval (TTimeIntervalMicroSeconds aInterval) |
Set the minimum time between drag events. | |
Static Public Member Functions | |
static IMPORT_C CAknPointerEventSuppressor * | NewL () |
Factory function. |
|
Destructor. |
|
Factory function. This creates a pointer event suppressor that will suppress drag events while the pointer interaction may be a tap. |
|
Set the maximum time period that drag events should be ignored during a pointer interaction.
|
|
Set the maximum pointer movement for which drag events should be ignored during a pointer interaction.
|
|
Set the minimum time between drag events. This can be used to reduce the frequency of drag event reception when events are not desired at maximum speed.
|
|
Tests whether a pointer event should be suppressed. A control that wants pointer event suppression should feed all pointer events to this function. It will return ETrue if the pointer event should be ignored by the control. Only controls that have unrelated behaviour on tap and drag actions need to use pointer event suppression. If this class is used to suppress drag events during a possible tap, and this function does not suppress a drag event, the client can be sure that a drag action is happening.
|