Changeset 114

Show
Ignore:
Timestamp:
09/07/08 03:38:37 (2 months ago)
Author:
ashley
Message:

Added /no-show refinement to set-values.r, updated pill.r and fixed face-iterator in widgets.r

Files:
6 modified

Legend:

Unmodified
Added
Removed
  • functions/set-values.r

    r112 r114  
    33        face [object!] "Display face" 
    44        blk [block!] "Block of values (or 'skip)" 
     5        /no-show "Don't show" 
    56        /local val 
    67] [ 
     
    1718                                        check                   [widget/data: val] 
    1819                                        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]] 
    2021                                        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]] 
    2223                                        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]] 
    2425                                        table                   [widget/select-row val] 
    2526                                        text-list               [widget/select-row val] 
     
    3637        ] 
    3738        blk: head blk 
     39        unless no-show [show face] 
    3840] 
  • rebgui-ctx.r

    r112 r114  
    112112ctx-rebgui: make object! [ 
    113113 
    114         build:          112 
     114        build:          114 
    115115        view*:          system/view 
    116116        locale*:        system/locale 
  • rebgui-edit.r

    r101 r114  
    88                Soundex function derived from Allen Kamp's http:ne//www.rebol.org/library/scripts-download/soundex.r 
    99                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 
    1011        } 
    1112        History: { 
  • rebgui-widgets.r

    r112 r114  
    411411                                                engage: make function! [face act event /local p a b] [ 
    412412                                                        p: face/parent-face 
    413                                                         if find [down alt-down] act [ 
     413                                                        if find [up alt-up] act [ 
    414414                                                                either event/double-click [ 
    415415                                                                        p/parent-face/dbl-action p/parent-face 
     
    437437                                                                        ;       perform action if any 
    438438                                                                        show p 
    439                                                                         if all [act = 'down not find p/parent-face/options 'no-action] [ 
     439                                                                        if all [act = 'up not find p/parent-face/options 'no-action] [ 
    440440                                                                                p/parent-face/action p/parent-face 
    441441                                                                        ] 
    442                                                                         if all [act = 'alt-down not find p/parent-face/options 'no-action] [ 
     442                                                                        if all [act = 'alt-up not find p/parent-face/options 'no-action] [ 
    443443                                                                                p/parent-face/alt-action p/parent-face 
    444444                                                                        ] 
  • rebgui.r

    r112 r114  
    1 REBOL[version: 112] 
     1REBOL[version: 114] 
    22if system/version < 1.3.2[make error! "RebGUI requires View 1.3.2 or greater"] 
    33unless value? 'viewed?[ 
     
    2424] 
    2525ctx-rebgui: make object![ 
    26 build: 112  
     26build: 114  
    2727view*: system/view  
    2828locale*: system/locale  
     
    939939engage: make function![face act event /local p a b][ 
    940940p: face/parent-face  
    941 if find[down alt-down]act[ 
     941if find[up alt-up]act[ 
    942942either event/double-click[ 
    943943p/parent-face/dbl-action p/parent-face 
     
    961961][insert clear picked data] 
    962962show p  
    963 if all[act = 'down not find p/parent-face/options 'no-action][ 
     963if all[act = 'up not find p/parent-face/options 'no-action][ 
    964964p/parent-face/action p/parent-face 
    965965] 
    966 if all[act = 'alt-down not find p/parent-face/options 'no-action][ 
     966if all[act = 'alt-up not find p/parent-face/options 'no-action][ 
    967967p/parent-face/alt-action p/parent-face 
    968968] 
     
    10671067A rectangular area with rounded corners.} 
    10681068size: 10x10  
    1069 effect:[draw[pen none fill-pen none line-width sizes/edge box 0x0 0x0 effects/radius]] 
     1069effect:[draw[pen none line-width sizes/edge fill-pen linear 0x0 0 0 90 1 1 none none none box 0x0 0x0 effects/radius]] 
    10701070pen: none  
    10711071fill: make function![][effect/draw/fill-pen] 
     
    10751075all[ 
    10761076face/color  
    1077 face/effect/draw/pen: face/effect/draw/fill-pen: face/color  
     1077poke face/effect/draw 13 face/color + 0.0.0.64  
     1078poke face/effect/draw 14 face/color + 0.0.0.32  
     1079poke face/effect/draw 15 face/color  
    10781080face/color: none 
    10791081] 
     
    10821084] 
    10831085action: make default-action[ 
    1084 on-resize: make function![face][poke face/effect/draw 9 face/size - 1x1] 
     1086on-resize: make function![face][ 
     1087poke face/effect/draw 8 to integer! face/size/y * 0.25  
     1088poke face/effect/draw 9 to integer! face/size/y * 0.75  
     1089poke face/effect/draw 18 face/size - 1x1  
     1090poke face/effect/draw 19 to integer! face/size/y / 3 
     1091] 
    10851092] 
    10861093init: make function![][ 
     
    30443051unless no-action[action/on-click self] 
    30453052] 
     3053system/view/caret: pane/1/pane/1/text  
     3054system/view/focal-face: pane/1/pane/1  
    30463055show self 
    30473056] 
     
    51015110face[object!]"Display face"  
    51025111blk[block!]"Block of values (or 'skip)"  
     5112/no-show "Don't show"  
    51035113/local val 
    51045114][ 
     
    51155125check[widget/data: val] 
    51165126check-group[all[block? val insert clear widget/data val]] 
    5117 group-box[all[block? val set-values widget copy/deep val]] 
     5127group-box[all[block? val set-values/no-show widget copy/deep val]] 
    51185128radio-group[widget/select-item to integer! val] 
    5119 scroll-panel[all[block? val set-values widget copy/deep val]] 
     5129scroll-panel[all[block? val set-values/no-show widget copy/deep val]] 
    51205130slider[widget/data: to decimal! val] 
    5121 tab-panel[all[block? val set-values widget copy/deep val]] 
     5131tab-panel[all[block? val set-values/no-show widget copy/deep val]] 
    51225132table[widget/select-row val] 
    51235133text-list[widget/select-row val] 
     
    51325142] 
    51335143] 
    5134 blk: head blk 
     5144blk: head blk  
     5145unless no-show[show face] 
    51355146] 
    51365147translate: make function![ 
  • widgets/pill.r

    r112 r114  
    88        } 
    99        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]] 
    1111        pen:    none 
    1212        fill:   make function! [] [effect/draw/fill-pen] 
     
    1616                                all [ 
    1717                                        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 
    1921                                        face/color: none 
    2022                                ] 
     
    2325        ] 
    2426        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                ] 
    2633        ] 
    2734        init:   make function! [] [