widgets/
mg_cw_clock.pro
includes main-level programCompound widget representing a digital clock.
Examples
Run the main-level program at the end of this file for an example of
using MG_CW_CLOCK:
IDL> .run mg_cw_clock
Routines
mg_cw_clock_display, pstate
Display the current time in the clock.
mg_cw_clock_set_value, clock, value
Set the time
result = mg_cw_clock_get_value(clock)
Get the value of a MG_CW_CLOCK compound widget i.e.
result = mg_cw_clock_event(event)
Handle all widget events generated by widgets in the compound widget hierarchy.
mg_cw_clock_realize, top
Called after the widget hierarchy is realized.
mg_cw_clock_cleanup, timer
Free resources of the compound widget i.e.
result = mg_cw_clock(parent [, time=double] [, format=string] [, update_interval=float] [, _extra=keywords])
Create an MG_CW_CLOCK compound widget.
Routine details
top source mg_cw_clock_display
mg_cw_clock_display, pstate
Display the current time in the clock.
Parameters
- pstate in required type=pointer
pointer to state structure
top source mg_cw_clock_set_value
mg_cw_clock_set_value, clock, value
Set the time
Parameters
- clock in required type=long
widget identifier for the compound widget
- value in required type=double
time to set the clock to in Julian time
top source mg_cw_clock_get_value
result = mg_cw_clock_get_value(clock)
Get the value of a MG_CW_CLOCK compound widget i.e. a MG_CW_CLOCK object.
Return value
MG_CW_CLOCK object
Parameters
- clock in required type=long
widget identifier of the root of the compound widget hierarchy
top source mg_cw_clock_event
result = mg_cw_clock_event(event)
Handle all widget events generated by widgets in the compound widget hierarchy.
Return value
0 if the event has been handled; an event structure if the another event handler should handle the event
Parameters
- event in required type=structure
event structure
top source mg_cw_clock_realize
mg_cw_clock_realize, top
Called after the widget hierarchy is realized. The clock cannot be displayed until the widget hierarchy is realized.
Parameters
- top in required type=long
widget identifier of the top of the compound widget hierarchy
top source mg_cw_clock_cleanup
mg_cw_clock_cleanup, timer
Free resources of the compound widget i.e. its control object.
Parameters
- timer in required type=long
widget identifier of the top of the compound widget hierarchy
top source mg_cw_clock
result = mg_cw_clock(parent [, time=double] [, format=string] [, update_interval=float] [, _extra=keywords])
Create an MG_CW_CLOCK compound widget.
Return value
widget identifier of the compound widget
Parameters
- parent in required type=long
widget identifier of the parent base widget for the compound widget
Keywords
- time in optional type=double
Julian time to use as the curren time
- format in optional type=string
format string to use when displaying time
- update_interval in optional type=float default=1.0
time in seconds between clock updates
- _extra in optional type=keywords
keywords to the MG_CW_CLOCK::init
File attributes
Modification date: | Mon Nov 29 18:34:51 2010 |
Lines: | 186 |
Docformat: | rst rst |