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

📄 class_c_br_ctl_sample_app_state_change_observer.html

📁 S60上实现嵌入式浏览器,可以在应用程序中嵌入浏览器,实现IE功能
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>CBrCtlSampleAppStateChangeObserver Class Reference</title><link href="style.css" rel="stylesheet" type="text/css"></head><table border="0" width="100%" height="8" bgcolor="#eeeeee"> <tr> <td width="100%" height="1"><b><font size="2" color="#000000" face="Arial, Helvetica, sans-serif"><strong><a name=Top></a> S60 3rd Edition SDK for Symbian OS </strong></font></b><br><i>Example Applications Guide</i></td></tr> </table><!-- Generated by Doxygen 1.4.5 --><h1>CBrCtlSampleAppStateChangeObserver Class Reference</h1><!-- doxytag: class="CBrCtlSampleAppStateChangeObserver" --><code>#include &lt;<a class="el" href="_br_ctl_sample_app_state_change_observer_8h-source.html">BrCtlSampleAppStateChangeObserver.h</a>&gt;</code><p><a href="class_c_br_ctl_sample_app_state_change_observer-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_br_ctl_sample_app_state_change_observer.html#ce6ae03dfc20b7c48b3001f78cdd4910">~CBrCtlSampleAppStateChangeObserver</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_br_ctl_sample_app_state_change_observer.html#2c6cfeb400514e5e66d62bc2f27c4325">StateChanged</a> (TBrCtlDefs::TBrCtlState aState, TInt aValue)</td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_c_br_ctl_sample_app_state_change_observer.html">CBrCtlSampleAppStateChangeObserver</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_br_ctl_sample_app_state_change_observer.html#4fd01c832782cfd14178a08789e4d753">NewL</a> (<a class="el" href="class_c_br_ctl_sample_app_container.html">CBrCtlSampleAppContainer</a> *aContainer)</td></tr><tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_br_ctl_sample_app_state_change_observer.html#1ab13f06c65a5d88cba6c0219ed3d5eb">ConstructL</a> (<a class="el" href="class_c_br_ctl_sample_app_container.html">CBrCtlSampleAppContainer</a> *aContainer)</td></tr><tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6dc94c8cd7c107bc61701348814020e6"></a><!-- doxytag: member="CBrCtlSampleAppStateChangeObserver::iContainer" ref="6dc94c8cd7c107bc61701348814020e6" args="" --><a class="el" href="class_c_br_ctl_sample_app_container.html">CBrCtlSampleAppContainer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_br_ctl_sample_app_state_change_observer.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>CBrCtlSampleAppStateChangeObserver class. This class inherits from the MBrCtlStateChangeObserver interface which is used to receive state-changed events. <p><p>Definition at line <a class="el" href="_br_ctl_sample_app_state_change_observer_8h-source.html#l00033">33</a> of file <a class="el" href="_br_ctl_sample_app_state_change_observer_8h-source.html">BrCtlSampleAppStateChangeObserver.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="ce6ae03dfc20b7c48b3001f78cdd4910"></a><!-- doxytag: member="CBrCtlSampleAppStateChangeObserver::~CBrCtlSampleAppStateChangeObserver" ref="ce6ae03dfc20b7c48b3001f78cdd4910" 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">CBrCtlSampleAppStateChangeObserver::~CBrCtlSampleAppStateChangeObserver           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Destructor. <p>Definition at line <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html#l00060">60</a> of file <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html">BrCtlSampleAppStateChangeObserver.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00061"></a>00061     {<a name="l00062"></a>00062     }</pre></div><p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="4fd01c832782cfd14178a08789e4d753"></a><!-- doxytag: member="CBrCtlSampleAppStateChangeObserver::NewL" ref="4fd01c832782cfd14178a08789e4d753" args="(CBrCtlSampleAppContainer *aContainer)" --><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_br_ctl_sample_app_state_change_observer.html">CBrCtlSampleAppStateChangeObserver</a> * CBrCtlSampleAppStateChangeObserver::NewL           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_c_br_ctl_sample_app_container.html">CBrCtlSampleAppContainer</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>aContainer</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Two-phased constructor. <p>Definition at line <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html#l00070">70</a> of file <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html">BrCtlSampleAppStateChangeObserver.cpp</a>.<p>References <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html#l00051">ConstructL()</a>.<div class="fragment"><pre class="fragment"><a name="l00071"></a>00071 {<a name="l00072"></a>00072   <a class="code" href="class_c_br_ctl_sample_app_state_change_observer.html">CBrCtlSampleAppStateChangeObserver</a>* <span class="keyword">self</span> = <span class="keyword">new</span>(ELeave)<a class="code" href="class_c_br_ctl_sample_app_state_change_observer.html">CBrCtlSampleAppStateChangeObserver</a>;<a name="l00073"></a>00073   CleanupStack::PushL(<span class="keyword">self</span>);<a name="l00074"></a>00074   <span class="keyword">self</span>-&gt;ConstructL(aContainer);<a name="l00075"></a>00075   CleanupStack::Pop();<a name="l00076"></a>00076   <span class="keywordflow">return</span> <span class="keyword">self</span>;<a name="l00077"></a>00077 }</pre></div><p>    </td>  </tr></table><a class="anchor" name="2c6cfeb400514e5e66d62bc2f27c4325"></a><!-- doxytag: member="CBrCtlSampleAppStateChangeObserver::StateChanged" ref="2c6cfeb400514e5e66d62bc2f27c4325" args="(TBrCtlDefs::TBrCtlState aState, TInt aValue)" --><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 CBrCtlSampleAppStateChangeObserver::StateChanged           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">TBrCtlDefs::TBrCtlState&nbsp;</td>          <td class="mdname" nowrap> <em>aState</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>TInt&nbsp;</td>          <td class="mdname" nowrap> <em>aValue</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>A state change events notification <dl compact><dt><b>Since:</b></dt><dd>2.8 </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>aState</em>&nbsp;</td><td>The state, currently the only state is EStateImageMapView </td></tr>    <tr><td valign="top"></td><td valign="top"><em>aValue</em>&nbsp;</td><td>This value will be true if we going to image map view and it will be false if we are returning from image map view </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>void </dd></dl><p>Definition at line <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html#l00027">27</a> of file <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html">BrCtlSampleAppStateChangeObserver.cpp</a>.<p>References <a class="el" href="_br_ctl_sample_app_state_change_observer_8h-source.html#l00065">iContainer</a>, <a class="el" href="_br_ctl_sample_app_container_8cpp-source.html#l00213">CBrCtlSampleAppContainer::SetPoint()</a>, and <a class="el" href="_br_ctl_sample_app_container_8cpp-source.html#l00203">CBrCtlSampleAppContainer::SetText()</a>.<div class="fragment"><pre class="fragment"><a name="l00029"></a>00029     {<a name="l00030"></a>00030     <span class="comment">// Here we are creating a string to be displayed on the screen, but you would</span><a name="l00031"></a>00031     <span class="comment">// implement this method to have code that would be executed when the observer</span><a name="l00032"></a>00032     <span class="comment">// receives state changed events.</span><a name="l00033"></a>00033     TBuf16&lt;256&gt; tgt; <a name="l00034"></a>00034     TPoint point(0, 120);<a name="l00035"></a>00035 <a name="l00036"></a>00036     _LIT(KHandleBrowserStateChange, <span class="stringliteral">"State Change event = %d, value = %d"</span>);<a name="l00037"></a>00037      <a name="l00038"></a>00038     tgt.AppendFormat(KHandleBrowserStateChange, aState, aValue);<a name="l00039"></a>00039 <a name="l00040"></a>00040     <a class="code" href="class_c_br_ctl_sample_app_state_change_observer.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a>-&gt;<a class="code" href="class_c_br_ctl_sample_app_container.html#0d5135f692b821997451b42177b8774e">SetPoint</a>(point);<a name="l00041"></a>00041     <a class="code" href="class_c_br_ctl_sample_app_state_change_observer.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a>-&gt;<a class="code" href="class_c_br_ctl_sample_app_container.html#a6d697ab177a94bd02bf8b97ed737330">SetText</a>(tgt);<a name="l00042"></a>00042 <a name="l00043"></a>00043     <a class="code" href="class_c_br_ctl_sample_app_state_change_observer.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a>-&gt;DrawNow();<a name="l00044"></a>00044     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="1ab13f06c65a5d88cba6c0219ed3d5eb"></a><!-- doxytag: member="CBrCtlSampleAppStateChangeObserver::ConstructL" ref="1ab13f06c65a5d88cba6c0219ed3d5eb" args="(CBrCtlSampleAppContainer *aContainer)" --><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 CBrCtlSampleAppStateChangeObserver::ConstructL           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_c_br_ctl_sample_app_container.html">CBrCtlSampleAppContainer</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>aContainer</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>By default Symbian 2nd phase constructor is private. <p>Definition at line <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html#l00051">51</a> of file <a class="el" href="_br_ctl_sample_app_state_change_observer_8cpp-source.html">BrCtlSampleAppStateChangeObserver.cpp</a>.<p>References <a class="el" href="_br_ctl_sample_app_state_change_observer_8h-source.html#l00065">iContainer</a>.<div class="fragment"><pre class="fragment"><a name="l00052"></a>00052     {<a name="l00053"></a>00053     <a class="code" href="class_c_br_ctl_sample_app_state_change_observer.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a> = aContainer;<a name="l00054"></a>00054     }</pre></div><p>    </td>  </tr></table><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 + -