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

📄 class_c_hello_world_basic_app_ui.html

📁 使用carbide.c++开发的基于symbian 3rd的操作系统的短信删除软件。 可以删除收件箱内所有软件和指定软件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a class="anchor" name="a682d228622cea7790645ce10f591242"></a><!-- doxytag: member="CHelloWorldBasicAppUi::HandleCommandL" ref="a682d228622cea7790645ce10f591242" args="(TInt aCommand)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void CHelloWorldBasicAppUi::HandleCommandL           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">TInt&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>aCommand</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>From CEikAppUi, HandleCommandL. Takes care of command handling. <dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>aCommand</em>&nbsp;</td><td>Command to be handled. </td></tr>  </table></dl><p>Definition at line <a class="el" href="helloworldbasicappui_8cpp-source.html#l00124">124</a> of file <a class="el" href="helloworldbasicappui_8cpp-source.html">helloworldbasicappui.cpp</a>.<p>References <a class="el" href="helloworldbasicappview_8cpp-source.html#l00138">CHelloWorldBasicAppView::GetText()</a>, and <a class="el" href="helloworldbasicappui_8h-source.html#l00077">iAppView</a>.<div class="fragment"><pre class="fragment"><a name="l00125"></a>00125     {<a name="l00126"></a>00126     <span class="comment">// clear possible old user-given text</span><a name="l00127"></a>00127     <a class="code" href="class_c_hello_world_basic_app_ui.html#45dd0a3e0e75e56b4727a01a8ef2c6b1">iAppView</a>-&gt;<a class="code" href="class_c_hello_world_basic_app_view.html#59cee462c5e06d883260d21037a3ebd7">GetText</a>().Zero();<a name="l00128"></a>00128 <a name="l00129"></a>00129     <span class="keywordflow">switch</span>( aCommand )<a name="l00130"></a>00130         {<a name="l00131"></a>00131         <span class="keywordflow">case</span> EEikCmdExit:<a name="l00132"></a>00132         <span class="keywordflow">case</span> EAknSoftkeyExit:<a name="l00133"></a>00133             Exit();<a name="l00134"></a>00134             <span class="keywordflow">break</span>;<a name="l00135"></a>00135 <a name="l00136"></a>00136         <span class="keywordflow">case</span> EHelloWorldBasicCommand1:<a name="l00137"></a>00137             {<a name="l00138"></a>00138             <span class="comment">// Load a string from the resource file and display it</span><a name="l00139"></a>00139             HBufC* textResource = StringLoader::LoadLC( R_HEWB_COMMAND1_TEXT );<a name="l00140"></a>00140             CAknInformationNote* note = <span class="keyword">new</span> ( ELeave ) CAknInformationNote;<a name="l00141"></a>00141 <a name="l00142"></a>00142             <span class="comment">// Show the information Note with</span><a name="l00143"></a>00143             <span class="comment">// textResource loaded with StringLoader.</span><a name="l00144"></a>00144             note-&gt;ExecuteLD( *textResource );<a name="l00145"></a>00145 <a name="l00146"></a>00146             <span class="comment">// Pop HBuf from CleanUpStack and Destroy it.</span><a name="l00147"></a>00147             CleanupStack::PopAndDestroy( textResource );<a name="l00148"></a>00148             }<a name="l00149"></a>00149             <span class="keywordflow">break</span>;<a name="l00150"></a>00150 <a name="l00151"></a>00151         <span class="keywordflow">case</span> EHelloWorldBasicCommand2:<a name="l00152"></a>00152             {<a name="l00153"></a>00153             RFs fsSession;<a name="l00154"></a>00154             RFile rFile;<a name="l00155"></a>00155 <a name="l00156"></a>00156             <span class="comment">// Connects a client process to the fileserver</span><a name="l00157"></a>00157             User::LeaveIfError(fsSession.Connect());<a name="l00158"></a>00158             CleanupClosePushL(fsSession);<a name="l00159"></a>00159 <a name="l00160"></a>00160             <span class="comment">//Open file where the stream text is</span><a name="l00161"></a>00161             User::LeaveIfError(rFile.Open(fsSession,KHelloFileName, EFileStreamText));<a name="l00162"></a>00162             CleanupClosePushL(rFile);<a name="l00163"></a>00163 <a name="l00164"></a>00164             <span class="comment">// copy stream from file to RFileStream object</span><a name="l00165"></a>00165             RFileReadStream inputFileStream(rFile);<a name="l00166"></a>00166             CleanupClosePushL(inputFileStream);<a name="l00167"></a>00167 <a name="l00168"></a>00168             <span class="comment">// HBufC descriptor is created from the RFileStream object.</span><a name="l00169"></a>00169             HBufC* fileData = HBufC::NewLC(inputFileStream, 32);<a name="l00170"></a>00170 <a name="l00171"></a>00171             CAknInformationNote* note = <span class="keyword">new</span> ( ELeave ) CAknInformationNote;<a name="l00172"></a>00172 <a name="l00173"></a>00173             <span class="comment">// Show the information Note</span><a name="l00174"></a>00174             note-&gt;ExecuteLD( *fileData );<a name="l00175"></a>00175 <a name="l00176"></a>00176             <span class="comment">// Pop loaded resources from the cleanup stack:</span><a name="l00177"></a>00177             <span class="comment">// filedata, inputFileStream, rFile, fsSession</span><a name="l00178"></a>00178             CleanupStack::PopAndDestroy(4, &amp;fsSession);<a name="l00179"></a>00179             }<a name="l00180"></a>00180             <span class="keywordflow">break</span>;<a name="l00181"></a>00181 <a name="l00182"></a>00182         <span class="keywordflow">case</span> EHelloWorldBasicCommand3:<a name="l00183"></a>00183             {<a name="l00184"></a>00184             <span class="comment">// Load a string from the resources and use it as a default value</span><a name="l00185"></a>00185             HBufC* defaultText = StringLoader::LoadLC( R_HEWB_FILE_TEXT );<a name="l00186"></a>00186 <a name="l00187"></a>00187             <a class="code" href="class_c_hello_world_query_dialog.html">CHelloWorldQueryDialog</a> *dlg = <span class="keyword">new</span> (ELeave)<a name="l00188"></a>00188                 <a class="code" href="class_c_hello_world_query_dialog.html">CHelloWorldQueryDialog</a>( <a class="code" href="class_c_hello_world_basic_app_ui.html#45dd0a3e0e75e56b4727a01a8ef2c6b1">iAppView</a>-&gt;<a class="code" href="class_c_hello_world_basic_app_view.html#59cee462c5e06d883260d21037a3ebd7">GetText</a>(), defaultText );<a name="l00189"></a>00189 <a name="l00190"></a>00190             dlg-&gt;ExecuteLD( R_DIALOG_TEXT_EDIT_QUERY );<a name="l00191"></a>00191 <a name="l00192"></a>00192             <span class="comment">// Pop HBuf from CleanUpStack and Destroy it.</span><a name="l00193"></a>00193             CleanupStack::PopAndDestroy( defaultText );<a name="l00194"></a>00194             }<a name="l00195"></a>00195             <span class="keywordflow">break</span>;<a name="l00196"></a>00196 <a name="l00197"></a>00197         <span class="keywordflow">default</span>:<a name="l00198"></a>00198             <span class="keywordflow">break</span>;<a name="l00199"></a>00199         }<a name="l00200"></a>00200     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="6acdbe8a9b57446075bf46d035e751eb"></a><!-- doxytag: member="CHelloWorldBasicAppUi::HandleResourceChangeL" ref="6acdbe8a9b57446075bf46d035e751eb" args="(TInt aType)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void CHelloWorldBasicAppUi::HandleResourceChangeL           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">TInt&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>aType</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p><a class="el" href="class_c_hello_world_basic_app_ui.html#6acdbe8a9b57446075bf46d035e751eb">HandleResourceChangeL()</a> Called by framework when layout is changed. <dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>aType</em>&nbsp;</td><td>the type of resources that have changed </td></tr>  </table></dl><p>Definition at line <a class="el" href="helloworldbasicappui_8cpp-source.html#l00206">206</a> of file <a class="el" href="helloworldbasicappui_8cpp-source.html">helloworldbasicappui.cpp</a>.<p>References <a class="el" href="helloworldbasicappui_8h-source.html#l00077">iAppView</a>.<div class="fragment"><pre class="fragment"><a name="l00207"></a>00207 {<a name="l00208"></a>00208     <span class="comment">// base-class call also</span><a name="l00209"></a>00209     CAknAppUi::HandleResourceChangeL(aType);<a name="l00210"></a>00210     <span class="keywordflow">if</span> (aType == KEikDynamicLayoutVariantSwitch)<a name="l00211"></a>00211         {<a name="l00212"></a>00212         <span class="keywordflow">if</span> (<a class="code" href="class_c_hello_world_basic_app_ui.html#45dd0a3e0e75e56b4727a01a8ef2c6b1">iAppView</a>)<a name="l00213"></a>00213             iAppView-&gt;SetRect( ClientRect() );<a name="l00214"></a>00214         }<a name="l00215"></a>00215 }</pre></div><p>    </td>  </tr></table><hr><h2>Member Data Documentation</h2><a class="anchor" name="45dd0a3e0e75e56b4727a01a8ef2c6b1"></a><!-- doxytag: member="CHelloWorldBasicAppUi::iAppView" ref="45dd0a3e0e75e56b4727a01a8ef2c6b1" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="class_c_hello_world_basic_app_view.html">CHelloWorldBasicAppView</a>* <a class="el" href="class_c_hello_world_basic_app_ui.html#45dd0a3e0e75e56b4727a01a8ef2c6b1">CHelloWorldBasicAppUi::iAppView</a><code> [private]</code>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>The application view Owned by CHelloWorldBasicAppUi <p>Definition at line <a class="el" href="helloworldbasicappui_8h-source.html#l00077">77</a> of file <a class="el" href="helloworldbasicappui_8h-source.html">helloworldbasicappui.h</a>.<p>Referenced by <a class="el" href="helloworldbasicappui_8cpp-source.html#l00040">ConstructL()</a>, <a class="el" href="helloworldbasicappui_8cpp-source.html#l00124">HandleCommandL()</a>, <a class="el" href="helloworldbasicappui_8cpp-source.html#l00206">HandleResourceChangeL()</a>, and <a class="el" href="helloworldbasicappui_8cpp-source.html#l00110">~CHelloWorldBasicAppUi()</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="helloworldbasicappui_8h-source.html">helloworldbasicappui.h</a><li><a class="el" href="helloworldbasicappui_8cpp-source.html">helloworldbasicappui.cpp</a></ul><hr><table x-use-null-cells		style="x-cell-content-align: top;				width: 100%;				border-spacing: 0px;				border-spacing: 0px;"		cellspacing=0		width=100%>  <col style="width: 50%;">  <col style="width: 50%;">  <tr style="x-cell-content-align: top;"	valign=top>  <td style="width: 50%;			padding-right: 10px;			padding-left: 10px;			border-right-style: None;			border-left-style: None;			border-top-style: None;			border-bottom-style: None;"	width=50%>  <p style="font-family: Arial;"><small style="font-size: smaller;">

⌨️ 快捷键说明

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