📄 class_c_focus_event_app_view.html
字号:
<td class="mdname1" valign="top" nowrap> <em>aText</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Print. Display/Write text via the selected methods. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aText</em> </td><td>the text to display </td></tr> </table></dl><p>Definition at line <a class="el" href="focuseventappview_8cpp-source.html#l00124">124</a> of file <a class="el" href="focuseventappview_8cpp-source.html">focuseventappview.cpp</a>.<p>References <a class="el" href="focuseventappview_8cpp-source.html#l00134">ShowTextOnScreen()</a>.<p>Referenced by <a class="el" href="focuseventappui_8cpp-source.html#l00092">CFocusEventAppUi::HandleForegroundEventL()</a>.<div class="fragment"><pre class="fragment"><a name="l00125"></a>00125 {<a name="l00126"></a>00126 <a class="code" href="class_c_focus_event_app_view.html#0e66541056b289546108814685519f69">ShowTextOnScreen</a>( aText );<a name="l00127"></a>00127 }</pre></div><p> </td> </tr></table><a class="anchor" name="07d5ce838d6f875de7f10db4e60a0f6a"></a><!-- doxytag: member="CFocusEventAppView::PrintNewLineL" ref="07d5ce838d6f875de7f10db4e60a0f6a" 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">void CFocusEventAppView::PrintNewLineL </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>PrintNewLineL. Display/Write a new line via the selected methods. <p>Definition at line <a class="el" href="focuseventappview_8cpp-source.html#l00155">155</a> of file <a class="el" href="focuseventappview_8cpp-source.html">focuseventappview.cpp</a>.<p>References <a class="el" href="focuseventappview_8h-source.html#l00118">iTextLines</a>.<p>Referenced by <a class="el" href="focuseventappui_8cpp-source.html#l00092">CFocusEventAppUi::HandleForegroundEventL()</a>.<div class="fragment"><pre class="fragment"><a name="l00156"></a>00156 {<a name="l00157"></a>00157 <span class="comment">// Add a new line onto the array</span><a name="l00158"></a>00158 <span class="comment">// If the array is already at the maximum size,</span><a name="l00159"></a>00159 <span class="comment">// delete the first line of text</span><a name="l00160"></a>00160 <span class="keywordflow">if</span> ( <a class="code" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">iTextLines</a>.Count() >= KMaxTextLines )<a name="l00161"></a>00161 {<a name="l00162"></a>00162 <a class="code" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">iTextLines</a>.Remove( 0 );<a name="l00163"></a>00163 }<a name="l00164"></a>00164 User::LeaveIfError( <a class="code" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">iTextLines</a>.Append( KNullDesC() ) );<a name="l00165"></a>00165 DrawNow();<a name="l00166"></a>00166 }</pre></div><p> </td> </tr></table><a class="anchor" name="67f946ca7848ec78de4961c5bcefdb72"></a><!-- doxytag: member="CFocusEventAppView::Draw" ref="67f946ca7848ec78de4961c5bcefdb72" args="(const TRect &aRect) const " --><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 CFocusEventAppView::Draw </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TRect & </td> <td class="mdname1" valign="top" nowrap> <em>aRect</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Draw. Draw this CFocusEventAppView to the screen. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aRect</em> </td><td>the rectangle of this view that needs updating </td></tr> </table></dl><p>Definition at line <a class="el" href="focuseventappview_8cpp-source.html#l00096">96</a> of file <a class="el" href="focuseventappview_8cpp-source.html">focuseventappview.cpp</a>.<p>References <a class="el" href="focuseventappview_8h-source.html#l00118">iTextLines</a>.<div class="fragment"><pre class="fragment"><a name="l00097"></a>00097 {<a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="comment">// Get the standard graphics context</span><a name="l00100"></a>00100 CWindowGc& gc = SystemGc();<a name="l00101"></a>00101 <a name="l00102"></a>00102 <span class="comment">// Gets the control's extent</span><a name="l00103"></a>00103 TRect drawRect=Rect();<a name="l00104"></a>00104 gc.UseFont( NEikonEnvironment::EikEnv().AnnotationFont() );<a name="l00105"></a>00105 <a name="l00106"></a>00106 <span class="comment">// Clears the screen</span><a name="l00107"></a>00107 gc.Clear( drawRect );<a name="l00108"></a>00108 <a name="l00109"></a>00109 <span class="comment">// Draw all lines of text</span><a name="l00110"></a>00110 TInt count;<a name="l00111"></a>00111 <span class="keywordflow">for</span> ( count = 0; count < <a class="code" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">iTextLines</a>.Count(); count++ )<a name="l00112"></a>00112 {<a name="l00113"></a>00113 gc.DrawText( <a class="code" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">iTextLines</a>[ count ],<a name="l00114"></a>00114 TPoint( KTextXMargin, KTextMinY+<a name="l00115"></a>00115 ( count*KTextDistanceBetweenLines ) ) );<a name="l00116"></a>00116 }<a name="l00117"></a>00117 }</pre></div><p> </td> </tr></table><a class="anchor" name="389d15aa1abc22fb211d040f034e4e31"></a><!-- doxytag: member="CFocusEventAppView::HandleResourceChange" ref="389d15aa1abc22fb211d040f034e4e31" 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 CFocusEventAppView::HandleResourceChange </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TInt </td> <td class="mdname1" valign="top" nowrap> <em>aType</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [private, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>From CoeControl, HandleResourceChange. Called by framework when the view layout is changed. <p>Definition at line <a class="el" href="focuseventappview_8cpp-source.html#l00173">173</a> of file <a class="el" href="focuseventappview_8cpp-source.html">focuseventappview.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00174"></a>00174 {<a name="l00175"></a>00175 CCoeControl::HandleResourceChange(aType);<a name="l00176"></a>00176 <a name="l00177"></a>00177 <span class="comment">// ADDED FOR SCALABLE UI SUPPORT</span><a name="l00178"></a>00178 <span class="comment">// *****************************</span><a name="l00179"></a>00179 <span class="keywordflow">if</span> ( aType==KEikDynamicLayoutVariantSwitch )<a name="l00180"></a>00180 {<a name="l00181"></a>00181 TRect rect;<a name="l00182"></a>00182 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);<a name="l00183"></a>00183 SetRect(rect);<a name="l00184"></a>00184 }<a name="l00185"></a>00185 }</pre></div><p> </td> </tr></table><a class="anchor" name="bf31593b337cbf3fb671382cf773281c"></a><!-- doxytag: member="CFocusEventAppView::ConstructL" ref="bf31593b337cbf3fb671382cf773281c" args="(const TRect &aRect)" --><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 CFocusEventAppView::ConstructL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TRect & </td> <td class="mdname1" valign="top" nowrap> <em>aRect</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>ConstructL. 2nd phase constructor. Perform the second phase construction of a CFocusEventAppView object. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aRect</em> </td><td>The rectangle this view will be drawn to. </td></tr> </table></dl><p>Definition at line <a class="el" href="focuseventappview_8cpp-source.html#l00066">66</a> of file <a class="el" href="focuseventappview_8cpp-source.html">focuseventappview.cpp</a>.<p>References <a class="el" href="focuseventappview_8h-source.html#l00118">iTextLines</a>.<p>Referenced by <a class="el" href="focuseventappview_8cpp-source.html#l00053">NewLC()</a>.<div class="fragment"><pre class="fragment"><a name="l00067"></a>00067 {<a name="l00068"></a>00068 <span class="comment">// Create a window for this application view</span><a name="l00069"></a>00069 CreateWindowL();<a name="l00070"></a>00070 <a name="l00071"></a>00071 <span class="comment">// Set the windows size</span><a name="l00072"></a>00072 SetRect( aRect );<a name="l00073"></a>00073 <a name="l00074"></a>00074 <span class="comment">// Activate the window, which makes it ready to be drawn</span><a name="l00075"></a>00075 ActivateL();<a name="l00076"></a>00076 <a name="l00077"></a>00077 <span class="comment">// Add the first blank line to the array of text lines</span><a name="l00078"></a>00078 User::LeaveIfError( <a class="code" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">iTextLines</a>.Append( KNullDesC() ) );<a name="l00079"></a>00079 }</pre></div><p> </td> </tr></table><hr><h2>Member Data Documentation</h2><a class="anchor" name="074ac1c7490630dfae97d172ebbb7d45"></a><!-- doxytag: member="CFocusEventAppView::iTextLines" ref="074ac1c7490630dfae97d172ebbb7d45" 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">RArray<TTextLine> <a class="el" href="class_c_focus_event_app_view.html#074ac1c7490630dfae97d172ebbb7d45">CFocusEventAppView::iTextLines</a><code> [private]</code> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>iTextLines The lines of text being displayed on the screen <p>Definition at line <a class="el" href="focuseventappview_8h-source.html#l00118">118</a> of file <a class="el" href="focuseventappview_8h-source.html">focuseventappview.h</a>.<p>Referenced by <a class="el" href="focuseventappview_8cpp-source.html#l00066">ConstructL()</a>, <a class="el" href="focuseventappview_8cpp-source.html#l00096">Draw()</a>, <a class="el" href="focuseventappview_8cpp-source.html#l00155">PrintNewLineL()</a>, <a class="el" href="focuseventappview_8cpp-source.html#l00134">ShowTextOnScreen()</a>, and <a class="el" href="focuseventappview_8cpp-source.html#l00086">~CFocusEventAppView()</a>. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="focuseventappview_8h-source.html">focuseventappview.h</a><li><a class="el" href="focuseventappview_8cpp-source.html">focuseventappview.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 + -