?? mainpage.dox
字號(hào):
/*! \mainpage Menu 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 menus. Menus provide the user functions to execute commands.
*
* To use the menu control in an application, an understanding of the following topics is needed:
*
* - Classes that are related to menus, especially observer classes (MEikCommandObserver, MeikMenuObserver).
* - Writing menu resources and using them.
* - Implementing menu-related classes and their functions, particularly the command handling function. (HandleCommandL)
*
* The menu system provides the following operations:
*
* <b>Left soft key (Options)</b>
* Displays a list of menus to be launched.
*
* <b>Arrow-up/down key</b>
* Moves the menu item cursor and highlights the selected menu item.
*
* <b>Left soft key (Select)</b>
* Executes the selected menu command.
*
* <b>Right soft key (Cancel)</b>
* Closes the menu.
*
* <b>Arrow-right key</b>
* When a menu item having a right arrow (this indicates a sub-menu) is highlighted, this key opens its sub-menu.
*
* <b>Arrow-left key</b>
* When a sub-menu is opened, this key closes the sub-menu.
For all applications, a menu becomes available by pressing the left soft key immediately after the application launches.
*
* <HR>
*
* \section Pre_sec 2. Prerequisites
*
* This example makes use of the standard Symbian OS application framework, comprising the Application, Document, UI, and View classes. The reader should be aware of this architecture before attempting to understand this example.
*
* <HR>
*
* \section Design_sec 3. Design and Implementation
*
* \subsection Sub1 3.1 Capabilities
*
* The program capabilities are defined in %aknexmenu.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
*
* \subsection Sub4 3.3.1 Menu classes
*
<div align=center><table style="width:80%;" cellspacing="0" width="80%" border="1" class="hcp19">
<tr>
<td style="width:25%;" align="center" valign="top" width="25%" class="hcp20">
<p class=TableText
style="text-align: left;"
align=left><i><span style="font-weight: bold; font-style: normal;">Class</span></i></td>
<td style="width:25%;" align="center" valign="top" width="25%" class="hcp20">
<p class=TableText
style="text-align: left;"
align=left><i class="hcp21">Definition</i></td>
<td style="width:50%;" align="center" valign="top" width="50%" class="hcp20">
<p class=TableText
style="text-align: left;"
align=left><i class="hcp21">Description</i></td></tr>
<tr>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>CEikMenuBar</span></td>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>eikmenub.h</span></td>
<td style="width:50%;" valign="top" width="50%" class="hcp23">
<p class=TableText>Concrete class of Menu Bar</td></tr>
<tr>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>CEikMenuPane</span></td>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>eikmenup.h</span></td>
<td style="width:50%;" valign="top" width="50%" class="hcp23">
<p class=TableText>Concrete class of Menu Pane</td></tr>
</table>
</div>
*
* \subsection Sub5 3.3.2 Related classes
*
<div align=center><table style="width:80%;" cellspacing="0" width="80%" border="1" class="hcp19">
<tr>
<td style="width:25%;" align="center" valign="top" width="25%" class="hcp20">
<p class=TableText
style="text-align: left;"
align=left><i class="hcp21">Class</i></td>
<td style="width:25%;" align="center" valign="top" width="25%" class="hcp20">
<p class=TableText
style="text-align: left;"
align=left><i class="hcp21">Definition</i></td>
<td style="width:50%;" align="center" valign="top" width="50%" class="hcp20">
<p class=TableText
style="text-align: left;"
align=left><i class="hcp21">Description</i></td></tr>
<tr>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>MEikCommandObserver</span></td>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>eikcmobs.h</span></td>
<td style="width:50%;" valign="top" width="50%" class="hcp23">
<p class=TableText>Interface class for command handling</td></tr>
<tr>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>MEikMenuObserver</span></td>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>eikmobs.h</span></td>
<td style="width:50%;" valign="top" width="50%" class="hcp23">
<p class=TableText>Interface class for menu handling</td></tr>
<tr>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>CAknView</span></td>
<td style="width:25%;" valign="bottom" width="25%" class="hcp22"><span class=CodeInText>aknview.h</span></td>
<td style="width:50%;" valign="top" width="50%" class="hcp23">
<p class=TableText>Base class of application view</td></tr>
</table>
</div>
*
* \subsection Sub6 3.3.3 The sequence of a command message
*
* When MenuPane receives a key event, it calls ProcessCommandL of CAknExMenuView directly. Then ProcessCommandL in CAknExMenuView calls HandleCommandL in itself.
*
* \subsection Sub7 3.3.4 Resource definition of the menu
*
* The following is the example resource definition of the menu:
*
<div align=left><table style="width:70%;" cellspacing="4" width="70%" bgcolor="#DDDDDD" class="hcp24">
<tr>
<td style="width: 100%;"
width=100%><i class="hcp25"><b class="hcp14">AVKON_VIEW</b>
resource definition is as follows:</i></td></tr>
<tr>
<td style="width:100%;" bgcolor="#EEEEEE" width="100%" class="hcp26">
<p class=CodeInTable>RESOURCE AVKON_VIEW r_aknexmenu_no_sub_menu<br>
{<br>
hotkeys = r_aknexmenu_hotkeys;<br>
menubar = r_aknexmenu_menubar_no_sub_menu;
// <- MenuBar Resource<br>
cba = R_AVKON_SOFTKEYS_SELECTION_LIST;<br>
} </td></tr>
</table>
</div> <br><div align=left><table style="width:70%;" cellspacing="4" width="70%" bgcolor="#DDDDDD" class="hcp24">
<tr>
<td style="width: 100%;"
width=100%><i class="hcp25"><b class="hcp14">MENU_BAR</b>
resource definition is as follows:</i></td></tr>
<tr>
<td style="width:100%;" bgcolor="#EEEEEE" width="100%" class="hcp26">
<p class=CodeInTable>RESOURCE MENU_BAR r_aknexmenu_menubar_no_sub_menu<br>
{<br>
titles=<br>
{<br>
MENU_TITLE // System Menu Definition<br>
{<br>
txt = qtn_aknexmenu_menu_system;<br>
menu_pane = r_aknexmenu_no_sub_system_menu;<br>
},<br>
MENU_TITLE //Application Menu Definition<br>
{<br>
txt = qtn_aknexmenu_menu_app;<br>
menu_pane = r_aknexmenu_no_sub_app_menu;<br>
},<br>
MENU_TITLE // state menu definition<br>
{<br>
txt = qtn_aknexmenu_menu_state;<br>
menu_pane = r_aknexmenu_no_sub_state_menu;<br>
},<br>
MENU_TITLE // Context Menu Definition<br>
{<br>
txt = qtn_aknexmenu_menu_context;<br>
menu_pane = r_aknexmenu_no_sub_context_menu;<br>
}<br>
};<br>
} </td></tr>
</table>
</div>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -