×
Namespaces

Variants
Actions
(Difference between revisions)

Pointer capturing in Symbian C++ on touch-enabled devices

From Nokia Developer Wiki
Jump to: navigation, search
Forum Nokia KB (Talk | contribs)
m (Protected "Pointer capturing in touch enabled device" [edit=sysop:move=sysop])
Forum Nokia KB (Talk | contribs)

Revision as of 12:40, 14 October 2008


ID   Creation date September 29, 2008
Platform S60 5th Edition Tested on devices Nokia 5800 XpressMusic
Category Symbian C++ Subcategory Touch UI


Keywords (APIs, classes, methods, functions): CCoeControl::SetPointerCapture()

Overview

S60 5th Edition supports touch events. Pointer events are sended to the active ui application container control if pointer/stylus is on the application.

Container control base class implementation CCoeControl::HandlePointerEvent() redirects events to its child controls. You have to remember implement event handling into every custom ui controls in your application.

If you want that one ui control receives all pointer events, it can be done by CCoeControl::SetPointerCapture()

MMP file

The following libraries are required:

LIBRARY cone.lib

Source file

void CMyContainer::EatAllEvents()
{
// This start eating all pointer events from other ui control in this application.
SetPointerCapture(ETrue);
}
void CMyContainer::ReleaseEventCatching()
{
// Disables pointer capturing
SetPointerCapture(EFalse);
}


Postconditions

On ui contol receives all touch events.

See also

[S60 5th Solitaire Game Example]

[S60 5th ImageConverter Example]

101 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×