⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainpage.dox

📁 symbian ui的 例子 初学者可以 好好看看,这个是培训的资料,应该比较宝贵
💻 DOX
📖 第 1 页 / 共 2 页
字号:
/*! \mainpage Form Example
 *	
 * \ref intro_sec
 * \n\ref Pre_sec
 * \n\ref Design_sec 
 *
 * <HR>
 *
 * \section intro_sec 1. About this Example 
 *
 * This tutorial explains how to use forms in Avkon applications. 
 *
 * The AknExForm example application introduces the following form functions: 
 * 
 * - View mode and edit mode 
 * - Form with tabs 
 * - Double line display and single line display 
 * - Moving the cursor 
 * - Label type 
 * - Changing the label 
 * - Control types 
 * - Displaying a long string 
 * - Grouping of controls 
 * - Adding or deleting fields 
 * - Saving data 
 * - Displaying an empty form 
 *
 * <HR>
 *
 * \section Pre_sec 2. Prerequisites
 *
 * This example exists as a complete application, and has the standard Symbian OS application architecture, employing the Application, Document, UI, and View classes. The reader should be aware of this architecture before continuing.
 *
 * <HR>
 *
 * \section Design_sec 3. Design and Implementation
 *
 *  \subsection Sub1 3.1 Capabilities
 *
 *  The program capabilities are defined in %aknexform.mmp file: CAPABILITY NONE.
 *
 *  \subsection Sub2 3.2 ScalabaleUI
 *	
 *  The program takes screen parameters in the start of the application and works with all screen modes. The program supports changing the screen layout while the program is running.
 * 
 *  \subsection Sub3 3.3 Design
 * 
 * 
 * Application programmers are supported to implement and use classes inherited from the CAknForm class as dialog. (that is, as to dialog, the CEikDialog class is not used directly but inherited classes for each application are used instead.)
 * 
 * \subsection Sub3 3.3 Resource definition
 *
 * This section explains resource definition of the form. All the structures for form classes are defined in "eikon.rh" or "avkon.rh" and the constant variables are defined in "avkon.hrh". The resource definition of the form is almost the same as that of a standard dialog.
 * 
 * \subsection Sub4 3.3.1 Resource definition of a single view (one page) form
 *
 * The following is example code of the resource definition of a single view (one page) form:
 *
<table cellspacing=0	width=100%>
<tr valign=top>
<td width=100%>
<p>RESOURCE DIALOG r_aknexform_text_field_dialog<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect 
 |<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder 
 |<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EEikDialogFlagCbaButtons;<br>
&nbsp; &nbsp; buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;<br>
&nbsp; &nbsp; form = r_aknexform_text_field_form;<br>
&nbsp; &nbsp; }<br>
<br>
RESOURCE FORM r_aknexform_text_field_form<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; items =<br>
&nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; DLG_LINE<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type = EEikCtEdwin;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prompt = qtn_aknexform_form_label_ed1;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = EAknExFormDlgCtrlIdEdwin01;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemflags=EEikDlgItemTakesEnterKey| 
 EEikDlgItemOfferAllHotKeys;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control = EDWIN<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flags = EEikEdwinNoHorizScrolling 
 | EEikEdwinResizable;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width = AKNEXFORM_EDWIN_WIDTH;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lines = AKNEXFORM_EDWIN_LINES;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxlength = EAknExFormEdwinMaxLength;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // added to limit 
 expanding in forms.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // If you want 
 full screen use 6 here<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max_view_height_in_lines 
 = 6;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // if you have 
 the line above, you must have this.&nbsp;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // It is calculable 
 from LAF<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; base_line_delta 
 = 21;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; DLG_LINE<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type = EEikCtEdwin;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prompt = qtn_aknexform_form_label_ed2;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = EAknExFormDlgCtrlIdEdwin02;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemflags=EEikDlgItemTakesEnterKey| 
 EEikDlgItemOfferAllHotKeys;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control = EDWIN<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flags = EEikEdwinNoHorizScrolling 
 | EEikEdwinResizable;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width = AKNEXFORM_EDWIN_WIDTH;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lines = AKNEXFORM_EDWIN_LINES;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxlength = EAknExFormEdwinMaxLength;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // added to limit 
 expanding in forms.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // If you want 
 full screen use 6 here<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max_view_height_in_lines 
 = 6;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // if you have 
 the line above, you must have this.&nbsp;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // It is calculable 
 from LAF<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; base_line_delta 
 = 21;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; &nbsp; };<br>
&nbsp; &nbsp; }</td></tr>
</table>
 * 
 * <br>
 *
<table cellspacing=0	width=70%>
<tr>
<td width=100%><span style="font-weight: bold;">DIALOG</span></td></tr>
<tr>
<td width=100%>
<table cellspacing=0 width=523	border=1>
<tr>
<td valign=top	width=75px>flags</td>
<td width=533px>Specify a style of dialog (whole form). The following flags 
 can be specified for form. For more details, see the dialog tutorial.<br>
EEikDialogFlagNoDrag<br>
EEikDialogFlagFillAppClientRect<br>
EEikDialogFlagNoTitleBar<br>
EEikDialogFlagNoBorder<br>
EEikDialogFlagCbaButtons</td></tr>
<tr>
<td valign=top	width=75px>buttons</td>
<td width=533px>Specify soft key types.<br>
R_AVKON_SOFTKEYS_OPTIONS_BACK</td></tr>

<tr>
<td valign=top	width=75px>form</td>
<td width=533px>Specify FORM.</td></tr>
</table></td></tr>
</table>

<table cellspacing=0	width=70%>
<tr>
<td width=100%><span style="font-weight: bold;">FORM</span></td></tr>
<tr>
<td width=100%>
<table cellspacing=0	width=523	border=1>
<tr>
<td valign=top	width=75px>flags</td>
<td width=533px>Specify a style of form optionally. The default setting 
 is single line display.<br>
EEikFormUseDoubleSpacedFormat : Double line display.<br>
EEikFormHideEmptyFields : To make empty data fields Invisible.<br>
EEikFormShowBitmaps : To display a bitmap on a label.<br>
EEikFormEditModeOnly : To display the form in edit mode only.</td></tr>

<tr>
<td valign=top	width=75px>items</td>
<td width=533px>Specify DLG_LINE.</td></tr>
</table></td></tr>
</table>
<table cellspacing=0		width=70%>
<tr>
<td width=100%><span style="font-weight: bold;">DLG_LINE</span></td></tr>
<tr>
<td width=100%>
<table cellspacing=0	width=523	border=1>
<tr>
<td valign=top	width=75px>type</td>
<td width=533px>Specify a control type.<br>
EEikCtEdwin<br>
EEikCtNumberEditor<br>
EEikCtDateEditor<br>
EEikCtTimeEditor<br>
EEikCtDurationEditor<br>
EEikCtSecretEd<br>
EAknCtSlider<br>
&nbsp; etc.<br>
Custom controls can be specified.</td></tr>

<tr>
<td valign=top	width=75px>prompt</td>
<td width=533px>Specify the field label.</td></tr>
<tr>
<td valign=top	width=75px>id</td>
<td width=533px>Specify a control ID of the application.</td></tr>
<tr>
<td valign=top	width=75px>itemflags</td>
<td width=533px>Specify a field style optionally.<br>
EEikDlgItemTakesEnterKey : Control receive EnterKey.<br>
EEikDlgItemOfferAllHotKeys: Control offer HotKey.<br>
EEikDlgItemSeparatorAfter : To set a separator after the field. </td></tr>

<tr>
<td valign=top	width=75px>control</td>
<td width=533px>Define a control. For more details, see the tutorial of 
 each control.<br>
EDWIN<br>
NUMBER_EDITOR<br>
DATE_EDITOR<br>
TIME_EDITOR<br>
DURATION_EDITOR<br>
SECRETED<br>
SLIDER<br>
&nbsp; etc. </td></tr>
</table></td></tr>
</table>
&nbsp; 
 *
 * \subsection Sub5 3.3.2 Resource definition of a form with tabs
 *
 * The following is example code of resource definition of a form that has multiple views (pages) with tabs.
 *
<table cellspacing=0	width=100%>
<tr valign=top>
<td	width=100%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -