#include <wg_timer.h>
Inheritance diagram for wGui::CTimer:
Definition at line 43 of file wg_timer.h.
wGui::CTimer::CTimer | ( | CMessageClient * | pOwner = 0 |
) |
Standard constructor
pOwner | 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. |
Definition at line 39 of file wg_timer.cpp.
void wGui::CTimer::StartTimer | ( | unsigned long int | Interval, | |
bool | bAutoRestart = false | |||
) |
Start the timer. When the timer expires, it will post an CTRL_TIMER message
Interval | The time interval in milliseconds before the timer will expire | |
bAutoRestart | If this is true, the timer will restart again as soon as it expires |
Definition at line 53 of file wg_timer.cpp.
References m_bAutoRestart, m_TimerID, StopTimer(), and wGui::TimerCallback().
Referenced by wGui::CToolTip::HandleMessage(), wGui::CTextBox::HandleMessage(), wGui::CMenuBase::HandleMessage(), wGui::CEditBox::HandleMessage(), wGui::CTextBox::OnMouseButtonDown(), and wGui::CEditBox::OnMouseButtonDown().
bool wGui::CTimer::IsRunning | ( | void | ) | [inline] |
Indicates if the timer is currently running
Definition at line 63 of file wg_timer.h.
References m_TimerID.
Referenced by wGui::CTextBox::OnMouseButtonDown(), and wGui::CEditBox::OnMouseButtonDown().
long int wGui::CTimer::GetCount | ( | void | ) | const [inline] |
Gets the number of times the timer has triggered since it was last reset
Definition at line 67 of file wg_timer.h.
References m_iCounter.
CMessageClient* wGui::CTimer::GetOwner | ( | void | ) | [inline] |
Gets the owner of the timer
Definition at line 74 of file wg_timer.h.
References m_pOwner.
Uint32 wGui::CTimer::TimerHit | ( | Uint32 | Interval | ) |
For internal use only
Definition at line 74 of file wg_timer.cpp.
References wGui::CMessage::CTRL_TIMER, wGui::CMessageServer::Instance(), m_bAutoRestart, m_iCounter, m_pOwner, wGui::CMessageServer::QueueMessage(), and StopTimer().
bool wGui::CTimer::HandleMessage | ( | CMessage * | pMessage | ) | [virtual] |
Attempt to handle the given message
Implements wGui::CMessageClient.
Definition at line 87 of file wg_timer.cpp.