PixelLightAPI  .
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
PLGui::Timer Class Reference

Timer class. More...

#include <Timer.h>

List of all members.

Public Member Functions

PLGUI_API Timer (Gui &cGui)
 Constructor.
PLGUI_API ~Timer ()
 Destructor.
PLGUI_API GuiGetGui () const
 Get owner GUI.
PLGUI_API PLCore::uint32 GetID () const
 Get timer ID.
PLGUI_API void SetID (PLCore::uint32 nID)
 Set timer ID.
PLGUI_API bool IsActive () const
 Check if timer is active.
PLGUI_API bool IsOnce () const
 Check if timer fires only once.
PLGUI_API PLCore::uint64 GetTimeout () const
 Get timeout interval.
PLGUI_API void Start (PLCore::uint64 nTimeout)
 Start timer.
PLGUI_API void StartOnce (PLCore::uint64 nTimeout)
 Start timer only once, not periodically.
PLGUI_API void Stop ()
 Stop timer.

Public Attributes

PLCore::Event EventStart
PLCore::Event EventStop
PLCore::Event EventFire

Protected Member Functions

PLGUI_API void Fire ()
 Fire timer.

Protected Attributes

Guim_pGui
PLCore::uint32 m_nID
TimerThreadm_pThread
bool m_bActive
bool m_bOnce
PLCore::uint64 m_nTimeout

Detailed Description

Timer class.


Constructor & Destructor Documentation

PLGUI_API PLGui::Timer::Timer ( Gui cGui)

Constructor.

Parameters:
[in]cGuiOwner GUI
PLGUI_API PLGui::Timer::~Timer ( )

Destructor.


Member Function Documentation

PLGUI_API Gui* PLGui::Timer::GetGui ( ) const

Get owner GUI.

Returns:
Pointer to GUI object (never a null pointer)
PLGUI_API PLCore::uint32 PLGui::Timer::GetID ( ) const

Get timer ID.

Returns:
Timer ID
PLGUI_API void PLGui::Timer::SetID ( PLCore::uint32  nID)

Set timer ID.

Parameters:
[in]nIDTimer ID
PLGUI_API bool PLGui::Timer::IsActive ( ) const

Check if timer is active.

Returns:
'true' if timer is currently active
PLGUI_API bool PLGui::Timer::IsOnce ( ) const

Check if timer fires only once.

Returns:
'true' if once
PLGUI_API PLCore::uint64 PLGui::Timer::GetTimeout ( ) const

Get timeout interval.

Returns:
Timeout interval in milliseconds
PLGUI_API void PLGui::Timer::Start ( PLCore::uint64  nTimeout)

Start timer.

Parameters:
[in]nTimeoutTimeout in milliseconds after which the timer fires repeatedly
Note:
  • If the timer is already running it's stopped and started again
PLGUI_API void PLGui::Timer::StartOnce ( PLCore::uint64  nTimeout)

Start timer only once, not periodically.

Parameters:
[in]nTimeoutTimeout in milliseconds after which the timer fires
Note:
  • If the timer is already running it's stopped and started again
PLGUI_API void PLGui::Timer::Stop ( )

Stop timer.

PLGUI_API void PLGui::Timer::Fire ( ) [protected]

Fire timer.


Member Data Documentation

The timer has been started

The timer has been stopped

The timer has fired

Gui* PLGui::Timer::m_pGui [protected]

Pointer to owner GUI

PLCore::uint32 PLGui::Timer::m_nID [protected]

Timer ID

Current timer thread

bool PLGui::Timer::m_bActive [protected]

Timer is active?

bool PLGui::Timer::m_bOnce [protected]

Timer is firing only once?

PLCore::uint64 PLGui::Timer::m_nTimeout [protected]

Timeout value


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:18
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported