Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
WinTimer.h
1/*=======================================================================
2** VSG_COPYRIGHT_TAG
3**=======================================================================*/
4
5#ifndef WINTIMER_H
6#define WINTIMER_H
7
8#include <Inventor/sensors/SoSensor.h>
9#include <Inventor/sensors/SoSystemTimer.h>
10#include <Inventor/misc/SoRef.h>
11#include <windows.h>
12
18class WINVIEWERCOMPONENTS_API WinTimer : public SoSystemTimer
19{
20
21public:
22
27
31 virtual void start();
32
36 virtual void stop();
37
41 virtual void setDelay(int time);
42
46 virtual bool isPending() const;
47
51 virtual void setRepeat(bool flag);
52
56 virtual void setTask(SoSystemTimerTask* task);
57
61 void timeOut();
62
63private:
64
66 int m_delay;
67 bool m_singleShot;
68 bool m_started;
69 HANDLE m_timer;
70};
71
72#endif //WINTIMER_H
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Common interface...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Interface used b...
Class to integrate Windows timer into OpenInventor.
Definition WinTimer.h:19
void timeOut()
This function is call when the timer timeout.
WinTimer()
Constructor.
virtual void setTask(SoSystemTimerTask *task)
Set task associated to the timer.
virtual void start()
Start the timer.
virtual void setDelay(int time)
Set the delay of the timer.
virtual bool isPending() const
Return true if the timer is pending.
virtual void setRepeat(bool flag)
Set if the timer is in the repeat mode.
virtual void stop()
Stop the timer.