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

📄 classwgui_1_1ctimer.html

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 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>wGui::CTimer class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; </center><hr><h1>wGui::CTimer Class Reference</h1>A simple timer class <a class="el" href="classwGui_1_1CTimer.html">CTimer</a> will post a CTRL_TIMER message every time the timer expires. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="wg__timer_8h-source.html">wg_timer.h</a>&gt;</code><p><p>Inheritance diagram for wGui::CTimer:<p><center><img src="classwGui_1_1CTimer.png" usemap="#wGui::CTimer_map" border="0" alt=""></center><map name="wGui::CTimer_map"><area href="classwGui_1_1CMessageClient.html" alt="wGui::CMessageClient" shape="rect" coords="0,0,138,24"></map><h2>Public Methods</h2><ul><li><a class="el" href="classwGui_1_1CTimer.html#a0">CTimer</a> (<a class="el" href="classwGui_1_1CMessageClient.html">CMessageClient</a> *pOwner=0)<li><a name="a1" doxytag="wGui::CTimer::~CTimer"></a>virtual <a class="el" href="classwGui_1_1CTimer.html#a1">~CTimer</a> (void)<dl class="el"><dd><font size=-1><em>Standard destructor.<br><br></em></font></dl><li>void <a class="el" href="classwGui_1_1CTimer.html#a2">StartTimer</a> (unsigned long int Interval, bool bAutoRestart=false)<li><a name="a3" doxytag="wGui::CTimer::StopTimer"></a>void <a class="el" href="classwGui_1_1CTimer.html#a3">StopTimer</a> (void)<dl class="el"><dd><font size=-1><em>Stops the running timer.<br><br></em></font></dl><li><a name="a4" doxytag="wGui::CTimer::IsRunning"></a>bool <a class="el" href="classwGui_1_1CTimer.html#a4">IsRunning</a> (void)<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true is the timer is currently running</dl><br><br></em></font></dl><li><a name="a5" doxytag="wGui::CTimer::GetCount"></a>long int <a class="el" href="classwGui_1_1CTimer.html#a5">GetCount</a> (void) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>The count of times the timer has fired</dl><br><br></em></font></dl><li><a name="a6" doxytag="wGui::CTimer::ResetCount"></a>void <a class="el" href="classwGui_1_1CTimer.html#a6">ResetCount</a> (void)<dl class="el"><dd><font size=-1><em>Resets the internal counter to zero.<br><br></em></font></dl><li>Uint32 <a class="el" href="classwGui_1_1CTimer.html#a7">TimerHit</a> (Uint32 Interval)<li>virtual bool <a class="el" href="classwGui_1_1CTimer.html#a8">HandleMessage</a> (<a class="el" href="classwGui_1_1CMessage.html">CMessage</a> *pMessage)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CTimer::m_TimerID"></a>SDL_TimerID <a class="el" href="classwGui_1_1CTimer.html#n0">m_TimerID</a><dl class="el"><dd><font size=-1><em>The ID of the SDL timer used.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CTimer::m_bAutoRestart"></a>bool <a class="el" href="classwGui_1_1CTimer.html#n1">m_bAutoRestart</a><dl class="el"><dd><font size=-1><em>If this is true, the timer will restart as soon as it expires.<br><br></em></font></dl><li><a name="n2" doxytag="wGui::CTimer::m_iCounter"></a>long int <a class="el" href="classwGui_1_1CTimer.html#n2">m_iCounter</a><dl class="el"><dd><font size=-1><em>A simple counter that increments each time the timer fires.<br><br></em></font></dl><li><a name="n3" doxytag="wGui::CTimer::m_pOwner"></a><a class="el" href="classwGui_1_1CMessageClient.html">CMessageClient</a> * <a class="el" href="classwGui_1_1CTimer.html#n3">m_pOwner</a><dl class="el"><dd><font size=-1><em>A pointer the the timer's owner. this is where messages are destined.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A simple timer class <a class="el" href="classwGui_1_1CTimer.html">CTimer</a> will post a CTRL_TIMER message every time the timer expires.<p><p>Definition at line <a class="el" href="wg__timer_8h-source.html#l00043">43</a> of file <a class="el" href="wg__timer_8h-source.html">wg_timer.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="wGui::CTimer::CTimer"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> wGui::CTimer::CTimer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CMessageClient.html">CMessageClient</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>pOwner</em> = 0          </td>          <td class="md" valign="top">)&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>Standard constructor <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pOwner</em>&nbsp;</td><td>A pointer to the timer 'owner'. This is what the timer will set as the destination for it's messages. Use 0 to broadcast the message. </td></tr></table></dl><p>Definition at line <a class="el" href="wg__timer_8cpp-source.html#l00039">39</a> of file <a class="el" href="wg__timer_8cpp-source.html">wg_timer.cpp</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a8" doxytag="wGui::CTimer::HandleMessage"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool wGui::CTimer::HandleMessage </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CMessage.html">CMessage</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>pMessage</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Attempt to handle the given message <dl compact><dt><b>Returns: </b></dt><dd>true if the object handled the message (the message will not be given to any other handlers) </dl><p>Implements <a class="el" href="classwGui_1_1CMessageClient.html#a2">wGui::CMessageClient</a>.<p>Definition at line <a class="el" href="wg__timer_8cpp-source.html#l00088">88</a> of file <a class="el" href="wg__timer_8cpp-source.html">wg_timer.cpp</a>.    </td>  </tr></table><a name="a2" doxytag="wGui::CTimer::StartTimer"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void wGui::CTimer::StartTimer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">unsigned long int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>Interval</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>bAutoRestart</em> = false</td>        </tr>        <tr>          <td></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>Start the timer. When the timer expires, it will post an CTRL_TIMER message <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>Interval</em>&nbsp;</td><td>The time interval in milliseconds before the timer will expire </td></tr><tr><td valign=top><em>bAutoRestart</em>&nbsp;</td><td>If this is true, the timer will restart again as soon as it expires </td></tr></table></dl><p>Definition at line <a class="el" href="wg__timer_8cpp-source.html#l00055">55</a> of file <a class="el" href="wg__timer_8cpp-source.html">wg_timer.cpp</a>.<p>References <a class="el" href="wg__timer_8h-source.html#l00085">m_bAutoRestart</a>, and <a class="el" href="wg__timer_8h-source.html#l00082">m_TimerID</a>.<p>Referenced by <a class="el" href="wg__tooltip_8cpp-source.html#l00101">wGui::CToolTip::HandleMessage()</a>, and <a class="el" href="wg__menu_8cpp-source.html#l00117">wGui::CMenuBase::HandleMessage()</a>.    </td>  </tr></table><a name="a7" doxytag="wGui::CTimer::TimerHit"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Uint32 wGui::CTimer::TimerHit </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">Uint32&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>Interval</em>          </td>          <td class="md" valign="top">)&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>For internal use only <p>Definition at line <a class="el" href="wg__timer_8cpp-source.html#l00075">75</a> of file <a class="el" href="wg__timer_8cpp-source.html">wg_timer.cpp</a>.<p>References <a class="el" href="wg__timer_8h-source.html#l00085">m_bAutoRestart</a>, <a class="el" href="wg__timer_8h-source.html#l00088">m_iCounter</a>, <a class="el" href="wg__timer_8h-source.html#l00091">m_pOwner</a>, and <a class="el" href="wg__timer_8cpp-source.html#l00065">StopTimer()</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="wg__timer_8h-source.html">wg_timer.h</a><li><a class="el" href="wg__timer_8cpp-source.html">wg_timer.cpp</a></ul><hr><address style="align: right;"><small>Generated on Sat Oct 25 12:43:28 2003 for wGui by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

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