File: fptimer.xml

package info (click to toggle)
fpc 3.2.2%2Bdfsg-48
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 341,456 kB
  • sloc: pascal: 3,820,194; xml: 194,356; ansic: 9,637; asm: 8,482; java: 5,346; sh: 4,813; yacc: 3,956; makefile: 2,705; lex: 2,661; javascript: 2,454; sql: 929; php: 474; cpp: 145; perl: 136; sed: 132; csh: 34; tcl: 7
file content (460 lines) | stat: -rw-r--r-- 14,207 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="fcl">

<!--
  ====================================================================
    fpTimer
  ====================================================================
-->

<module name="fpTimer">
<short>Timer class</short>
<descr>
<p>
The <file>fpTimer</file> unit implements a timer class <link id="TFPTimer"/>
which can be used on all supported platforms. The timer class uses a driver
class <link id="TFPTimerDriver"/> which does the actual work. 
</p>
<p>
A default timer driver class is implemented on all platforms. It will work
in GUI and non-gui applications, but only in the application's main thread.
</p>
<p>
An alternative driver class can be used by setting the <link
id="DefaultTimerDriverClass"/> variable to the class pointer of the driver
class. The driver class should descend from <link id="TFPTimerDriver"/>.
</p>
</descr>

<!-- class Visibility: default -->
<element name="TFPTimerDriver">
<short>Abstract driver class</short>
<descr>
<p>
<var>TFPTimerDriver</var> is the abstract timer driver class: it simply
provides an interface for the <link id="TFPCustomTimer"/> class to use.
</p>
<p>
The <var>fpTimer</var> unit implements a descendent of this class which
implements the default timer mechanism. 
</p>
</descr>
<seealso>
<link id="TFPCustomTimer"/>
<link id="DefaultTimerDriverClass"/>
</seealso>
</element>

<!-- class Visibility: default -->
<element name="TFPCustomTimer">
<short>Custom timer class</short>
<descr>
<p>
<var>TFPCustomTimer</var> is the timer class containing the timer's
implementation. It relies on an extra driver instance (of type
<link id="TFPTimerDriver"/>) to do the actual work.
</p>
<p>
<var>TFPCustomTimer</var> publishes no events or properties, so it is
unsuitable for handling in an IDE. The <link id="TFPTimer"/> descendent
class publishes all needed events of <var>TFPCustomTimer</var>.
</p>
</descr>
<seealso>
<link id="TFPTimerDriver"/>
<link id="TFPTimer"/>
</seealso>
</element>

<!-- constructor Visibility: public -->
<element name="TFPCustomTimer.Create">
<short>Create a new timer</short>
<descr>
<var>Create</var> instantiates a new <var>TFPCustomTimer</var> instance.
It creates the timer driver instance from the
<var>DefaultTimerDriverClass</var> class pointer.
</descr>
<seealso>
<link id="TFPCustomTimer.Destroy"/>
</seealso>
</element>

<!-- argument Visibility: default -->
<element name="TFPCustomTimer.Create.AOwner">
<short>Owner of the timer instance</short>
</element>

<!-- destructor Visibility: public -->
<element name="TFPCustomTimer.Destroy">
<short>Release a timer instance from memory</short>
<descr>
<var>Destroy</var> releases the timer driver component from memory, and then
calls <var>Inherited</var> to clean the <var>TFPCustomTimer</var> instance
from memory.
</descr>
<seealso>
<link id="TFPCustomTimer.Create"/>
</seealso>
</element>

<!-- procedure Visibility: public -->
<element name="TFPCustomTimer.StartTimer">
<short>Start the timer</short>
<descr>
<p>
<var>StartTimer</var> starts the timer. After a call to
<var>StartTimer</var>, the timer will start producing 
timer ticks.
</p>
<p>
The timer stops producing ticks only when the <link
id="TFPCustomTimer.StopTimer">StopTimer</link> event is called.
</p>
</descr>
<seealso>
<link id="TFPCustomTimer.StopTimer">StopTimer</link>
<link id="TFPTimer.Enabled">Enabled</link>
<link id="TFPTimer.OnTimer">OnTimer</link>
</seealso>
</element>

<!-- procedure Visibility: public -->
<element name="TFPCustomTimer.StopTimer">
<short>Stop the timer</short>
<descr>
<p>
<var>Stoptimer</var> stops a started timer. After a call to
<var>StopTimer</var>, the timer no longer produces timer ticks.
</p>
</descr>
<seealso>
<link id="TFPCustomTimer.StartTimer">StartTimer</link>
<link id="TFPTimer.Enabled">Enabled</link>
<link id="TFPTimer.OnTimer">OnTimer</link>
</seealso>
</element>

<element name="TFPCustomTimer.Enabled">
<short>Starts or stops the timer</short>
<descr>
<p>
<var>Enabled</var> controls whether the timer can become Active. Setting
<var>Enabled</var> to <var>True</var> will start the timer (by calling <link
id="TFPCustomTimer.StartTimer">StartTimer</link>). Setting it to
<var>False</var> will stop the timer (by calling
<link id="TFPCustomTimer.StopTimer">StopTimer</link>).
</p>
<p>
Use the <var>Interval</var> property to set the elapsed time before the
<var>OnTimer</var> event is signalled. Assign the <var>OnTimer</var>,
<var>OnStartTimer</var>, and <var>OnStopTimer</var> event handlers
prior to setting Enabled to True.
</p>
</descr>
<seealso>
<link id="TFPCustomTimer.StartTimer"/>
<link id="TFPCustomTimer.StopTimer"/>
<link id="TFPTimer.OnTimer"/>
<link id="TFPTimer.OnStartTimer"/>
<link id="TFPTimer.OnStopTimer"/>
<link id="TFPTimer.Interval"/>
</seealso>
</element>

<element name="TFPCustomTimer.Interval">
<short>Timer tick interval in milliseconds.</short>
<descr>
<p>
<var>Interval</var> specifies the timer interval in milliseconds. Every
<var>Interval</var> milliseconds, the <var>OnTimer</var> event handler
will be called.
</p>
<p>
Please note that the number of milliseconds in Interval is a minimum value.
Under high system load, the timer tick may occur later than expected.
</p>
</descr>
<seealso>
<link id="TFPCustomTimer.OnTimer"/>
<link id="TFPCustomTimer.Enabled"/>
</seealso>
</element>

<element name="TFPCustomTimer.UseTimerThread">
<short>Indicates if a thread is used to execute the timer event</short>
<descr>
<p>
When set to <b>False</b>, a threaded timer calls the
<var>Thread.Synchronize</var> method to execute the <var>OnTimer</var>
event handler in the context of the main thread for the application. When Set to
<b>True</b>, a threaded timer can simply call its <var>Timer</var> method
without synchronizing to the main thread. The latter implies that GUI updates are
not performed in the OnTimer event.
</p>
</descr>
<seealso>
  <link id="DefaultTimerDriverClass"/>
  <link id="TFPTimerDriverClass"/>
</seealso>
</element>

<element name="TFPCustomTimer.OnTimer">
<short>Event handler signalled when the Interval for the timer has elapsed</short>
<descr>
<p>
<var>OnTimer</var> is a <var>TNotifyEvent</var> property with the event handler
signalled when the Interval for the timer has elapsed.  An object procedure must
be assigned to perform the actions needed when the timer interval has elapsed.
</p>
<p>
Use the <var>OnStartTimer</var> and <var>OnStopTimer</var> event handlers to
perform actions needed when the timer is started or stopped.
</p>
<p>
Assign event handler routines to the properties before setting <var>Enabled</var>
to <b>True</b>.
</p>
</descr>
<seealso>
<link id="TFPCustomTimer.Interval"/>
<link id="TFPCustomTimer.Enabled"/>
<link id="TFPCustomTimer.OnStartTimer"/>
<link id="TFPCustomTimer.OnStopTimer"/>
</seealso>
</element>

<element name="TFPCustomTimer.OnStartTimer">
<short>Event handler signalled when the timer is started</short>
<descr>
<p>
<var>OnStartTimer</var> is signalled when the <var>StartTimer</var> method
is called to activate a timer. It occurs after the timer instance is initialized for
the timer driver, and the Active property is set to <b>True</b>.
</p>
<p>
Assign an object procedure to the handler to perform any actions needed when
the timer is started. The handler routine must be assigned before setting
<var>Enabled</var> to <b>True</b>.
</p>
</descr>
<seealso>
  <link id="TFPCustomTimer.StartTimer"/>
  <link id="TFPCustomTimer.Enabled"/>
  <link id="TFPCustomTimer.OnStopTimer"/>
  <link id="TFPCustomTimer.OnTimer"/>
</seealso>
</element>

<element name="TFPCustomTimer.OnStopTimer">
<short>Event handler signalled when the timer is stopped</short>
<descr>
<p>
<var>OnStopTimer</var> is signalled when the <var>StopTimer</var> method
is called to deactivate a timer. It occurs after the timer instance is updated in
the timer driver, and the Active property is set to <b>False</b>.
</p>
<p>
Assign an object procedure to the handler to perform any actions needed when
the timer is stopped. The handler routine must be assigned before setting
<var>Enabled</var> to <b>True</b>.
</p>
</descr>
<seealso>
  <link id="TFPCustomTimer.StopTimer"/>
  <link id="TFPCustomTimer.Enabled"/>
  <link id="TFPCustomTimer.OnStartTimer"/>
  <link id="TFPCustomTimer.OnTimer"/>
</seealso>
</element>

<!-- class Visibility: default -->
<element name="TFPTimer">
<short>Timer class with published properties</short>
<descr>
<p>
<var>TFPTimer</var> implements no new events or properties, but merely
publishes events and properties already implemented in <link
id="TFPCustomTimer"/>: <link id="TFPTimer.Enabled">Enabled</link>,
<link id="TFPTimer.OnTimer">OnTimer</link> and
<link id="TFPTimer.Interval">Interval</link>.
</p>
<p>
The <var>TFPTimer</var> class is suitable for use in an IDE.
</p>
</descr>
<seealso>
<link id="TFPCustomTimer"/>
<link id="TFPTimer.Enabled">Enabled</link>
<link id="TFPTimer.OnTimer">OnTimer</link>
<link id="TFPTimer.Interval">Interval</link>
</seealso>
</element>

<!-- property Visibility: published -->
<element name="TFPTimer.Enabled">
<short>Start or stop the timer</short>
<descr>
<var>Enabled</var> controls whether the timer is active. Setting
<var>Enabled</var> to <var>True</var> will start the timer (calling <link
id="TFPCustomTimer.StartTimer">StartTimer</link>), setting it to <var>False</var>
will stop the timer (calling <link id="TFPCustomTimer.StopTimer">StopTimer</link>).
</descr>
<seealso>
<link id="TFPCustomTimer.StartTimer">StartTimer</link>
<link id="TFPCustomTimer.StopTimer">StopTimer</link>
<link id="TFPTimer.OnTimer">OnTimer</link>
<link id="TFPTimer.Interval">Interval</link>
</seealso>
</element>

<!-- property Visibility: published -->
<element name="TFPTimer.Interval">
<short>Timer tick interval in milliseconds.</short>
<descr>
<p>
<var>Interval</var> specifies the timer interval in milliseconds. Every
<var>Interval</var> milliseconds, the <link id="TFPTimer.OnTimer">OnTimer</link> 
event handler will be called.
</p>
<p>
Note that the milliseconds interval is a minimum interval. Under high system
load, the timer tick may arrive later.
</p>
</descr>
<seealso>
<link id="TFPTimer.OnTimer">OnTimer</link>
<link id="TFPTimer.Enabled">Enabled</link>
</seealso>
</element>

<element name="TFPTimer.UseTimerThread" link="#fcl.fptimer.TFPCustomTimer.UseTimerThread"/>

<!-- property Visibility: published -->
<element name="TFPTimer.OnTimer">
<short>Event called on each timer tick.</short>
<descr>
<var>OnTimer</var> is called on each timer tick. The event handler must be
assigned to a method that will do the actual work that should occur when the
timer fires.
</descr>
<seealso>
<link id="TFPTimer.Interval">Interval</link>
<link id="TFPTimer.Enabled">Enabled</link>
</seealso>
</element>

<element name="TFPTimer.OnStartTimer" link="#fcl.fptimer.TFPCustomTimer.OnStartTimer"/>
<element name="TFPTimer.OnStopTimer" link="#fcl.fptimer.TFPCustomTimer.OnStopTimer"/>

<!-- constructor Visibility: public -->
<element name="TFPTimerDriver.Create">
<short>Creates a new driver instance</short>
<descr>
<var>Create</var> should be overridden by descendents of
<var>TFPTimerDriver</var> to do additional initialization of the timer
driver. <var>Create</var> just stores (in <link
id="TFPTimerDriver.Timer">Timer</link>) 
a reference to the <var>ATimer</var> instance which created the driver
instance.
</descr>
<seealso>
<link id="TFPTimerDriver.Timer">Timer</link>
<link id="TFPTimer"/>
</seealso>
</element>

<!-- argument Visibility: default -->
<element name="TFPTimerDriver.Create.ATimer">
<short>Timer instance that created the driver</short>
</element>

<!-- procedure Visibility: public -->
<element name="TFPTimerDriver.StartTimer">
<short>Start the timer</short>
<descr>
<var>StartTimer</var> is called by <link id="TFPCustomTimer.StartTimer"/>.
It should be overridden by descendents of  <var>TFPTimerDriver</var> to 
actually start the timer.
</descr>
<seealso>
<link id="TFPCustomTimer.StartTimer"/>
<link id="TFPTimerDriver.StopTimer"/>
</seealso>
</element>

<!-- procedure Visibility: public -->
<element name="TFPTimerDriver.StopTimer">
<short>Stop the timer</short>
<descr>
<var>StopTimer</var> is called by <link id="TFPCustomTimer.StopTimer"/>.
It should be overridden by descendents of  <var>TFPTimerDriver</var> to
actually stop the timer.
</descr>
<seealso>
<link id="TFPCustomTimer.StopTimer"/>
<link id="TFPTimerDriver.StartTimer"/>
</seealso>
</element>

<!-- property Visibility: public -->
<element name="TFPTimerDriver.Timer">
<short>Timer tick</short>
<descr>
<var>Timer</var> calls the <link id="TFPCustomTimer"/> timer event.
Descendents of <var>TFPTimerDriver</var> should call <var>Timer</var>
whenever a timer tick occurs.
</descr>
<seealso>
<link id="TFPTimer.OnTimer"/>
<link id="TFPTimerDriver.StartTimer"/>
<link id="TFPTimerDriver.StopTimer"/>
</seealso>
</element>

<element name="TFPTimerDriver.TimerStarted">
  <short>True when the timer driver has called its StartTimer method</short>
  <descr/>
  <seealso/>
</element>

<!-- "class of" type Visibility: default -->
<element name="TFPTimerDriverClass">
<short>Class of <var>TFPTimerDriver</var></short>
<descr>
<var>TFPTimerDriverClass</var> is the class pointer of <link
id="TFPTimerDriver"/> it exists mainly for the purpose of being
able to set <link id="DefaultTimerDriverClass"/>, so a custom timer
driver can be used for the timer instances.
</descr>
<seealso>
<link id="DefaultTimerDriverClass"/>
</seealso>
</element>

<!-- variable Visibility: default -->
<element name="DefaultTimerDriverClass">
<short>Actual timer class to be used</short>
<descr>
<p>
<var>DefaultTimerDriverClass</var> contains the  <link id="TFPTimerDriver"/>
class pointer that should be used when a new instance of <link
id="TFPCustomTimer"/> is created. It is by default set to the system timer
class.
</p>
<p>
Setting this class pointer to another descendent of
<var>TFPTimerDriver</var> allows to customize the default timer
implementation used in the entire application.
</p>
</descr>
<seealso>
<link id="TFPTimerDriver"/>
<link id="TFPCustomTimer"/>
</seealso>
</element>

</module> <!-- fpTimer -->

</package>
</fpdoc-descriptions>