|
Revision 75, 0.9 kB
(checked in by ashley, 20 months ago)
|
|
Fixes for problems introduced in build 74
Widget documentation improved
|
| Line | |
|---|
| 1 | calendar: make rebface [
|
|---|
| 2 | tip: {
|
|---|
| 3 | USAGE:
|
|---|
| 4 | calendar
|
|---|
| 5 | calendar data 1-Jan-2000
|
|---|
| 6 |
|
|---|
| 7 | DESCRIPTION:
|
|---|
| 8 | Used to select a date, with face/data set to current selection.
|
|---|
| 9 | Default selection is now/date.
|
|---|
| 10 | }
|
|---|
| 11 | size: 70x48
|
|---|
| 12 | feel: make default-feel [
|
|---|
| 13 | redraw: make function! [face act pos /local date month] [
|
|---|
| 14 | if act = 'show [
|
|---|
| 15 | date: face/data
|
|---|
| 16 | month: date/month
|
|---|
| 17 | date/day: 1
|
|---|
| 18 | date: date - date/weekday + 1
|
|---|
| 19 | foreach sub-face skip face/pane 13 [
|
|---|
| 20 | sub-face/edge/size: 0x0
|
|---|
| 21 | sub-face/text: either date/month = month [
|
|---|
| 22 | all [date = first face/options sub-face/edge/size: 2x2]
|
|---|
| 23 | form date/day
|
|---|
| 24 | ] [none]
|
|---|
| 25 | date: date + 1
|
|---|
| 26 | ]
|
|---|
| 27 | face/pane/3/text: reform [pick locale*/months face/data/month face/data/year]
|
|---|
| 28 | ]
|
|---|
| 29 | ]
|
|---|
| 30 | ]
|
|---|
| 31 | init: make function! [] [
|
|---|
| 32 | insert options any [data now/date]
|
|---|
| 33 | data: layout/only date-spec
|
|---|
| 34 | pane: data/pane
|
|---|
| 35 | size: data/size
|
|---|
| 36 | data: first options
|
|---|
| 37 | ]
|
|---|
| 38 | ] |
|---|