📄 mainpage.dox
字号:
/*! \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>
{<br>
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect
|<br>
EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder
|<br>
EEikDialogFlagCbaButtons;<br>
buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;<br>
form = r_aknexform_text_field_form;<br>
}<br>
<br>
RESOURCE FORM r_aknexform_text_field_form<br>
{<br>
items =<br>
{<br>
DLG_LINE<br>
{<br>
type = EEikCtEdwin;<br>
prompt = qtn_aknexform_form_label_ed1;<br>
id = EAknExFormDlgCtrlIdEdwin01;<br>
itemflags=EEikDlgItemTakesEnterKey|
EEikDlgItemOfferAllHotKeys;<br>
control = EDWIN<br>
{<br>
flags = EEikEdwinNoHorizScrolling
| EEikEdwinResizable;<br>
width = AKNEXFORM_EDWIN_WIDTH;<br>
lines = AKNEXFORM_EDWIN_LINES;<br>
maxlength = EAknExFormEdwinMaxLength;<br>
// added to limit
expanding in forms.<br>
// If you want
full screen use 6 here<br>
max_view_height_in_lines
= 6;<br>
// if you have
the line above, you must have this. <br>
// It is calculable
from LAF<br>
base_line_delta
= 21;<br>
};<br>
},<br>
<br>
DLG_LINE<br>
{<br>
type = EEikCtEdwin;<br>
prompt = qtn_aknexform_form_label_ed2;<br>
id = EAknExFormDlgCtrlIdEdwin02;<br>
itemflags=EEikDlgItemTakesEnterKey|
EEikDlgItemOfferAllHotKeys;<br>
control = EDWIN<br>
{<br>
flags = EEikEdwinNoHorizScrolling
| EEikEdwinResizable;<br>
width = AKNEXFORM_EDWIN_WIDTH;<br>
lines = AKNEXFORM_EDWIN_LINES;<br>
maxlength = EAknExFormEdwinMaxLength;<br>
// added to limit
expanding in forms.<br>
// If you want
full screen use 6 here<br>
max_view_height_in_lines
= 6;<br>
// if you have
the line above, you must have this. <br>
// It is calculable
from LAF<br>
base_line_delta
= 21;<br>
};<br>
}<br>
};<br>
}</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>
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>
etc. </td></tr>
</table></td></tr>
</table>
*
* \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 + -