background image
C H A P T E R 7
Controls and Other Protos
Summary
7-27
Time Protos
7
protoDigitalClock
7
aProtoDigitalClock := {
_proto: protoDigitalClock,
viewFlags:
integer
,
// viewFlags constants
viewBounds:
boundsFrame
,
viewJustify:
justificationFlags
,
increment:
integer
,
// minutes to change on tap
time:
integer
,
// initial or current time
wrapping:
Boolean
,
// non-nil to wrap around day
// boundaries
midnite:
Boolean
,
// non-nil if 0 means midnight
// tomorrow
Refresh:
function
,
// update clock
TimeChanged:
function
,
// called when time is changed
...
}
protoSetClock
7
aProtoSetClock := {
_proto: protoSetClock,
viewBounds:
boundsFrame
,
viewFlags:
integer
,
// viewFlags constants
viewFormat:
formatFlags
,
hours:
integer
,
// value set by hour hand
minutes:
integer
,
// value set by minute hand
TimeChanged:
function
,
// called when time is changed
...
}
protoNewSetClock
7
aProtoNewSetClock := {
_proto: protoNewSetClock,
viewBounds:
boundsFrame
,
viewJustify:
justificationFlags
,
time:
integer
,
// initial or current time
annotations:
array
,
// four strings to annotate
// the clock face
supressAnnotations:
Boolean
, // if slot exists, suppress
exactHour:
Boolean
,
// adjust hour markers
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна