widgets/
mg_cwo_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_cwo_clock
Class description for mg_cwo_clock
Properties
- top init
- update_interval set init
- format set init
- time set init
Fields
- updateInterval 0.00000
number of seconds between clock updates
- top 0L
top of the widget hierarchy for the clock compound widget
- offset 0.0000000D
difference between the current time and the time of the clock in Julian days
- timer 0L
widget identifier for the widget with the timer set on it
- display 0L
widget identifier for the text widget to display the time
- format ''
format string for the time output
Routines
mg_cwo_clock::display
Display the current time in the clock.
mg_cwo_clock::setProperty [, update_interval=float] [, format=string] [, time=double]
Set the properties of the compound widget.
result = mg_cwo_clock::init(top=long [, update_interval=float] [, format=string] [, time=double])
Create a clock compound widget object.
mg_cwo_clock__define
Define the instance variables for the clock compound widget.
mg_cwo_clock_set_value, clock, value
This would normally set the value of the compound widget, but here the "value" of this compound widget is the control object.
result = mg_cwo_clock_get_value(clock)
Get the value of a MG_CW_CLOCK compound widget i.e.
result = mg_cwo_clock_event(event)
Handle all widget events generated by widgets in the compound widget hierarchy.
mg_cwo_clock_realize, top
Called after the widget hierarchy is realized.
mg_cwo_clock_cleanup, timer
Free resources of the compound widget i.e.
result = mg_cwo_clock(parent [, value=object] [, _extra=keywords])
Create an MG_CW_CLOCK compound widget.
Routine details
top source mg_cwo_clock::setProperty
mg_cwo_clock::setProperty [, update_interval=float] [, format=string] [, time=double]
Set the properties of the compound widget.
Keywords
- update_interval in optional type=float
number of seconds between clock updates
- format in optional type=string
format string for the time output
- time in optional type=double
current Julian date//time
top source mg_cwo_clock::init
result = mg_cwo_clock::init(top=long [, update_interval=float] [, format=string] [, time=double])
Create a clock compound widget object.
Return value
1 for success, 0 for failure
Keywords
- top in required type=long
widget identifier of the parent compound widget
- update_interval in optional type=float
number of seconds between clock updates
- format in optional type=string
format string for the time output
- time in optional type=double
current Julian date/time
top source mg_cwo_clock__define
mg_cwo_clock__define
Define the instance variables for the clock compound widget.
top source mg_cwo_clock_set_value
mg_cwo_clock_set_value, clock, value
This would normally set the value of the compound widget, but here the "value" of this compound widget is the control object. This value should not be set, but the individual properties of the control object should be set with its setProperty method.
Parameters
- clock in required type=long
widget identifier for the compound widget
- value in required type=object
control object for the clock
top source mg_cwo_clock_get_value
result = mg_cwo_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_cwo_clock_event
result = mg_cwo_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_cwo_clock_realize
mg_cwo_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_cwo_clock_cleanup
mg_cwo_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_cwo_clock
result = mg_cwo_clock(parent [, value=object] [, _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
- value out optional type=object
set to a named variable to get the value of the MG_CW_CLOCK compound widget i.e. an MG_CW_CLOCK object
- _extra in optional type=keywords
keywords to the MG_CW_CLOCK::init
File attributes
Modification date: | Mon Nov 29 18:34:51 2010 |
Lines: | 255 |
Docformat: | rst rst |