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

📄 mainpage.dox

📁 symbian ui的 例子 初学者可以 好好看看,这个是培训的资料,应该比较宝贵
💻 DOX
📖 第 1 页 / 共 2 页
字号:
/*! \mainpage Grid Control Example
 *	
 * \ref intro_sec
 * \n\ref Pre_sec
 * \n\ref Design_sec 
 * \n\ref Hierarchy_sec
 *
 * <HR>
 *
 * \section intro_sec 1. About this Example 
 *
 * This tutorial explains how to use the grid control for Avkon applications. A grid is used to layout items in grid style. The grid control is derived from the listbox control. To understand the grid control, please also refer to the Listbox Control Example.
 *
 * In the grid example application, the following functions are introduced: 
 *
 * - Displaying a single item selection grid 
 * - Displaying a menu grid 
 * - Displaying a multiple item selection grid 
 * - Displaying a GMS style grid 
 * - Adding/removing grid items 
 * - Controlling cursor movement 
 *
 * A typical use of the grid control is the application menu.
 *
 * <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 %aknexgrid.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 does not support changing the screen layout while the program is running.

 * 
 *  \subsection Sub3 3.3 Design
 * 
 * \subsection Sub4 3.4 Grid classes
 *
 * The following is a table that shows the header file in which grid classes are defined:
 *
<table cellspacing=0		width=80%		border=1>
<tr>
<td align=center
	valign=top
	width=25%>
<p style="text-align: left;"
	align=left><i style="font-weight: bold; font-style: normal;">Class</i></td>
<td align=center	valign=top	width=25%>
<p style="text-align: left;"	align=left><i style="font-weight: bold; font-style: normal;">Definition</i></td>
<td align=center	valign=top	width=50%>
<p style="text-align: left;"	align=left><i style="font-weight: bold; font-style: normal;">Description</i></td></tr>
<tr>
<td valign=top	width=25%><span class=CodeInText>CAknGrid</span></td>
<td valign=top
	width=25%>AknGrid.h</td>
<td valign=top	width=50%>Grid</td></tr>
<tr>
<td valign=top	width=25%><span class=CodeInText>CAknGridM</span></td>
<td valign=top	width=25%>AknGridM.h</td>
<td valign=top	width=50%>Model</td></tr>
<tr>
<td valign=top
	width=25%><span class=CodeInText>CAknGridView</span></td>
<td valign=top
	width=25%>Akngridview.h</td>
<td valign=top	width=50%>View</td></tr>

<tr>
<td valign=top
	width=25%><span class=CodeInText>CAknGMSStyleGrid</span></td>
<td valign=top	width=25%>AknGMSStyleGrid.h</td>
<td valign=top	width=50%>&nbsp;</td></tr>
</table>
 *
 * CAknGridM and CAknGridView classes are instantiated when the grid is instantiated. To refer the ACknGridM object and CAknGridView, the Model() and View() functions are used.  
 *
 *  \subsection Sub5 3.5 Resource definition of grid classes
 *
 * All structures for grid classes are defined in avkon.rhh. The application programmer must define resource data in an .rss file using the grid structure. Example:
 *
<div align=left><table style="width:65%;" cellspacing="4" width="65%" bgcolor="#DDDDDD" class="hcp27">
<tr>
<td 	width=100%>
<p class=CodeInTable>RESOURCE GRID r_grid_resource_app<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; flags = EAknListBoxSelectionListWithShortcuts;<br>
&nbsp; &nbsp; height = 5;<br>
&nbsp; &nbsp; width = 10;<br>
&nbsp; &nbsp; array_id = r_tgrd_app;<br>
&nbsp; &nbsp; emptytext = qtn_grid_text_empty_application_grid;<br>
&nbsp; &nbsp; style = r_grid_style;<br>
&nbsp; &nbsp; }<br>
<br>
RESOURCE ARRAY r_tgrd_app<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; items =<br>
&nbsp; &nbsp; &nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; LBUF { txt = qtn_grid_text_application_grid_array1; 
 },<br>
&nbsp; &nbsp; &nbsp; &nbsp; LBUF { txt = qtn_grid_text_application_grid_array2; 
 }<br>
&nbsp; &nbsp; &nbsp; &nbsp; };<br>
&nbsp; &nbsp; }<br>
<br>
RESOURCE GRID_STYLE r_grid_style<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; layoutflags = EAknGridVerticalOrientation | EAknGridLeftToRight 
 | EAknGridTopToBottom;<br>
&nbsp; &nbsp; primaryscroll = 0;<br>
&nbsp; &nbsp; secondaryscroll = 0;<br>
&nbsp; &nbsp; itemsinprimaryorient = 0;<br>
&nbsp; &nbsp; itemsinsecondaryorient = 0;<br>
&nbsp; &nbsp; height = 0;<br>
&nbsp; &nbsp; width = 0;<br>
&nbsp; &nbsp; gapwidth = 0;<br>
&nbsp; &nbsp; gapheight = 0;<br>
&nbsp; &nbsp; } </td></tr>
</table></div>
 *
 *
<table cellspacing=0		width=80%>
<tr>
<td width=100%><span style="font-weight: bold;">GRID</span></td></tr>
<tr>
<td width=100%>
<table cellspacing=0		width=100%		border=1>
<tr>
<td valign=top	width=20%>flags</td>
<td width=80%>EAknListBoxSelectionGrid :<br>
EAknListBoxSelectionGridWithShortcuts :<br>
EAknListBoxMarkableGrid :<br>
EAknListBoxMarkableGridWithShortcuts :<br>
EAknListBoxMenuGrid : </td></tr>
<tr>
<td valign=top	width=20%>height</td>
<td width=80%>Set the number of items in a vertical direction.</td></tr>
<tr>
<td valign=top	width=20%>width</td>
<td width=80%>Set the number of items in a horizontal direction.</td></tr>
<tr>
<td valign=top	width=20%>array_id</td>
<td width=80%>An array of items to display in the grid.</td></tr>
<tr>
<td valign=top	width=20%>emptytext</td>
<td width=80%>Text string to display when there are no items.</td></tr>
<tr>
<td valign=top	width=20%>style</td>
<td width=80%>GRID_STYLE structure needs to be set.</td></tr>
</table></td></tr>
</table>

<table cellspacing=0		width=80%>
<tr>
<td width=100%><span style="font-weight: bold;">LBUF</span></td></tr>
<tr>
<td width=100%>
<table cellspacing=0		width=100%		border=1>
<tr>
<td valign=top	width=20%>txt</td>
<td width=80%>Text string for item</td></tr>
</table></td></tr>
</table>
<table cellspacing=0		width=80%>
<tr>
<td width=100%><span style="font-weight: bold;">GRID_STYLE</span></td></tr>
<tr>
<td width=100%>
<table cellspacing=0		width=100%		border=1>
<tr>
<td valign=top	width=20%>layoutflags</td>
<td width=80%>Define how to align the items:<br>
Chose one of each layout flags from &lt;Orientatino&gt;, &lt;Horizontal&gt; 
 and &lt;Vertical&gt;.<br>
And define them with logical OR. (*2)<br>
&lt;Orientation&gt;<br>
EAknGridHorizontalOrientation : align horizontally<br>
EAknGridVerticalOrientation : align vertically<br>
&lt;Horizontal&gt;<br>
EAknGridRightToLeft : align from right to left<br>
EAknGridLeftToRight : align from left to right<br>
&lt;Vertical&gt;<br>
EAknGridBottomToTop : align from bottom to top<br>
EAknGridTopToBottom : align from top to bottom </td></tr>

<tr>
<td valign=top	width=20%>primaryscroll</td>
<td width=80%>Define the behaviour of primary scrolling. (Refer *3)<br>
EAknGridFollowsItemsAndStops : Not loop<br>
EAknGridFollowsItemsAndLoops : Loop in a same line<br>
EAknGridFollowsGrid : (Not used)<br>
EAknGridStops : (Not used)<br>

⌨️ 快捷键说明

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