Changeset 114
- Timestamp:
- 09/07/08 03:38:37 (2 months ago)
- Files:
-
- 6 modified
-
functions/set-values.r (modified) (3 diffs)
-
rebgui-ctx.r (modified) (1 diff)
-
rebgui-edit.r (modified) (1 diff)
-
rebgui-widgets.r (modified) (2 diffs)
-
rebgui.r (modified) (11 diffs)
-
widgets/pill.r (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
functions/set-values.r
r112 r114 3 3 face [object!] "Display face" 4 4 blk [block!] "Block of values (or 'skip)" 5 /no-show "Don't show" 5 6 /local val 6 7 ] [ … … 17 18 check [widget/data: val] 18 19 check-group [all [block? val insert clear widget/data val]] 19 group-box [all [block? val set-values widget copy/deep val]]20 group-box [all [block? val set-values/no-show widget copy/deep val]] 20 21 radio-group [widget/select-item to integer! val] 21 scroll-panel [all [block? val set-values widget copy/deep val]]22 scroll-panel [all [block? val set-values/no-show widget copy/deep val]] 22 23 slider [widget/data: to decimal! val] 23 tab-panel [all [block? val set-values widget copy/deep val]]24 tab-panel [all [block? val set-values/no-show widget copy/deep val]] 24 25 table [widget/select-row val] 25 26 text-list [widget/select-row val] … … 36 37 ] 37 38 blk: head blk 39 unless no-show [show face] 38 40 ] -
rebgui-ctx.r
r112 r114 112 112 ctx-rebgui: make object! [ 113 113 114 build: 11 2114 build: 114 115 115 view*: system/view 116 116 locale*: system/locale -
rebgui-edit.r
r101 r114 8 8 Soundex function derived from Allen Kamp's http:ne//www.rebol.org/library/scripts-download/soundex.r 9 9 Dictionaries sourced from AbiWord http://www.abisource.com/downloads/dictionaries/Windows/ 10 Spell-check based on code in this thread: http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlNYQC 10 11 } 11 12 History: { -
rebgui-widgets.r
r112 r114 411 411 engage: make function! [face act event /local p a b] [ 412 412 p: face/parent-face 413 if find [ down alt-down] act [413 if find [up alt-up] act [ 414 414 either event/double-click [ 415 415 p/parent-face/dbl-action p/parent-face … … 437 437 ; perform action if any 438 438 show p 439 if all [act = ' downnot find p/parent-face/options 'no-action] [439 if all [act = 'up not find p/parent-face/options 'no-action] [ 440 440 p/parent-face/action p/parent-face 441 441 ] 442 if all [act = 'alt- downnot find p/parent-face/options 'no-action] [442 if all [act = 'alt-up not find p/parent-face/options 'no-action] [ 443 443 p/parent-face/alt-action p/parent-face 444 444 ] -
rebgui.r
r112 r114 1 REBOL[version: 11 2]1 REBOL[version: 114] 2 2 if system/version < 1.3.2[make error! "RebGUI requires View 1.3.2 or greater"] 3 3 unless value? 'viewed?[ … … 24 24 ] 25 25 ctx-rebgui: make object![ 26 build: 11 226 build: 114 27 27 view*: system/view 28 28 locale*: system/locale … … 939 939 engage: make function![face act event /local p a b][ 940 940 p: face/parent-face 941 if find[ down alt-down]act[941 if find[up alt-up]act[ 942 942 either event/double-click[ 943 943 p/parent-face/dbl-action p/parent-face … … 961 961 ][insert clear picked data] 962 962 show p 963 if all[act = ' downnot find p/parent-face/options 'no-action][963 if all[act = 'up not find p/parent-face/options 'no-action][ 964 964 p/parent-face/action p/parent-face 965 965 ] 966 if all[act = 'alt- downnot find p/parent-face/options 'no-action][966 if all[act = 'alt-up not find p/parent-face/options 'no-action][ 967 967 p/parent-face/alt-action p/parent-face 968 968 ] … … 1067 1067 A rectangular area with rounded corners.} 1068 1068 size: 10x10 1069 effect:[draw[pen none fill-pen none line-width sizes/edge box 0x0 0x0 effects/radius]]1069 effect:[draw[pen none line-width sizes/edge fill-pen linear 0x0 0 0 90 1 1 none none none box 0x0 0x0 effects/radius]] 1070 1070 pen: none 1071 1071 fill: make function![][effect/draw/fill-pen] … … 1075 1075 all[ 1076 1076 face/color 1077 face/effect/draw/pen: face/effect/draw/fill-pen: face/color 1077 poke face/effect/draw 13 face/color + 0.0.0.64 1078 poke face/effect/draw 14 face/color + 0.0.0.32 1079 poke face/effect/draw 15 face/color 1078 1080 face/color: none 1079 1081 ] … … 1082 1084 ] 1083 1085 action: make default-action[ 1084 on-resize: make function![face][poke face/effect/draw 9 face/size - 1x1] 1086 on-resize: make function![face][ 1087 poke face/effect/draw 8 to integer! face/size/y * 0.25 1088 poke face/effect/draw 9 to integer! face/size/y * 0.75 1089 poke face/effect/draw 18 face/size - 1x1 1090 poke face/effect/draw 19 to integer! face/size/y / 3 1091 ] 1085 1092 ] 1086 1093 init: make function![][ … … 3044 3051 unless no-action[action/on-click self] 3045 3052 ] 3053 system/view/caret: pane/1/pane/1/text 3054 system/view/focal-face: pane/1/pane/1 3046 3055 show self 3047 3056 ] … … 5101 5110 face[object!]"Display face" 5102 5111 blk[block!]"Block of values (or 'skip)" 5112 /no-show "Don't show" 5103 5113 /local val 5104 5114 ][ … … 5115 5125 check[widget/data: val] 5116 5126 check-group[all[block? val insert clear widget/data val]] 5117 group-box[all[block? val set-values widget copy/deep val]]5127 group-box[all[block? val set-values/no-show widget copy/deep val]] 5118 5128 radio-group[widget/select-item to integer! val] 5119 scroll-panel[all[block? val set-values widget copy/deep val]]5129 scroll-panel[all[block? val set-values/no-show widget copy/deep val]] 5120 5130 slider[widget/data: to decimal! val] 5121 tab-panel[all[block? val set-values widget copy/deep val]]5131 tab-panel[all[block? val set-values/no-show widget copy/deep val]] 5122 5132 table[widget/select-row val] 5123 5133 text-list[widget/select-row val] … … 5132 5142 ] 5133 5143 ] 5134 blk: head blk 5144 blk: head blk 5145 unless no-show[show face] 5135 5146 ] 5136 5147 translate: make function![ -
widgets/pill.r
r112 r114 8 8 } 9 9 size: 10x10 10 effect: [draw [pen none fill-pen none line-width sizes/edge box 0x0 0x0 effects/radius]]10 effect: [draw [pen none line-width sizes/edge fill-pen linear 0x0 0 0 90 1 1 none none none box 0x0 0x0 effects/radius]] 11 11 pen: none 12 12 fill: make function! [] [effect/draw/fill-pen] … … 16 16 all [ 17 17 face/color 18 face/effect/draw/pen: face/effect/draw/fill-pen: face/color 18 poke face/effect/draw 13 face/color + 0.0.0.64 19 poke face/effect/draw 14 face/color + 0.0.0.32 20 poke face/effect/draw 15 face/color 19 21 face/color: none 20 22 ] … … 23 25 ] 24 26 action: make default-action [ 25 on-resize: make function! [face] [poke face/effect/draw 9 face/size - 1x1] 27 on-resize: make function! [face] [ 28 poke face/effect/draw 8 to integer! face/size/y * .25 29 poke face/effect/draw 9 to integer! face/size/y * .75 30 poke face/effect/draw 18 face/size - 1x1 31 poke face/effect/draw 19 to integer! face/size/y / 3 32 ] 26 33 ] 27 34 init: make function! [] [
