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

📄 mainpage.dox

📁 symbian ui的 例子 初学者可以 好好看看,这个是培训的资料,应该比较宝贵
💻 DOX
📖 第 1 页 / 共 2 页
字号:
<p class=CodeInTable>RESOURCE DIALOG r_aknexform_navipane_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; pages = r_aknexform_navipane_pages;<br>
&nbsp; &nbsp; }<br>
<br>
RESOURCE ARRAY r_aknexform_navipane_pages<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; items =<br>
&nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; PAGE<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = EAknExFormPageCtrlIdPage01;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text = qtn_aknexform_form_label_page1;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; form = r_aknexform_text_field_form;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },<br>
&nbsp; &nbsp; &nbsp; &nbsp; PAGE<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = EAknExFormPageCtrlIdPage02;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text = qtn_aknexform_form_label_page2;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; form = r_aknexform_text_number_field_another_form;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; &nbsp; };<br>
&nbsp; &nbsp; }<br>
<br>
RESOURCE FORM r_aknexform_text_number_field_another_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_edwin;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = EAknExFormDlgCtrlIdEdwin03;<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; // 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; DLG_LINE<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type = EEikCtNumberEditor;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prompt = qtn_aknexform_form_label_number;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = EAknExFormDlgCtrlIdNumber01;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemflags=EEikDlgItemTakesEnterKey| 
 EEikDlgItemOfferAllHotKeys;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control = NUMBER_EDITOR<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min = AKNEXFORM_NUMBER_EDITOR_MIN_VALUE01;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max = AKNEXFORM_NUMBER_EDITOR_MAX_VALUE01;<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>
<p>&nbsp;</p>
<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>(See 5.1.1 Resource definition of a single view (one page) 
 form)</td></tr>

<tr>
<td valign=top
	width=75px>buttons</td>
<td width=533px>(See 5.1.1 Resource definition of a single view (one page) 
 form)</td></tr>

<tr>
<td valign=top	width=75px>pages</td>
<td width=533px>Specify ARRAY of PAGE</td></tr>
</table></td></tr>
</table>

<table cellspacing=0
		width=70%>

<tr>
<td width=100%><span style="font-weight: bold;">PAGE</span></td></tr>

<tr>
<td width=100%>

<table cellspacing=0		width=523		border=1>
<tr>
<td valign=top	width=75px>id</td>
<td width=533px>Specify a page ID of an application.</td></tr>
<tr>
<td valign=top
	width=75px>text</td>
<td width=533px>Specify title string of tabs.</td></tr>
<tr>
<td valign=top
	width=75px>form</td>
<td width=533px>Specify FORM.</td></tr>
</table></td></tr>
</table>
 *
 * 
 * \subsection Sub6 3.4 Showing the form and getting data
 * 
 * This section explains how to show a form defined by a resource file and how to get form data. For more detailed examples, see <a href="aknexformsaveform_8cpp-source.html">AknExFormSaveForm.cpp</a>.
 *
 * \subsection Sub7 3.4.1 Showing the form
 *
 * A form of an application is used after implementing an inherited class from CAknForm.
 *
 * As CAknForm is the inherited class from the Dialog class (CEikDialog), the process to show the form is same as that of the dialog. While the form is shown, it is impossible to operate the application as Dialog.
 * At first, the form is shown in view mode. Changing the display mode (edit mode/view mode) is automatically controlled by CAknForm.
 *
 * The following is an example of showing the form: 
 * 
 * - implement the form object 
 * - show the form by calling the ExecuteLD() function 
 *
<br> 
<table cellspacing=0	height=20	width=588>
<tr valign=top>
<td width=100%>
<p class=CodeInTable>class CAknExFormSaveForm : public CAknForm<br>
{<br>
...<br>
TBuf&lt;EAknExFormEdwinMaxLength&gt; iEdwinData;<br>
TInt&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 &nbsp; &nbsp; &nbsp; iNumberData;<br>
TBuf&lt;EAknExFormLabelMaxLength&gt; iEdwinLabel;<br>
TBuf&lt;EAknExFormLabelMaxLength&gt; iNumberLabel;<br>
}<br>
<br>
CAknExFormSaveForm* form = CAknExFormSaveForm::NewL();<br>
form-&gt;ExecuteLD(R_AKNEXFORM_TEXT_NUMBER_FIELD_DIALOG);</td></tr>
</table>
<br>
<br>
 *
 *
 * \subsection Sub8 3.4.2 Changing the display mode to edit mode
 *
 * To change the display mode from view mode to edit mode, press the left soft key (<b>Options</b>) to open a menu and select <b>Edit</b>.
 *
 * While no menu is specified at the timing of form instantiation, the menu has only the <b>Edit</b> menu item. In this case, application programmers do not have to write source code.
 *
 * \subsection Sub323 3.2.3 Changing the display mode to view mode
 *
 * <b>Data saving process</b>
 *
 * To change the display mode from edit mode to view mode, press the left soft key (<b>Options</b>) to open a menu and select <b>Save</b>.
 *
 * At this time, the SaveFormDataL() function of the form is called. It is also called when the right soft key is pressed and <b>Yes</b> is selected to save confirmation query.
 * 
 * Procedures to apply changes on the form are supported to be written in this SaveFormDataL() function.
 * 
 * In this example, data and labels are saved in member variables. 
 *
<table cellspacing=4		width=80%		bgcolor=#DDDDDD>
<tr>
<td width=100%>
<p class=CodeInTable>TBool CAknExFormSaveForm::SaveFormDataL()<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; GetEdwinText(iEdwinData, EAknExFormDlgCtrlIdEdwin01);<br>
&nbsp; &nbsp; iNumberData = NumberEditorValue(EAknExFormDlgCtrlIdNumber01);<br>
<br>
&nbsp; &nbsp; TPtrC edwinLabel = Line(EAknExFormDlgCtrlIdEdwin01)-&gt;GetFullCaptionText();<br>
&nbsp; &nbsp; iEdwinLabel = edwinLabel;<br>
&nbsp; &nbsp; TPtrC numberLabel = Line(EAknExFormDlgCtrlIdNumber01)-&gt;GetFullCaptionText();<br>
&nbsp; &nbsp; iNumberLabel = numberLabel;<br>
<br>
&nbsp; &nbsp; return ETrue;<br>
&nbsp; &nbsp; }</td></tr>
</table>
 *
 * <b>Data discarding process</b>
 *
 * The following explains how to change the display mode from edit mode to view mode without saving data.
 * 
 * Press the right soft key and select [No] to not save the confirmation query. At this time, the DoNotSaveFormDataL() function of the form is called.
 * 
 * Procedures to discard changes on the form are supported to be written in this DoNotSaveFormDataL() function.
 * 
 *In this example, data and labels in member variables are reset to the form. 
 *
<table xcellspacing=4		width=80%		bgcolor=#DDDDDD>
<tr>
<td width=100%>
<p class=CodeInTable>void CAknExFormSaveForm::DoNotSaveFormDataL()<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; SetEdwinTextL(EAknExFormDlgCtrlIdEdwin01, &amp;iEdwinData);<br>
&nbsp; &nbsp; SetNumberEditorValue(EAknExFormDlgCtrlIdNumber01, iNumberData);<br>
<br>
&nbsp; &nbsp; TRAPD(e, Line(EAknExFormDlgCtrlIdEdwin01)-&gt;SetCaptionL(iEdwinLabel));<br>
&nbsp; &nbsp; Line(EAknExFormDlgCtrlIdEdwin01)-&gt;iCaption-&gt;CropText();<br>
&nbsp; &nbsp; TRAP(e, Line(EAknExFormDlgCtrlIdNumber01)-&gt;SetCaptionL(iNumberLabel));<br>
&nbsp; &nbsp; Line(EAknExFormDlgCtrlIdNumber01)-&gt;iCaption-&gt;CropText();<br>
&nbsp; &nbsp; }</td></tr>
</table>
 *
 * <HR>
 *
This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
<li><a class="el" href="class_c_akn_ex_form_add.html">CAknExFormAdd</a>
<li><a class="el" href="class_c_akn_ex_form_application.html">CAknExFormApplication</a>
<li><a class="el" href="class_c_akn_ex_form_app_ui.html">CAknExFormAppUi</a>
<li><a class="el" href="class_c_akn_ex_form_container.html">CAknExFormContainer</a>
<li><a class="el" href="class_c_akn_ex_form_document.html">CAknExFormDocument</a>
<li><a class="el" href="class_c_akn_ex_form_save_form.html">CAknExFormSaveForm</a>
<li><a class="el" href="class_c_akn_ex_form_view.html">CAknExFormView</a>
 */

⌨️ 快捷键说明

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