Symbian3/SDK/Source/GUID-7B275129-5EF7-4B27-B603-3BDE2C650A93.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-7B275129-5EF7-4B27-B603-3BDE2C650A93.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+	Nokia Corporation - initial contribution.
+Contributors: 
+-->  <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-7B275129-5EF7-4B27-B603-3BDE2C650A93" xml:lang="en"><title>Queries</title><prolog><metadata><keywords></keywords></metadata></prolog><conbody>
+<p>A query is a state where the software waits for user input. Queries are
+used in situations with more than one ways to proceed, when the application
+needs data from the user, or when it is necessary to make sure the user knows
+what is happening. A query must be exited before the application can proceed.</p>
+<p>Queries are displayed in pop-up windows. The following query types can
+be used:</p>
+<ul>
+<li><p><xref href="GUID-48482288-B60B-477A-8E28-132F7CBE2C94.dita">Confirmation
+query</xref>: a question or notice with one or two possible responses. </p></li>
+<li><p><xref href="GUID-13DEE42F-3EAB-4EB7-9CE1-C4930BCACE01.dita">List query</xref>:
+a question with a selection of more than two possible (predefined) responses
+in a list. </p></li>
+<li><p><xref href="GUID-434F2412-59A1-4BCB-885D-5E708EAA6AB6.dita">Grid query</xref>:
+a question with a selection of more than two possible (predefined) responses
+in a grid. </p></li>
+<li><p><xref href="GUID-DAD40CCE-EA59-4DCA-8922-824B18F0387A.dita">Multi-selection
+list query</xref>: presents a list of items; the user can select any number
+of them. </p></li>
+<li><p><xref href="GUID-F77CC49A-904D-486B-8D16-972525EC34D5.dita">Data query</xref>:
+used for numeric or textual input. </p></li>
+<li><p><xref href="GUID-7235E4E9-0046-4BE1-91CF-BD52CE4489DF.dita">Message query</xref>:
+used for various purposes in queries that are longer than one screen.</p></li>
+</ul>
+<section><title>Using queries in C++
+applications</title><p>The APIs to use for queries are the Queries
+API, Dialogs
+API, and the Popups
+API. For implementation information, see Using
+the Dialogs API.</p><p>Query dialogs are dialogs that can be used to
+require user input or user selection. All query dialogs derive from <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknQueryDialog.html" format="application/java-archive"><codeph>CAknQueryDialog</codeph></xref>,
+which inherits <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknDialog.html" format="application/java-archive"><codeph>CAknDialog</codeph></xref>.
+There are two types of queries: local and global queries. Local query dialogs
+are local to a certain application. That means they are only displayed within
+this application. Global query dialogs are system-wide queries, and are shown
+topmost even when another application moves to the foreground. Query dialogs
+require resource definitions when they are used in your code. </p><note><p>In
+order to have a header pane, the <codeph>AVKON_HEADING</codeph> component
+should be specified as the first dialog line in the resource description.</p></note><p>At
+runtime, the dialog's header pane (<xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknPopupHeadingPane.html" format="application/java-archive"><codeph>CAknPopupHeadingPane</codeph></xref>) can be obtained by calling the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknQueryDialog.html#8222b5679180543798d67db49abd4500" format="application/java-archive"><codeph>CAknQueryDialog::QueryHeading()</codeph></xref>.</p><p>The following
+parts are available for modification from the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknQueryDialog.html" format="application/java-archive"><codeph>CAknQueryDialog</codeph></xref>:</p><ul>
+<li><p>Data query </p><ul>
+<li><p>Header text </p></li>
+<li><p>Header image/animation </p></li>
+<li><p>Prompt text </p></li>
+<li><p>Edit indicator (can be removed) </p></li>
+</ul></li>
+<li><p>Confirmation query </p><ul>
+<li><p>Prompt text </p></li>
+<li><p>Image/animation </p></li>
+</ul></li>
+<li><p>List query </p><ul>
+<li><p>Header text </p></li>
+<li><p>Header image/animation </p></li>
+<li><p>List type (Single, SingleHeading, SingleGraphic, SingleGraphicHeading) </p></li>
+</ul></li>
+</ul><p>The following example illustrates the resource definition for the
+Secret Editor Query, which contains a Secret Editor, resides inside the dialog.
+The values for flags, type, id, and control are specific to the query dialog.
+These values are enumerated in the file avkon.hrh, which is in the <codeph>./epoc32/include</codeph> folder.</p><codeblock xml:space="preserve">RESOURCE DIALOG r_aknexquery_code_query
+    {
+    flags = EGeneralQueryFlags
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = EGeneralQueryFlags
+                {
+                layout = ECodeLayout;
+                label = label_text;
+                control = SECRETED
+                    {
+                    num_letters = 8;
+                    };
+                };
+            }
+        };
+    }
+</codeblock><p>The query in the above example includes a secret editor. For
+information on implementing secret editors, see the Editors
+API.  </p></section>
+</conbody></concept>
\ No newline at end of file