13 long-tap events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 long-tap events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <p>Long-tap events allow you to specify functions performed when the user |
14 <p>Long-tap events allow you to specify functions performed when the user |
15 taps and holds the button for a specified period of time. An example of a |
15 taps and holds the button for a specified period of time. An example of a |
16 long-tap function is fast forwarding in a media player application by tapping |
16 long-tap function is fast forwarding in a media player application by tapping |
17 and holding down a button.</p> |
17 and holding down a button.</p> |
18 <p>To receive long-tap events, use the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknLongTapDetector.html" format="application/java-archive"><codeph>CAknLongTapDetector</codeph></xref> in the <xref href="GUID-92018B6B-3CBB-434D-9E61-F271C67E98E3.dita">Touch |
18 <p>To receive long-tap events, use the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknLongTapDetector.html" format="application/java-archive"><codeph>CAknLongTapDetector</codeph></xref> in the <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/Touch_UI_Utilities_APIIndexPage.html" format="application/java-archive">Touch |
19 UI utilities API</xref>.</p> |
19 UI utilities API</xref>.</p> |
20 <p>To enable the handling of long tap events in your <codeph>CAknButton</codeph> , |
20 <p>To enable the handling of long tap events in your <codeph>CAknButton</codeph> , |
21 set the flag <codeph>KAknButtonReportOnLongPress</codeph> for the button. |
21 set the flag <codeph>KAknButtonReportOnLongPress</codeph> for the button. |
22 When the long tap event starts,<codeph>CAknButton::ELongPressEvent()</codeph> is |
22 When the long tap event starts,<codeph> CAknButton::ELongPressEvent</codeph> is |
23 reported to the button observer (<codeph>MCoeControlObserver</codeph>). When |
23 reported to the button observer (<codeph>MCoeControlObserver</codeph>). When |
24 the long tap event ends, <codeph>CAknButton::ELongPressEndedEvent()</codeph> is |
24 the long tap event ends, <codeph>CAknButton::ELongPressEndedEvent</codeph> is |
25 reported.</p> |
25 reported.</p> |
26 <p>To define the period for which the button needs to be held down for a long-tap |
26 <p>To define the period for which the button needs to be held down for a long-tap |
27 event, use the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknButton.html#5b5323936073f454e96847337131030a" format="application/java-archive"><codeph>SetLongPressInterval()</codeph></xref> in the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknButton.html" format="application/java-archive"><codeph>CAknButton</codeph></xref>.</p> |
27 event, use the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknButton.html#5b5323936073f454e96847337131030a" format="application/java-archive"><codeph>SetLongPressInterval()</codeph></xref> in the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknButton.html" format="application/java-archive"><codeph>CAknButton</codeph></xref>.</p> |
28 <codeblock xml:space="preserve">void CMyAppContainer::ConstructL() |
28 <codeblock xml:space="preserve">void CMyAppContainer::ConstructL() |
29 { |
29 { |