vdk 2.4.0
vdk
timer.h
1
/*
2
* ===========================
3
* VDK Visual Development Kit
4
* Version 0.4
5
* October 1998
6
* ===========================
7
*
8
* Copyright (C) 1998, Mario Motta
9
* Developed by Mario Motta <mmotta@guest.net>
10
*
11
* This library is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Library General Public
13
* License as published by the Free Software Foundation; either
14
* version 2 of the License, or (at your option) any later version.
15
*
16
* This library is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* Library General Public License for more details.
20
*
21
* You should have received a copy of the GNU Library General Public
22
* License along with this library; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24
* 02111-1307, USA.
25
*/
26
27
#ifndef TIMER_H
28
#define TIMER_H
29
#include <vdk/vdkobj.h>
30
31
class
VDKForm
;
40
class
VDKTimer
:
public
VDKObject
41
{
42
protected
:
43
static
int
HandleTimerTick(gpointer obj);
44
unsigned
int
timerId;
45
unsigned
int
tick;
46
bool
started;
47
public
:
54
VDKTimer
(
VDKForm
* owner,
unsigned
int
tick = 1000,
bool
start =
true
);
58
VDKReadWriteValueProp<VDKTimer, unsigned int>
TimeTick
;
62
void
SetTimeTick
(
unsigned
int
t);
66
virtual
~VDKTimer
();
70
void
Start
();
74
void
Stop
();
78
bool
Started
() {
return
started; }
79
#ifdef USE_SIGCPLUSPLUS
80
84
VDKSignal0<void> OnTimerTick;
90
VDKSignal1<void, bool> OnTimerRunning;
91
#endif
/* USE_SIGCPLUSPLUS */
92
};
93
#endif
VDKTimer::~VDKTimer
virtual ~VDKTimer()
Definition:
timer.cc:56
VDKObject
Definition:
vdkobj.h:137
VDKTimer::TimeTick
VDKReadWriteValueProp< VDKTimer, unsigned int > TimeTick
Definition:
timer.h:58
VDKTimer::VDKTimer
VDKTimer(VDKForm *owner, unsigned int tick=1000, bool start=true)
Definition:
timer.cc:32
VDKForm
VDKForm widgets, generally the outermost widget container.
Definition:
forms.h:68
VDKTimer::SetTimeTick
void SetTimeTick(unsigned int t)
Definition:
timer.cc:45
VDKTimer::Started
bool Started()
Definition:
timer.h:78
VDKTimer::Start
void Start()
Definition:
timer.cc:79
VDKTimer::Stop
void Stop()
Definition:
timer.cc:66
VDKTimer
Provides a timer.
Definition:
timer.h:40
Generated by
1.8.17