Changeset 112
- Timestamp:
- 12/31/07 22:18:08 (11 months ago)
- Files:
-
- 1 added
- 43 modified
-
RebDOC.r (modified) (13 diffs)
-
functions/get-values.r (modified) (2 diffs)
-
functions/set-state.r (modified) (1 diff)
-
functions/set-values.r (modified) (1 diff)
-
images/logo.png (modified) (previous)
-
rebgui-ctx.r (modified) (5 diffs)
-
rebgui-layout.r (modified) (2 diffs)
-
rebgui-widgets.r (modified) (9 diffs)
-
rebgui.r (modified) (124 diffs)
-
requestors/request-char.r (modified) (1 diff)
-
requestors/request-ui.r (modified) (3 diffs)
-
requestors/splash.r (modified) (1 diff)
-
tour.r (modified) (3 diffs)
-
widgets/area.r (modified) (3 diffs)
-
widgets/arrow.r (modified) (2 diffs)
-
widgets/bar.r (modified) (1 diff)
-
widgets/button.r (modified) (2 diffs)
-
widgets/chat.r (modified) (8 diffs)
-
widgets/check.r (modified) (4 diffs)
-
widgets/drop-list.r (modified) (2 diffs)
-
widgets/edit-list.r (modified) (1 diff)
-
widgets/field.r (modified) (1 diff)
-
widgets/group-box.r (modified) (3 diffs)
-
widgets/led.r (modified) (2 diffs)
-
widgets/link.r (modified) (1 diff)
-
widgets/menu.r (modified) (2 diffs)
-
widgets/panel.r (modified) (2 diffs)
-
widgets/password.r (modified) (1 diff)
-
widgets/pill.r (added)
-
widgets/progress.r (modified) (2 diffs)
-
widgets/radio-group.r (modified) (4 diffs)
-
widgets/scroll-panel.r (modified) (5 diffs)
-
widgets/sheet.r (modified) (8 diffs)
-
widgets/slider.r (modified) (11 diffs)
-
widgets/spinner.r (modified) (3 diffs)
-
widgets/splitter.r (modified) (3 diffs)
-
widgets/symbol.r (modified) (2 diffs)
-
widgets/tab-panel.r (modified) (7 diffs)
-
widgets/table.r (modified) (6 diffs)
-
widgets/text-list.r (modified) (2 diffs)
-
widgets/title-group.r (modified) (1 diff)
-
widgets/tool-bar.r (modified) (2 diffs)
-
widgets/tooltip.r (modified) (3 diffs)
-
widgets/tree.r (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
RebDOC.r
r111 r112 6 6 110 Initial release 7 7 111 References new requestors object 8 112 Added color panel 8 9 } 9 10 ] … … 13 14 make object! [ 14 15 15 widgets: find first ctx-rebgui/widgets 'anim16 widgets: sort find first ctx-rebgui/widgets 'anim 16 17 requestors: find first ctx-rebgui/requestors 'alert 17 18 functions: find first ctx-rebgui/functions 'append-widget … … 54 55 request-progress [[ 10 [loop 10 [wait .5 step]] ]] 55 56 request-spellcheck [[ make rebface [text: "wordz"] ]] 56 splash [[ [color: ctx-rebgui/colors/window image: load %images/logo.png size: image/size]unview ]]57 splash [[ %images/logo.png unview ]] 57 58 ][ 58 59 copy "Text." … … 62 63 after 1 63 64 heading (either object [form word] [uppercase/part form word 1]) 64 panel 150 whitedata [65 panel 150 snow data [ 65 66 after 2 66 67 label 20 "Source" link (rejoin [lnk either object [%rebgui-ctx] [word] %.r]) … … 76 77 insert tail lay compose/deep [panel 150 data [button 45x15 (form word) [(word) (arg)]]] 77 78 ] 78 insert tail lay [panel 150 whitedata [text txt font [name: font-fixed]]]79 insert tail lay [panel 150 snow data [text txt font [name: font-fixed]]] 79 80 lay: ctx-rebgui/layout/only lay 80 81 face/pane/1/pane: lay 81 82 face/pane/1/size: lay/size 82 83 face/action/on-resize face 84 if scroll/picked = 2 [face/pane/2/data: 0] 83 85 show face 84 86 ] 87 88 scroll: none 85 89 86 90 do show-tour: make function! [] [ 87 91 display "RebGUI Documentation" [ 88 92 image %images/logo.png tip "RebGUI logo" 93 return 94 label "Scroll:" 95 scroll: radio-group data [1 "Sticky" "Reset"] 89 96 return 90 97 tab-panel data [ … … 96 103 after 1 97 104 heading "Widgets" 98 panel 150 whitedata [105 panel 150 snow data [ 99 106 after 2 100 107 label 20 "Source" link http://trac.geekisp.com/rebgui/browser/rebgui-widgets.r … … 102 109 label 20 "Number" text (form length? widgets) 103 110 ] 104 panel 150 whitedata [111 panel 150 snow data [ 105 112 text (func-help ctx-rebgui/widgets) font [name: font-fixed] 106 113 ] … … 114 121 after 1 115 122 heading "Requestors" 116 panel 150 whitedata [123 panel 150 snow data [ 117 124 after 2 118 125 label 20 "Source" link http://trac.geekisp.com/rebgui/browser/rebgui-requestors.r … … 120 127 label 20 "Number" text (form length? requestors) 121 128 ] 122 panel 150 whitedata [129 panel 150 snow data [ 123 130 text (func-help ctx-rebgui/requestors) font [name: font-fixed] 124 131 ] … … 132 139 after 1 133 140 heading "Functions" 134 panel 150 whitedata [141 panel 150 snow data [ 135 142 after 2 136 143 label 20 "Source" link http://trac.geekisp.com/rebgui/browser/rebgui-functions.r … … 138 145 label 20 "Number" text (form length? functions) 139 146 ] 140 panel 150 whitedata [147 panel 150 snow data [ 141 148 text (func-help ctx-rebgui/functions) font [name: font-fixed] 142 149 ] … … 150 157 after 1 151 158 heading "Objects" 152 panel 150 whitedata [159 panel 150 snow data [ 153 160 after 2 154 161 label 20 "Source" link http://trac.geekisp.com/rebgui/browser/rebgui-ctx.r … … 156 163 label 20 "Number" text (form length? objects) 157 164 ] 158 panel 150 whitedata [165 panel 150 snow data [ 159 166 text (func-help ctx-rebgui) font [name: font-fixed] 160 167 ] 168 ] 169 ] 170 "Colors" [ 171 group-box snow "Theme" data [ 172 label-size 25x10 173 text-size -1x10 174 after 3 175 label "page" pill ctx-rebgui/colors/page text "Main background^/Reversed text" 176 label "text" pill ctx-rebgui/colors/text text "Normal text" 177 label "theme-light" pill ctx-rebgui/colors/theme-light text "Over / selection background" 178 label "theme-dark" pill ctx-rebgui/colors/theme-dark text "Heading background^/Edit edge" 179 label "state-light" pill ctx-rebgui/colors/state-light text "Temporary state (e.g. button down)" 180 label "state-dark" pill ctx-rebgui/colors/state-dark text "Permanent state (e.g. radio selection)" 181 label "outline-light" pill ctx-rebgui/colors/outline-light text "Info background^/Non-edit edge^/Slider background" 182 label "outline-dark" pill ctx-rebgui/colors/outline-dark text "Informational text" 161 183 ] 162 184 ] -
functions/get-values.r
r111 r112 1 1 get-values: make function! [ 2 "Gets values from input widgets within a display or tab-panel face."2 "Gets values from input widgets within a display or grouping widget." 3 3 face [object!] "Display face" 4 4 /type "Precede each value with its type" 5 5 /local blk 6 6 ] [ 7 if face/type = 'tab-panel [face: face/pane/1] 7 all [ 8 find [scroll-panel tab-panel] face/type 9 face: either block? face/pane [face: face/pane/1] [face/pane] 10 ] 8 11 blk: copy [] 9 12 foreach widget face/pane [ 10 13 if find [ 11 area check check-group drop-list edit-list field group-box password radio-group s lider tab-panel table text-list14 area check check-group drop-list edit-list field group-box password radio-group scroll-panel slider tab-panel table text-list 12 15 ] widget/type [ 13 16 all [type insert tail blk widget/type] … … 16 19 find [check check-group slider] widget/type [widget/data] 17 20 find [radio-group table text-list] widget/type [widget/picked] 18 find [ group-box tab-panel] widget/type [19 either type [get- input/type widget] [get-inputwidget]21 find [scroll-panel group-box tab-panel] widget/type [ 22 either type [get-values/type widget] [get-values widget] 20 23 ] 21 24 ] -
functions/set-state.r
r111 r112 14 14 face/action: make face/action [on-focus: make function! [face] [false]] 15 15 all [face/type = 'edit-list insert tail face/options 'no-click] 16 colors/ widget16 colors/outline-light 17 17 ][ 18 18 face/action: make face/action [on-focus: make function! [face] [true]] 19 19 all [face/type = 'edit-list remove find face/options 'no-click] 20 colors/ edit20 colors/page 21 21 ] 22 22 ] -
functions/set-values.r
r111 r112 1 1 set-values: make function! [ 2 "Puts values into input widgets within a display or tab-panel face."2 "Puts values into input widgets within a display or grouping widget." 3 3 face [object!] "Display face" 4 4 blk [block!] "Block of values (or 'skip)" 5 5 /local val 6 6 ] [ 7 if face/type = 'tab-panel [face: face/pane/1] 7 all [ 8 find [scroll-panel tab-panel] face/type 9 face: either block? face/pane [face: face/pane/1] [face/pane] 10 ] 8 11 foreach widget face/pane [ 9 12 if find [ 10 area check check-group drop-list edit-list field group-box password radio-group s lider tab-panel table text-list13 area check check-group drop-list edit-list field group-box password radio-group scroll-panel slider tab-panel table text-list 11 14 ] widget/type [ 12 15 unless 'skip = val: first blk [ 13 16 switch/default widget/type [ 14 check [widget/data: val] 15 check-group [all [block? val insert clear widget/data val]] 16 group-box [all [block? val put-input widget copy/deep val]] 17 radio-group [widget/select-item to integer! val] 18 slider [widget/data: to decimal! val] 19 tab-panel [all [block? val put-input widget copy/deep val]] 20 table [widget/select-row val] 21 text-list [widget/select-row val] 17 check [widget/data: val] 18 check-group [all [block? val insert clear widget/data val]] 19 group-box [all [block? val set-values widget copy/deep val]] 20 radio-group [widget/select-item to integer! val] 21 scroll-panel [all [block? val set-values widget copy/deep val]] 22 slider [widget/data: to decimal! val] 23 tab-panel [all [block? val set-values widget copy/deep val]] 24 table [widget/select-row val] 25 text-list [widget/select-row val] 22 26 ][ 23 27 ; area drop-list edit-list field password -
rebgui-ctx.r
r111 r112 112 112 ctx-rebgui: make object! [ 113 113 114 build: 11 1114 build: 112 115 115 view*: system/view 116 116 locale*: system/locale … … 193 193 span-size: make function! [face [object!] size [pair!] margin [pair!]] [ 194 194 if face/span [ 195 all [find face/span #L face/size/x: size/x - face/offset/x - margin/x] 195 all [ 196 find face/span #L 197 face/size/x: size/x - face/offset/x - margin/x 198 all [find [drop-list edit-list] face/type face/pane/offset/x: face/size/x - sizes/line + 1] 199 ] 196 200 all [find face/span #V face/size/y: size/y - face/offset/y - margin/y] 197 201 all [face/old-size <> face/size object? get in face 'action face/action/on-resize face] … … 225 229 226 230 ; 227 ; --- (de)select menu face228 ; 229 230 select- row: make function! [face] [231 face/color: colors/ menu232 face/font/color: white231 ; --- Hilight funcs --- 232 ; 233 234 select-face: make function! [face] [ 235 face/color: colors/state-light 236 face/font/color: colors/page 233 237 show face 234 238 ] 235 239 236 deselect- row: make function! [face] [237 face/color: colors/edit238 face/font/color: black240 deselect-face: make function! [face /fill] [ 241 face/color: either fill [colors/page] [none] 242 face/font/color: colors/text 239 243 show face 240 244 ] … … 245 249 246 250 colors: construct/with either exists? %ui.dat [pick load %ui.dat 3] [[]] make object! [ 247 btn-down: 216.232.255 248 btn-text: 77.97.133 249 btn-up: 200.214.251 250 button: white 251 edge: 127.157.185 252 edit: white ; area, field, password, etc 253 false: red ; LED, check-box 254 menu: 49.106.197 ; menu, popup highlight 255 over: gold ; active button, tab, splitter, etc 256 tooltip-edge: 0.0.0 257 tooltip-fill: 255.255.225 258 tooltip-text: 0.0.0 259 true: leaf ; radio-group, LED, check-box 260 widget: 244.243.238 261 window: 236.233.216 ; used by display.r 251 page: white 252 text: black 253 theme-light: 195.221.127 254 theme-dark: 136.187.0 255 state-light: 255.204.127 256 state-dark: 255.153.0 257 outline-light: 204.204.204 258 outline-dark: 136.136.136 262 259 ] 263 260 … … 284 281 effects: construct/with either exists? %ui.dat [pick load %ui.dat 12] [[]] make object! [ 285 282 arrows-together: false 286 radius: 7287 font: either font? " verdana" ["verdana"] [font-sans-serif]283 radius: 5 284 font: either font? "arial" ["verdana"] [font-sans-serif] 288 285 fonts: sort reduce [font-sans-serif font-fixed font-serif "verdana"] 289 286 splash-delay: 1 -
rebgui-layout.r
r111 r112 87 87 view-face: make rebface [ 88 88 pane: copy [] ; copy needed to prevent "face in more than one pane" errors 89 color: colors/ window89 color: colors/page 90 90 effect: all [not only effects/window] 91 91 options: copy [activate-on-show] … … 172 172 if attribute-feel [feel: make feel attribute-feel] 173 173 ; action object 174 if any [action-away action-alt-click action-click action-dbl-click action-edit action-focus action-key action-over action-resize action-scroll action-unfocus] [ 175 action: make action [] 176 all [action-focus action/on-focus: make function! [face /local var] action-focus] 177 all [action-unfocus action/on-unfocus: make function! [face /local var] action-unfocus] 178 all [action-resize action/on-resize: make function! [face /local var] action-resize] 179 ; action block and associated engage feel 180 if any [action-alt-click action-click action-dbl-click action-edit action-key action-scroll] [ 181 all [action-alt-click action/on-alt-click: make function! [face /local var] action-alt-click] 182 all [action-click action/on-click: make function! [face /local var] action-click] 183 all [action-dbl-click action/on-dbl-click: make function! [face /local var] action-dbl-click] 184 all [action-edit action/on-edit: make function! [face /local var] action-edit] 185 all [action-key action/on-key: make function! [face event /local var] action-key] 186 all [action-scroll action/on-scroll: make function! [face scroll /page /local var] action-scroll] 187 unless get in feel 'engage [ 188 feel: make feel [ 189 engage: make function! [face act event] [ 190 case [ 191 event/double-click [face/action/on-dbl-click face] 192 act = 'up [face/action/on-click face] 193 act = 'alt-up [face/action/on-alt-click face] 194 act = 'key [face/action/on-key face event face/action/on-edit face] 195 act = 'scroll-line [face/action/on-scroll face event/offset] 196 act = 'scroll-page [face/action/on-scroll/page face event/offset] 174 action: make action [] 175 all [action-alt-click action/on-alt-click: make function! [face /local var] action-alt-click] 176 all [action-away action/on-away: make function! [face /local var] action-away] 177 all [action-click action/on-click: make function! [face /local var] action-click] 178 all [action-dbl-click action/on-dbl-click: make function! [face /local var] action-dbl-click] 179 all [action-edit action/on-edit: make function! [face /local var] action-edit] 180 all [action-focus action/on-focus: make function! [face /local var] action-focus] 181 all [action-key action/on-key: make function! [face event /local var] action-key] 182 all [action-over action/on-over: make function! [face /local var] action-over] 183 all [action-resize action/on-resize: make function! [face /local var] action-resize] 184 all [action-scroll action/on-scroll: make function! [face scroll /page /local var] action-scroll] 185 all [action-unfocus action/on-unfocus: make function! [face /local var] action-unfocus] 186 ; action block and associated engage feel 187 if any [ 188 get in action 'on-alt-click 189 get in action 'on-click 190 get in action 'on-dbl-click 191 get in action 'on-edit 192 get in action 'on-key 193 get in action 'on-scroll 194 ][ 195 unless get in feel 'engage [ 196 feel: make feel [ 197 engage: make function! [face act event] [ 198 case [ 199 event/double-click [face/action/on-dbl-click face] 200 act = 'up [face/action/on-click face] 201 act = 'alt-up [face/action/on-alt-click face] 202 act = 'key [ 203 face/action/on-key face event 204 face/action/on-edit face 197 205 ] 206 act = 'scroll-line [face/action/on-scroll face event/offset] 207 act = 'scroll-page [face/action/on-scroll/page face event/offset] 198 208 ] 199 209 ] 200 210 ] 201 211 <
