×
Namespaces

Variants
Actions
(Difference between revisions)

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

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix links)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
__NOTOC__
+
{{ArticleMetaData <!-- v1.2 -->
__NOEDITSECTION__
+
{{KBCS}}
+
{{ArticleMetaData
+
|id=CS001145
+
|platform=S60 5th Edition
+
|devices=Nokia 5800 XpressMusic
+
|category=Symbian C++
+
|subcategory=Touch UI
+
|creationdate=October 14, 2008
+
|keywords=CCoeControl::SetPointerCapture()
+
 
+
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|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]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
+
|devices= Nokia 5800 XpressMusic
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
+
|platform= S60 5th Edition
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices. -->)
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|author=[[User:Tepaa]]
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|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 24: 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 64: Line 69:
 
[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.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.
99 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.

×