Namespaces
Variants
Actions
(Difference between revisions)

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

Jump to: navigation, search
m (Hamishwillee - Bot change of template (Template:CodeSnippet) - now using Template:ArticleMetaData)

Revision as of 05:09, 14 June 2012


Template:KBCS

Article Metadata

Tested with
Devices(s): Nokia 5800 XpressMusic

Compatibility
Platform(s): S60 5th Edition

Platform Security
Capabilities: )

Article
Keywords: CCoeControl::SetPointerCapture()
Created: tepaa (14 Oct 2008)
Last edited: hamishwillee (14 Jun 2012)

Overview

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

The container control base class implementation CCoeControl::HandlePointerEvent() redirects events to its child controls. Remember to implement event handling into every custom UI control in your application.

If you want one UI control to receive all pointer events, use 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

One UI control receives all touch events.

See also

S60 5th Edition: Solitaire Game Example

S60 Platform: Image Converter Example

CS001144 - Handling pointer events

CS001146 - Enabling drag events in touch-enabled devices

149 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved