API documentation for visualization library

Michael Galloy

single page | use frames     summary     class     fields     routine details     file attributes

animation/

vis_timer__define.pro

includes main-level program

Timer class.

Examples

See the main-level example program:

IDL> .run vis_timer__define
The following creates a timer which will go off 5 times with 1.0 seconds between alarms, and then starts it:
IDL> timer = obj_new('VIS_Timer', duration=1.0, nframes=5, $ callback='print', $ uvalue='Callback routine called') IDL> timer->start IDL> Callback routine called IDL> Callback routine called IDL> Callback routine called IDL> Callback routine called IDL> Callback routine called
The callback routine specified with the CALLBACK keyword must accept a single positional parameter where the value of the UVALUE property is passed to it.

Class description for vis_timer

Properties

active get type=boolean

whether the timer is currently running; read-only, use stop/start methods to change

uvalue get set init type=any

user-defined value passed to callback routine

current_frame get set type=long

number of times the timer has already gone off

callback get set init type=string

procedure to call when timer goes off; this procedure should accept a single positional parameter which is the value of the UVALUE property

duration get set init type=float

time in seconds between timer going off

nframes get set init type=long

total number of times the timer should go off; defaults to 1

repeating get set init type=boolean

set to repeat forever

Routines

vis_timer_event, event

Timer event handler.

vis_timer::getProperty, /active, duration=float, /repeating, current_frame=long, nframes=long, callback=string, uvalue=any

Get properties.

vis_timer::setProperty, duration=float, /repeating, current_frame=long, nframes=long, callback=string, uvalue=any

Set properties.

vis_timer::start

Start the timer.

vis_timer::stop

Stop the timer.

vis_timer::cleanup

Free resources.

result = vis_timer::init(duration=float, /repeating, nframes=long, callback=string, uvalue=any)

Create a timer instance.

vis_timer__define

Define instance variables.

Routine details

top vis_timer_event

vis_timer_event, event

Timer event handler.

Parameters

event in required type=structure

timer event

top vis_timer::getProperty

vis_timer::getProperty, /active, duration=float, /repeating, current_frame=long, nframes=long, callback=string, uvalue=any

Get properties.

Keywords

active type=boolean

whether the timer is currently running; read-only, use stop/start methods to change

duration type=float

time in seconds between timer going off

repeating type=boolean

set to repeat forever

current_frame type=long

number of times the timer has already gone off

nframes type=long

total number of times the timer should go off; defaults to 1

callback type=string

procedure to call when timer goes off; this procedure should accept a single positional parameter which is the value of the UVALUE property

uvalue type=any

user-defined value passed to callback routine

top vis_timer::setProperty

vis_timer::setProperty, duration=float, /repeating, current_frame=long, nframes=long, callback=string, uvalue=any

Set properties.

Keywords

duration type=float

time in seconds between timer going off

repeating type=boolean

set to repeat forever

current_frame type=long

number of times the timer has already gone off

nframes type=long

total number of times the timer should go off; defaults to 1

callback type=string

procedure to call when timer goes off; this procedure should accept a single positional parameter which is the value of the UVALUE property

uvalue type=any

user-defined value passed to callback routine

top vis_timer::start

vis_timer::start

Start the timer.

top vis_timer::stop

vis_timer::stop

Stop the timer.

top vis_timer::cleanup

vis_timer::cleanup

Free resources.

top vis_timer::init

result = vis_timer::init(duration=float, /repeating, nframes=long, callback=string, uvalue=any)

Create a timer instance.

Return value

1 for success, 0 for failure

Keywords

duration type=float

time in seconds between timer going off

repeating type=boolean

set to repeat forever

nframes type=long

total number of times the timer should go off; defaults to 1

callback type=string

procedure to call when timer goes off; this procedure should accept a single positional parameter which is the value of the UVALUE property

uvalue type=any

user-defined value passed to callback routine

top vis_timer__define

vis_timer__define

Define instance variables.

File attributes

Modification date: Tue Dec 7 12:38:54 2010
Lines: 233
Docformat: rst rst