]> git.saurik.com Git - wxWidgets.git/blame - src/qt/timer.cpp
Added wxDC:DrawPolygone
[wxWidgets.git] / src / qt / timer.cpp
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: timer.cpp
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifdef __GNUG__
13#pragma implementation "timer.h"
14#endif
15
16#include "wx/timer.h"
17
18//-----------------------------------------------------------------------------
19// wxTimer
20//-----------------------------------------------------------------------------
21
22IMPLEMENT_DYNAMIC_CLASS(wxTimer,wxObject)
23
24gint timeout_callback( gpointer data )
25{
26 wxTimer *timer = (wxTimer*)data;
27 timer->Notify();
28 if (timer->OneShot()) timer->Stop();
29 return TRUE;
30};
31
32wxTimer::wxTimer(void)
33{
34 m_time = 1000;
35 m_oneShot = FALSE;
36};
37
38wxTimer::~wxTimer(void)
39{
40 Stop();
41};
42
43int wxTimer::Interval(void)
44{
45 return m_time;
46};
47
48bool wxTimer::OneShot(void)
49{
50 return m_oneShot;
51};
52
53void wxTimer::Notify(void)
54{
55};
56
57void wxTimer::Start( int millisecs, bool oneShot )
58{
59 if (millisecs != -1) m_time = millisecs;
60 m_oneShot = oneShot;
61};
62
63void wxTimer::Stop(void)
64{
65};
66