Namespaces
Variants
Actions
(Difference between revisions)

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

Jump to: navigation, search
m (Protected "Pointer capturing in touch enabled device" [edit=sysop:move=sysop])
m (Hamishwillee - Bot update - Fix links)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{ArticleMetaData <!-- v1.2 -->
__NOEDITSECTION__
+
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
|devices= Nokia 5800 XpressMusic
|-
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|'''ID''' || &nbsp;
+
|platform= S60 5th Edition
|'''Creation date''' || September 29, 2008
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|-
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|'''Platform''' || S60 5th Edition
+
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
|'''Tested on devices''' || Nokia 5800 XpressMusic
+
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|-
+
|keywords= CCoeControl::SetPointerCapture()
|'''Category''' || Symbian C++
+
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
|'''Subcategory''' || Touch UI
+
|translated-by= <!-- [[User:XXXX]] -->
|}
+
|translated-from-title= <!-- Title only -->
 
+
|translated-from-id= <!-- Id of translated revision -->
 
+
|review-by= <!-- After re-review: [[User:username]] -->
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
|review-timestamp= <!-- After re-review: YYYYMMDD -->
|-
+
|update-by= <!-- After significant update: [[User:username]]-->
|'''Keywords (APIs, classes, methods, functions):''' CCoeControl::SetPointerCapture()
+
|update-timestamp= <!-- After significant update: YYYYMMDD -->
|}
+
|creationdate= 20081003
 +
|author= [[User:Tepaa]]
 +
<!-- The following are not in current metadata -->
 +
|subcategory= Touch UI
 +
|id= CS001145
 +
}}
  
 
==Overview==
 
==Overview==
  
S60 5th Edition supports touch events. Pointer events are sended to the active ui application  
+
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.
container control if pointer/stylus is on the application.
+
  
Container control base class implementation CCoeControl::HandlePointerEvent() redirects
+
The container control base class implementation {{Icode|CCoeControl::HandlePointerEvent()}} redirects events to its child controls. Remember to implement event handling into every custom UI control in your application.
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()
+
If you want one UI control to receive all pointer events, use  {{Icode|CCoeControl::SetPointerCapture()}}.
  
 
==MMP file==
 
==MMP file==
Line 59: Line 62:
 
==Postconditions==
 
==Postconditions==
  
On ui contol receives all touch events.
+
One UI control receives all touch events.
  
 
==See also==
 
==See also==
[[http://www.forum.nokia.com/info/sw.nokia.com/id/6e12c32a-5c7f-4829-8dfb-ba7aaaca63fa/S60_5th_Edition_Solitaire_Game_Example.html S60 5th Solitaire Game Example]]
+
[http://www.developer.nokia.com/info/sw.nokia.com/id/6e12c32a-5c7f-4829-8dfb-ba7aaaca63fa/S60_5th_Edition_Solitaire_Game_Example.html S60 5th Edition: Solitaire Game Example]
 +
 
 +
[http://www.developer.nokia.com/info/sw.nokia.com/id/567330dd-130f-4f1d-9380-fac5aec5a6a9/S60_Platform_Image_Converter_Example.html S60 Platform: Image Converter Example]
  
[[http://www.forum.nokia.com/info/sw.nokia.com/id/567330dd-130f-4f1d-9380-fac5aec5a6a9/S60_Platform_Image_Converter_Example.html S60 5th ImageConverter Example]]
+
[[Handling pointer events in Symbian C++]]
  
 +
[[Enabling drag events in Symbian C++ on touch-enabled devices]]
  
[[Category:Symbian C++]][[Category:Code Examples]][[Category:Touch UI]]
+
[[Category:Symbian C++]][[Category:Code Snippet]][[Category:UI]][[Category:Touch UI]][[Category:Code Snippet]]

Latest revision as of 11:25, 5 July 2012

Article Metadata

Tested with
Devices(s): Nokia 5800 XpressMusic

Compatibility
Platform(s): S60 5th Edition

Article
Keywords: CCoeControl::SetPointerCapture()
Created: tepaa (03 Oct 2008)
Last edited: hamishwillee (05 Jul 2012)

Contents

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

Handling pointer events in Symbian C++

Enabling drag events in Symbian C++ on touch-enabled devices

This page was last modified on 5 July 2012, at 11:25.
145 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