×
Namespaces

Variants
Actions
(Difference between revisions)

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

From Nokia Developer Wiki
Jump to: navigation, search
tanjaluodes (Talk | contribs)
m
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix links)
 
(5 intermediate revisions by one user 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]]) -->
{{KBCS}}
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
{{CodeSnippet
+
|devices= Nokia 5800 XpressMusic
|id=CS001145
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|platform=S60 5th Edition
+
|platform= S60 5th Edition
|devices=Nokia 5800 XpressMusic
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|category=Symbian C++
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|subcategory=Touch UI
+
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
|creationdate=October 14, 2008
+
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|keywords=CCoeControl::SetPointerCapture()
+
|keywords= CCoeControl::SetPointerCapture()
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20081003
 +
|author= [[User:Tepaa]]
 +
<!-- The following are not in current metadata -->
 +
|subcategory= Touch UI
 +
|id= CS001145
 
}}
 
}}
  
Line 16: Line 29:
 
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.
 
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 <tt>CCoeControl::HandlePointerEvent()</tt> redirects events to its child controls. Remember to implement event handling into every custom UI control in your application.
+
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.
  
If you want one UI control to receive all pointer events, use  <tt>CCoeControl::SetPointerCapture()</tt>.
+
If you want one UI control to receive all pointer events, use  {{Icode|CCoeControl::SetPointerCapture()}}.
  
 
==MMP file==
 
==MMP file==
Line 52: Line 65:
  
 
==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 Edition: 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.forum.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.developer.nokia.com/info/sw.nokia.com/id/567330dd-130f-4f1d-9380-fac5aec5a6a9/S60_Platform_Image_Converter_Example.html S60 Platform: Image Converter Example]
  
[[CS001144 - Handling pointer events]]
+
[[Handling pointer events in Symbian C++]]
  
[[CS001146 - Enabling drag events in touch-enabled devices]]
+
[[Enabling drag events in Symbian C++ on touch-enabled devices]]
  
[[Category:Symbian C++]][[Category:Code Examples]][[Category:UI]][[Category:Touch UI]][[Category:Code Snippet]]
+
[[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

[edit] 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().

[edit] MMP file

The following libraries are required:

LIBRARY cone.lib

[edit] 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);
}


[edit] Postconditions

One UI control receives all touch events.

[edit] 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.
82 page views in the last 30 days.