Artifact
c580d04776abe11d8ff896deebfc6171a549fdbf:
0000: 23 21 20 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 #! /usr/bin/env
0010: 63 73 69 0a 0a 28 72 65 71 75 69 72 65 2d 6c 69 csi..(require-li
0020: 62 72 61 72 79 20 73 72 66 69 2d 34 20 69 75 70 brary srfi-4 iup
0030: 29 0a 28 69 6d 70 6f 72 74 20 73 72 66 69 2d 34 ).(import srfi-4
0040: 20 69 75 70 20 69 75 70 2d 70 70 6c 6f 74 20 69 iup iup-pplot i
0050: 75 70 2d 67 6c 63 61 6e 76 61 73 29 0a 0a 28 64 up-glcanvas)..(d
0060: 65 66 69 6e 65 20 28 70 6f 70 75 70 20 64 6c 67 efine (popup dlg
0070: 20 2e 20 61 72 67 73 29 0a 20 20 28 61 70 70 6c . args). (appl
0080: 79 20 73 68 6f 77 20 64 6c 67 20 23 3a 6d 6f 64 y show dlg #:mod
0090: 61 6c 3f 20 27 79 65 73 20 61 72 67 73 29 0a 20 al? 'yes args).
00a0: 20 28 64 65 73 74 72 6f 79 21 20 64 6c 67 29 29 (destroy! dlg))
00b0: 0a 0a 28 64 65 66 69 6e 65 20 28 70 72 6f 70 65 ..(define (prope
00c0: 72 74 69 65 73 20 69 68 29 0a 20 20 28 70 6f 70 rties ih). (pop
00d0: 75 70 20 28 65 6c 65 6d 65 6e 74 2d 70 72 6f 70 up (element-prop
00e0: 65 72 74 69 65 73 2d 64 69 61 6c 6f 67 20 69 68 erties-dialog ih
00f0: 29 29 0a 20 20 27 64 65 66 61 75 6c 74 29 0a 0a )). 'default)..
0100: 28 64 65 66 69 6e 65 20 64 6c 67 0a 20 20 28 64 (define dlg. (d
0110: 69 61 6c 6f 67 0a 20 20 20 20 28 76 62 6f 78 0a ialog. (vbox.
0120: 20 20 20 20 20 20 28 68 62 6f 78 20 3b 20 68 65 (hbox ; he
0130: 61 64 6c 69 6e 65 0a 20 20 20 20 20 20 20 20 28 adline. (
0140: 66 69 6c 6c 29 0a 20 20 20 20 20 20 20 20 28 66 fill). (f
0150: 72 61 6d 65 20 28 6c 61 62 65 6c 20 22 20 49 6e rame (label " In
0160: 73 70 65 63 74 20 63 6f 6e 74 72 6f 6c 20 61 6e spect control an
0170: 64 20 64 69 61 6c 6f 67 20 63 6c 61 73 73 65 73 d dialog classes
0180: 20 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
0190: 20 20 20 20 20 20 20 20 20 66 6f 6e 74 73 69 7a fontsiz
01a0: 65 3a 20 31 35 29 29 0a 20 20 20 20 20 20 20 20 e: 15)).
01b0: 28 66 69 6c 6c 29 0a 20 20 20 20 20 20 20 20 6d (fill). m
01c0: 61 72 67 69 6e 3a 20 27 30 78 30 29 0a 0a 20 20 argin: '0x0)..
01d0: 20 20 20 20 28 6c 61 62 65 6c 20 22 22 29 20 0a (label "") .
01e0: 20 20 20 20 20 20 28 6c 61 62 65 6c 20 22 44 69 (label "Di
01f0: 61 6c 6f 67 73 22 20 66 6f 6e 74 73 69 7a 65 3a alogs" fontsize:
0200: 20 31 32 29 0a 20 20 20 20 20 20 28 68 62 6f 78 12). (hbox
0210: 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e . (button
0220: 20 22 64 69 61 6c 6f 67 22 0a 20 20 20 20 20 20 "dialog".
0230: 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e action
0240: 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 : (lambda (self)
0250: 20 28 70 72 6f 70 65 72 74 69 65 73 20 28 64 69 (properties (di
0260: 61 6c 6f 67 20 28 76 62 6f 78 29 29 29 29 29 0a alog (vbox))))).
0270: 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 (button
0280: 22 63 6f 6c 6f 72 2d 64 69 61 6c 6f 67 22 0a 20 "color-dialog".
0290: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 a
02a0: 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 ction: (lambda (
02b0: 73 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 self) (propertie
02c0: 73 20 28 63 6f 6c 6f 72 2d 64 69 61 6c 6f 67 29 s (color-dialog)
02d0: 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 74 ))). (but
02e0: 74 6f 6e 20 22 66 69 6c 65 2d 64 69 61 6c 6f 67 ton "file-dialog
02f0: 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
0300: 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 action: (lambd
0310: 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 a (self) (proper
0320: 74 69 65 73 20 28 66 69 6c 65 2d 64 69 61 6c 6f ties (file-dialo
0330: 67 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 g)))). (b
0340: 75 74 74 6f 6e 20 22 66 6f 6e 74 2d 64 69 61 6c utton "font-dial
0350: 6f 67 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 og".
0360: 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d action: (lam
0370: 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 bda (self) (prop
0380: 65 72 74 69 65 73 20 28 66 6f 6e 74 2d 64 69 61 erties (font-dia
0390: 6c 6f 67 29 29 29 29 0a 20 20 20 20 20 20 20 20 log)))).
03a0: 28 62 75 74 74 6f 6e 20 22 6d 65 73 73 61 67 65 (button "message
03b0: 2d 64 69 61 6c 6f 67 22 0a 20 20 20 20 20 20 20 -dialog".
03c0: 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a action:
03d0: 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 (lambda (self)
03e0: 28 70 72 6f 70 65 72 74 69 65 73 20 28 6d 65 73 (properties (mes
03f0: 73 61 67 65 2d 64 69 61 6c 6f 67 29 29 29 29 0a sage-dialog)))).
0400: 20 20 20 20 20 20 20 20 28 66 69 6c 6c 29 0a 20 (fill).
0410: 20 20 20 20 20 20 20 6d 61 72 67 69 6e 3a 20 27 margin: '
0420: 30 78 30 29 0a 20 20 20 20 20 20 28 68 62 6f 78 0x0). (hbox
0430: 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e . (button
0440: 20 22 6c 61 79 6f 75 74 2d 64 69 61 6c 6f 67 22 "layout-dialog"
0450: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
0460: 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 action: (lambda
0470: 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 74 (self) (propert
0480: 69 65 73 20 28 6c 61 79 6f 75 74 2d 64 69 61 6c ies (layout-dial
0490: 6f 67 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 og)))). (
04a0: 62 75 74 74 6f 6e 20 22 65 6c 65 6d 65 6e 74 2d button "element-
04b0: 70 72 6f 70 65 72 74 69 65 73 2d 64 69 61 6c 6f properties-dialo
04c0: 67 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 g".
04d0: 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 action: (lamb
04e0: 64 61 20 28 73 65 6c 66 29 0a 20 20 20 20 20 20 da (self).
04f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0500: 20 20 20 20 28 70 72 6f 70 65 72 74 69 65 73 0a (properties.
0510: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0520: 20 20 20 20 20 20 20 20 20 20 20 20 28 65 6c 65 (ele
0530: 6d 65 6e 74 2d 70 72 6f 70 65 72 74 69 65 73 2d ment-properties-
0540: 64 69 61 6c 6f 67 20 28 63 72 65 61 74 65 20 27 dialog (create '
0550: 75 73 65 72 29 29 29 29 29 0a 20 20 20 20 20 20 user))))).
0560: 20 20 28 66 69 6c 6c 29 0a 20 20 20 20 20 20 20 (fill).
0570: 20 6d 61 72 67 69 6e 3a 20 27 30 78 30 29 0a 0a margin: '0x0)..
0580: 20 20 20 20 20 20 28 6c 61 62 65 6c 20 22 22 29 (label "")
0590: 20 0a 20 20 20 20 20 20 28 6c 61 62 65 6c 20 22 . (label "
05a0: 43 6f 6d 70 6f 73 69 74 69 6f 6e 20 77 69 64 67 Composition widg
05b0: 65 74 73 22 20 66 6f 6e 74 73 69 7a 65 3a 20 31 ets" fontsize: 1
05c0: 32 29 0a 20 20 20 20 20 20 28 68 62 6f 78 0a 20 2). (hbox.
05d0: 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 (button "
05e0: 66 69 6c 6c 22 0a 20 20 20 20 20 20 20 20 20 20 fill".
05f0: 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c action: (l
0600: 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 ambda (self) (pr
0610: 6f 70 65 72 74 69 65 73 20 28 66 69 6c 6c 29 29 operties (fill))
0620: 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 )). (butt
0630: 6f 6e 20 22 68 62 6f 78 22 0a 20 20 20 20 20 20 on "hbox".
0640: 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e action
0650: 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 : (lambda (self)
0660: 20 28 70 72 6f 70 65 72 74 69 65 73 20 28 68 62 (properties (hb
0670: 6f 78 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 ox)))). (
0680: 62 75 74 74 6f 6e 20 22 76 62 6f 78 22 0a 20 20 button "vbox".
0690: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 ac
06a0: 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 tion: (lambda (s
06b0: 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 73 elf) (properties
06c0: 20 28 76 62 6f 78 29 29 29 29 0a 20 20 20 20 20 (vbox)))).
06d0: 20 20 20 28 62 75 74 74 6f 6e 20 22 7a 62 6f 78 (button "zbox
06e0: 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
06f0: 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 action: (lambd
0700: 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 a (self) (proper
0710: 74 69 65 73 20 28 7a 62 6f 78 29 29 29 29 0a 20 ties (zbox)))).
0720: 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 (button "
0730: 72 61 64 69 6f 22 0a 20 20 20 20 20 20 20 20 20 radio".
0740: 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 action: (
0750: 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 lambda (self) (p
0760: 72 6f 70 65 72 74 69 65 73 20 28 72 61 64 69 6f roperties (radio
0770: 20 28 76 62 6f 78 29 29 29 29 29 0a 20 20 20 20 (vbox))))).
0780: 20 20 20 20 28 62 75 74 74 6f 6e 20 22 6e 6f 72 (button "nor
0790: 6d 61 6c 69 7a 65 72 22 0a 20 20 20 20 20 20 20 malizer".
07a0: 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a action:
07b0: 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 (lambda (self)
07c0: 28 70 72 6f 70 65 72 74 69 65 73 20 28 6e 6f 72 (properties (nor
07d0: 6d 61 6c 69 7a 65 72 29 29 29 29 0a 20 20 20 20 malizer)))).
07e0: 20 20 20 20 28 62 75 74 74 6f 6e 20 22 63 62 6f (button "cbo
07f0: 78 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 x".
0800: 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 action: (lamb
0810: 64 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 da (self) (prope
0820: 72 74 69 65 73 20 28 63 62 6f 78 29 29 29 29 0a rties (cbox)))).
0830: 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 (button
0840: 22 73 62 6f 78 22 0a 20 20 20 20 20 20 20 20 20 "sbox".
0850: 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 action: (
0860: 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 lambda (self) (p
0870: 72 6f 70 65 72 74 69 65 73 20 28 73 62 6f 78 20 roperties (sbox
0880: 28 76 62 6f 78 29 29 29 29 29 0a 20 20 20 20 20 (vbox))))).
0890: 20 20 20 28 62 75 74 74 6f 6e 20 22 73 70 6c 69 (button "spli
08a0: 74 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 t".
08b0: 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 action: (lamb
08c0: 64 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 da (self) (prope
08d0: 72 74 69 65 73 20 28 73 70 6c 69 74 20 28 76 62 rties (split (vb
08e0: 6f 78 29 20 28 76 62 6f 78 29 29 29 29 29 0a 20 ox) (vbox))))).
08f0: 20 20 20 20 20 20 20 28 66 69 6c 6c 29 0a 20 20 (fill).
0900: 20 20 20 20 20 20 6d 61 72 67 69 6e 3a 20 27 30 margin: '0
0910: 78 30 29 0a 0a 20 20 20 20 20 20 28 6c 61 62 65 x0).. (labe
0920: 6c 20 22 22 29 20 0a 20 20 20 20 20 20 28 6c 61 l "") . (la
0930: 62 65 6c 20 22 53 74 61 6e 64 61 72 64 20 77 69 bel "Standard wi
0940: 64 67 65 74 73 22 20 66 6f 6e 74 73 69 7a 65 3a dgets" fontsize:
0950: 20 31 32 29 0a 20 20 20 20 20 20 28 68 62 6f 78 12). (hbox
0960: 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e . (button
0970: 20 22 62 75 74 74 6f 6e 22 0a 20 20 20 20 20 20 "button".
0980: 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e action
0990: 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 : (lambda (self)
09a0: 20 28 70 72 6f 70 65 72 74 69 65 73 20 28 62 75 (properties (bu
09b0: 74 74 6f 6e 29 29 29 29 0a 20 20 20 20 20 20 20 tton)))).
09c0: 20 28 62 75 74 74 6f 6e 20 22 63 61 6e 76 61 73 (button "canvas
09d0: 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
09e0: 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 action: (lambd
09f0: 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 a (self) (proper
0a00: 74 69 65 73 20 28 63 61 6e 76 61 73 29 29 29 29 ties (canvas))))
0a10: 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e . (button
0a20: 20 22 66 72 61 6d 65 22 0a 20 20 20 20 20 20 20 "frame".
0a30: 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a action:
0a40: 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 (lambda (self)
0a50: 28 70 72 6f 70 65 72 74 69 65 73 20 28 66 72 61 (properties (fra
0a60: 6d 65 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 me)))). (
0a70: 62 75 74 74 6f 6e 20 22 6c 61 62 65 6c 22 0a 20 button "label".
0a80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 a
0a90: 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 ction: (lambda (
0aa0: 73 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 self) (propertie
0ab0: 73 20 28 6c 61 62 65 6c 29 29 29 29 0a 20 20 20 s (label)))).
0ac0: 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 6c 69 (button "li
0ad0: 73 74 62 6f 78 22 0a 20 20 20 20 20 20 20 20 20 stbox".
0ae0: 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 action: (
0af0: 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 lambda (self) (p
0b00: 72 6f 70 65 72 74 69 65 73 20 28 6c 69 73 74 62 roperties (listb
0b10: 6f 78 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 ox)))). (
0b20: 62 75 74 74 6f 6e 20 22 70 72 6f 67 72 65 73 73 button "progress
0b30: 2d 62 61 72 22 0a 20 20 20 20 20 20 20 20 20 20 -bar".
0b40: 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c action: (l
0b50: 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 ambda (self) (pr
0b60: 6f 70 65 72 74 69 65 73 20 28 70 72 6f 67 72 65 operties (progre
0b70: 73 73 2d 62 61 72 29 29 29 29 0a 20 20 20 20 20 ss-bar)))).
0b80: 20 20 20 28 62 75 74 74 6f 6e 20 22 73 70 69 6e (button "spin
0b90: 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
0ba0: 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 action: (lambd
0bb0: 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 a (self) (proper
0bc0: 74 69 65 73 20 28 73 70 69 6e 29 29 29 29 0a 20 ties (spin)))).
0bd0: 20 20 20 20 20 20 20 28 66 69 6c 6c 29 0a 20 20 (fill).
0be0: 20 20 20 20 20 20 6d 61 72 67 69 6e 3a 20 27 30 margin: '0
0bf0: 78 30 29 0a 20 20 20 20 20 20 28 68 62 6f 78 0a x0). (hbox.
0c00: 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 (button
0c10: 22 74 61 62 73 22 0a 20 20 20 20 20 20 20 20 20 "tabs".
0c20: 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 action: (
0c30: 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 lambda (self) (p
0c40: 72 6f 70 65 72 74 69 65 73 20 28 74 61 62 73 29 roperties (tabs)
0c50: 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 74 ))). (but
0c60: 74 6f 6e 20 22 74 65 78 74 62 6f 78 22 0a 20 20 ton "textbox".
0c70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 ac
0c80: 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 tion: (lambda (s
0c90: 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 73 elf) (properties
0ca0: 20 28 74 65 78 74 62 6f 78 29 29 29 29 0a 20 20 (textbox)))).
0cb0: 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 74 (button "t
0cc0: 6f 67 67 6c 65 22 0a 20 20 20 20 20 20 20 20 20 oggle".
0cd0: 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 action: (
0ce0: 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 lambda (self) (p
0cf0: 72 6f 70 65 72 74 69 65 73 20 28 74 6f 67 67 6c roperties (toggl
0d00: 65 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 e)))). (b
0d10: 75 74 74 6f 6e 20 22 74 72 65 65 62 6f 78 22 0a utton "treebox".
0d20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0d30: 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 action: (lambda
0d40: 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 (self) (properti
0d50: 65 73 20 28 74 72 65 65 62 6f 78 29 29 29 29 0a es (treebox)))).
0d60: 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 (button
0d70: 22 76 61 6c 75 61 74 6f 72 22 0a 20 20 20 20 20 "valuator".
0d80: 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f actio
0d90: 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 n: (lambda (self
0da0: 29 20 28 70 72 6f 70 65 72 74 69 65 73 20 28 76 ) (properties (v
0db0: 61 6c 75 61 74 6f 72 20 22 22 29 29 29 29 0a 20 aluator "")))).
0dc0: 20 20 20 20 20 20 20 28 66 69 6c 6c 29 0a 20 20 (fill).
0dd0: 20 20 20 20 20 20 6d 61 72 67 69 6e 3a 20 27 30 margin: '0
0de0: 78 30 29 0a 0a 20 20 20 20 20 20 28 6c 61 62 65 x0).. (labe
0df0: 6c 20 22 22 29 20 0a 20 20 20 20 20 20 28 6c 61 l "") . (la
0e00: 62 65 6c 20 22 41 64 64 69 74 69 6f 6e 61 6c 20 bel "Additional
0e10: 77 69 64 67 65 74 73 22 20 66 6f 6e 74 73 69 7a widgets" fontsiz
0e20: 65 3a 20 31 32 29 0a 20 20 20 20 20 20 28 68 62 e: 12). (hb
0e30: 6f 78 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 ox. (butt
0e40: 6f 6e 20 22 63 65 6c 6c 73 22 0a 20 20 20 20 20 on "cells".
0e50: 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f actio
0e60: 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 n: (lambda (self
0e70: 29 20 28 70 72 6f 70 65 72 74 69 65 73 20 28 63 ) (properties (c
0e80: 65 6c 6c 73 29 29 29 29 0a 20 20 20 20 20 20 20 ells)))).
0e90: 20 28 62 75 74 74 6f 6e 20 22 63 6f 6c 6f 72 2d (button "color-
0ea0: 62 61 72 22 0a 20 20 20 20 20 20 20 20 20 20 20 bar".
0eb0: 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 action: (la
0ec0: 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 6f mbda (self) (pro
0ed0: 70 65 72 74 69 65 73 20 28 63 6f 6c 6f 72 2d 62 perties (color-b
0ee0: 61 72 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 ar)))). (
0ef0: 62 75 74 74 6f 6e 20 22 63 6f 6c 6f 72 2d 62 72 button "color-br
0f00: 6f 77 73 65 72 22 0a 20 20 20 20 20 20 20 20 20 owser".
0f10: 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 action: (
0f20: 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 lambda (self) (p
0f30: 72 6f 70 65 72 74 69 65 73 20 28 63 6f 6c 6f 72 roperties (color
0f40: 2d 62 72 6f 77 73 65 72 29 29 29 29 0a 20 20 20 -browser)))).
0f50: 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 64 69 (button "di
0f60: 61 6c 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 al".
0f70: 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d action: (lam
0f80: 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 bda (self) (prop
0f90: 65 72 74 69 65 73 20 28 64 69 61 6c 20 22 22 29 erties (dial "")
0fa0: 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 74 ))). (but
0fb0: 74 6f 6e 20 22 6d 61 74 72 69 78 22 0a 20 20 20 ton "matrix".
0fc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 act
0fd0: 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 ion: (lambda (se
0fe0: 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 73 20 lf) (properties
0ff0: 28 6d 61 74 72 69 78 29 29 29 29 0a 20 20 20 20 (matrix)))).
1000: 20 20 20 20 28 66 69 6c 6c 29 0a 20 20 20 20 20 (fill).
1010: 20 20 20 6d 61 72 67 69 6e 3a 20 27 30 78 30 29 margin: '0x0)
1020: 0a 20 20 20 20 20 20 28 68 62 6f 78 0a 20 20 20 . (hbox.
1030: 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 70 70 (button "pp
1040: 6c 6f 74 22 0a 20 20 20 20 20 20 20 20 20 20 20 lot".
1050: 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 action: (la
1060: 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 6f mbda (self) (pro
1070: 70 65 72 74 69 65 73 20 28 70 70 6c 6f 74 29 29 perties (pplot))
1080: 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 )). (butt
1090: 6f 6e 20 22 67 6c 63 61 6e 76 61 73 22 0a 20 20 on "glcanvas".
10a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 ac
10b0: 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 tion: (lambda (s
10c0: 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 73 elf) (properties
10d0: 20 28 67 6c 63 61 6e 76 61 73 29 29 29 29 0a 20 (glcanvas)))).
10e0: 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 (button "
10f0: 77 65 62 2d 62 72 6f 77 73 65 72 22 0a 20 20 20 web-browser".
1100: 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 act
1110: 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 ion: (lambda (se
1120: 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 73 20 lf) (properties
1130: 28 77 65 62 2d 62 72 6f 77 73 65 72 29 29 29 29 (web-browser))))
1140: 0a 20 20 20 20 20 20 20 20 28 66 69 6c 6c 29 0a . (fill).
1150: 20 20 20 20 20 20 20 20 6d 61 72 67 69 6e 3a 20 margin:
1160: 27 30 78 30 29 0a 0a 20 20 20 20 20 20 28 6c 61 '0x0).. (la
1170: 62 65 6c 20 22 22 29 20 0a 20 20 20 20 20 20 28 bel "") . (
1180: 6c 61 62 65 6c 20 22 4d 65 6e 75 20 77 69 64 67 label "Menu widg
1190: 65 74 73 22 20 66 6f 6e 74 73 69 7a 65 3a 20 31 ets" fontsize: 1
11a0: 32 29 0a 20 20 20 20 20 20 28 68 62 6f 78 0a 20 2). (hbox.
11b0: 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 (button "
11c0: 6d 65 6e 75 22 0a 20 20 20 20 20 20 20 20 20 20 menu".
11d0: 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 28 6c action: (l
11e0: 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 70 72 ambda (self) (pr
11f0: 6f 70 65 72 74 69 65 73 20 28 6d 65 6e 75 29 29 operties (menu))
1200: 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 )). (butt
1210: 6f 6e 20 22 6d 65 6e 75 2d 69 74 65 6d 22 0a 20 on "menu-item".
1220: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 a
1230: 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 ction: (lambda (
1240: 73 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 self) (propertie
1250: 73 20 28 6d 65 6e 75 2d 69 74 65 6d 29 29 29 29 s (menu-item))))
1260: 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e . (button
1270: 20 22 6d 65 6e 75 2d 73 65 70 61 72 61 74 6f 72 "menu-separator
1280: 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
1290: 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 action: (lambd
12a0: 61 20 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 a (self) (proper
12b0: 74 69 65 73 20 28 6d 65 6e 75 2d 73 65 70 61 72 ties (menu-separ
12c0: 61 74 6f 72 29 29 29 29 0a 20 20 20 20 20 20 20 ator)))).
12d0: 20 28 66 69 6c 6c 29 0a 20 20 20 20 20 20 20 20 (fill).
12e0: 6d 61 72 67 69 6e 3a 20 27 30 78 30 29 0a 0a 20 margin: '0x0)..
12f0: 20 20 20 20 20 28 6c 61 62 65 6c 20 22 22 29 20 (label "")
1300: 0a 20 20 20 20 20 20 28 6c 61 62 65 6c 20 22 49 . (label "I
1310: 6d 61 67 65 73 22 20 66 6f 6e 74 73 69 7a 65 3a mages" fontsize:
1320: 20 31 32 29 0a 20 20 20 20 20 20 28 68 62 6f 78 12). (hbox
1330: 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e . (button
1340: 20 22 69 6d 61 67 65 2f 70 61 6c 65 74 74 65 22 "image/palette"
1350: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
1360: 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 action: (lambda
1370: 20 28 73 65 6c 66 29 0a 20 20 20 20 20 20 20 20 (self).
1380: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1390: 20 20 28 70 72 6f 70 65 72 74 69 65 73 0a 20 20 (properties.
13a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
13b0: 20 20 20 20 20 20 20 20 20 20 28 69 6d 61 67 65 (image
13c0: 2f 70 61 6c 65 74 74 65 20 31 20 31 20 28 75 38 /palette 1 1 (u8
13d0: 76 65 63 74 6f 72 2d 3e 62 6c 6f 62 20 28 75 38 vector->blob (u8
13e0: 76 65 63 74 6f 72 20 30 29 29 29 29 29 29 0a 20 vector 0)))))).
13f0: 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 (button "
1400: 69 6d 61 67 65 2f 72 67 62 22 0a 20 20 20 20 20 image/rgb".
1410: 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f actio
1420: 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 n: (lambda (self
1430: 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ).
1440: 20 20 20 20 20 20 20 20 20 20 20 20 28 70 72 6f (pro
1450: 70 65 72 74 69 65 73 0a 20 20 20 20 20 20 20 20 perties.
1460: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1470: 20 20 20 20 28 69 6d 61 67 65 2f 72 67 62 20 31 (image/rgb 1
1480: 20 31 20 28 75 38 76 65 63 74 6f 72 2d 3e 62 6c 1 (u8vector->bl
1490: 6f 62 20 28 75 38 76 65 63 74 6f 72 20 30 29 29 ob (u8vector 0))
14a0: 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 75 )))). (bu
14b0: 74 74 6f 6e 20 22 69 6d 61 67 65 2f 72 67 62 61 tton "image/rgba
14c0: 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ".
14d0: 20 20 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 action: (lambd
14e0: 61 20 28 73 65 6c 66 29 0a 20 20 20 20 20 20 20 a (self).
14f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1500: 20 20 20 28 70 72 6f 70 65 72 74 69 65 73 0a 20 (properties.
1510: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1520: 20 20 20 20 20 20 20 20 20 20 20 28 69 6d 61 67 (imag
1530: 65 2f 72 67 62 61 20 31 20 31 20 28 75 38 76 65 e/rgba 1 1 (u8ve
1540: 63 74 6f 72 2d 3e 62 6c 6f 62 20 28 75 38 76 65 ctor->blob (u8ve
1550: 63 74 6f 72 20 30 29 29 29 29 29 29 0a 20 20 20 ctor 0)))))).
1560: 20 20 20 20 20 28 62 75 74 74 6f 6e 20 22 69 6d (button "im
1570: 61 67 65 2f 66 69 6c 65 22 0a 20 20 20 20 20 20 age/file".
1580: 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e action
1590: 3a 20 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 : (lambda (self)
15a0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
15b0: 20 20 20 20 20 20 20 20 20 20 20 28 70 72 6f 70 (prop
15c0: 65 72 74 69 65 73 0a 20 20 20 20 20 20 20 20 20 erties.
15d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
15e0: 20 20 20 3b 3b 20 73 61 6d 65 20 61 74 74 72 69 ;; same attri
15f0: 62 75 74 65 73 20 61 73 20 69 6d 61 67 65 2f 70 butes as image/p
1600: 61 6c 65 74 74 65 0a 20 20 20 20 20 20 20 20 20 alette.
1610: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1620: 20 20 20 28 69 6d 61 67 65 2f 70 61 6c 65 74 74 (image/palett
1630: 65 20 31 20 31 20 28 75 38 76 65 63 74 6f 72 2d e 1 1 (u8vector-
1640: 3e 62 6c 6f 62 20 28 75 38 76 65 63 74 6f 72 20 >blob (u8vector
1650: 30 29 29 29 29 29 29 0a 20 20 20 20 20 20 20 20 0)))))).
1660: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1670: 20 20 20 20 3b 3b 20 6e 65 65 64 73 20 61 20 66 ;; needs a f
1680: 69 6c 65 20 69 6e 20 63 75 72 72 65 6e 74 20 64 ile in current d
1690: 69 72 65 63 74 6f 72 79 0a 20 20 20 20 20 20 20 irectory.
16a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
16b0: 20 20 20 20 20 3b 28 69 6d 61 67 65 2f 66 69 6c ;(image/fil
16c0: 65 20 22 63 68 69 63 6b 65 6e 2e 69 63 6f 22 29 e "chicken.ico")
16d0: 29 29 29 20 3b 20 6f 6b 0a 20 20 20 20 20 20 20 ))) ; ok.
16e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
16f0: 20 20 20 20 20 3b 28 69 6d 61 67 65 2f 66 69 6c ;(image/fil
1700: 65 20 22 63 68 69 63 6b 65 6e 2e 70 6e 67 22 29 e "chicken.png")
1710: 29 29 29 20 3b 20 64 6f 65 73 6e 27 74 20 77 6f ))) ; doesn't wo
1720: 72 6b 0a 20 20 20 20 20 20 20 20 28 66 69 6c 6c rk. (fill
1730: 29 0a 20 20 20 20 20 20 20 20 6d 61 72 67 69 6e ). margin
1740: 3a 20 27 30 78 30 29 0a 0a 20 20 20 20 20 20 28 : '0x0).. (
1750: 6c 61 62 65 6c 20 22 22 29 20 0a 20 20 20 20 20 label "") .
1760: 20 28 6c 61 62 65 6c 20 22 4f 74 68 65 72 20 77 (label "Other w
1770: 69 64 67 65 74 73 22 20 66 6f 6e 74 73 69 7a 65 idgets" fontsize
1780: 3a 20 31 32 29 0a 20 20 20 20 20 20 28 68 62 6f : 12). (hbo
1790: 78 0a 20 20 20 20 20 20 20 20 28 62 75 74 74 6f x. (butto
17a0: 6e 20 22 63 6c 69 70 62 6f 61 72 64 22 0a 20 20 n "clipboard".
17b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 ac
17c0: 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 28 73 tion: (lambda (s
17d0: 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 65 73 elf) (properties
17e0: 20 28 63 6c 69 70 62 6f 61 72 64 29 29 29 29 0a (clipboard)))).
17f0: 20 20 20 20 20 20 20 20 28 62 75 74 74 6f 6e 20 (button
1800: 22 74 69 6d 65 72 22 0a 20 20 20 20 20 20 20 20 "timer".
1810: 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 3a 20 action:
1820: 28 6c 61 6d 62 64 61 20 28 73 65 6c 66 29 20 28 (lambda (self) (
1830: 70 72 6f 70 65 72 74 69 65 73 20 28 74 69 6d 65 properties (time
1840: 72 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 62 r)))). (b
1850: 75 74 74 6f 6e 20 22 73 70 69 6e 62 6f 78 22 0a utton "spinbox".
1860: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1870: 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 action: (lambda
1880: 28 73 65 6c 66 29 20 28 70 72 6f 70 65 72 74 69 (self) (properti
1890: 65 73 20 28 73 70 69 6e 62 6f 78 20 28 76 62 6f es (spinbox (vbo
18a0: 78 29 29 29 29 29 0a 20 20 20 20 20 20 20 20 28 x))))). (
18b0: 66 69 6c 6c 29 0a 20 20 20 20 20 20 20 20 6d 61 fill). ma
18c0: 72 67 69 6e 3a 20 27 30 78 30 29 0a 0a 20 20 20 rgin: '0x0)..
18d0: 20 20 20 28 66 69 6c 6c 29 0a 20 20 20 20 20 20 (fill).
18e0: 28 62 75 74 74 6f 6e 20 22 45 26 78 69 74 22 0a (button "E&xit".
18f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 78 ex
1900: 70 61 6e 64 3a 20 27 68 6f 72 69 7a 6f 6e 74 61 pand: 'horizonta
1910: 6c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 l.
1920: 61 63 74 69 6f 6e 3a 20 28 6c 61 6d 62 64 61 20 action: (lambda
1930: 28 73 65 6c 66 29 20 27 63 6c 6f 73 65 29 29 0a (self) 'close)).
1940: 20 20 20 20 20 20 29 0a 20 20 20 20 6d 61 72 67 ). marg
1950: 69 6e 3a 20 27 31 35 78 31 35 0a 20 20 20 20 74 in: '15x15. t
1960: 69 74 6c 65 3a 20 22 49 75 70 20 69 6e 73 70 65 itle: "Iup inspe
1970: 63 74 6f 72 22 29 29 0a 0a 28 73 68 6f 77 20 64 ctor"))..(show d
1980: 6c 67 29 0a 28 6d 61 69 6e 2d 6c 6f 6f 70 29 0a lg).(main-loop).
1990: 28 65 78 69 74 20 30 29 0a (exit 0).