REBOL [
    Title:   "Menu-System Demo"
    Name:    'Menu-System-Demo
    File:    %menu-system-demo.r
    
    Version: 0.2.0.1                                                            ;-- Auto download %menu-system.r
    Date:    12-Jun-2005 
    
    Author:  "Christian Ensel"
    Email:   christian.ensel@gmx.de
    
    Owner:   "Christian Ensel"
    Rights:  "Copyright (c)2005 Christian Ensel"                                 
   
    Purpose: "Demostration of features of menu-system.r"

    Comments: "Needs %menu-system.r to run."
        
    Library: [
        level:    'beginner
        platform: 'all
        type: [demo]
        code: 'module
        domain: [user-interface vid gui]
        tested-under: [view 1.3.0.3.1 on "WinXP"]
        support: none
        license: none                                                           ;-- Not bothered with licensing stuff yet, but most likely BSD
        see-also: none
    ]
]

unless request/confirm {The Menu System Demo requires %menu-system.r to be downloaded from REBOL.org^/Click YES to continue, NO to abort.} [
    quit
]

demo:   copy/part form system/script/header/version 5
script: load-thru/check http://www.rebol.org/library/scripts/menu-system.r to tuple! demo

do script

icon-1.img: load 64#{
iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAA
AARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAA
OpgAABdwnLpRPAAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYyLjFiT2tyLwAA
A1pJREFUOE99lN1P23UYxVsuKFEQQrEEmkJDt9HRhJcEFVIoqPECR6lmZkvMLmRN
fF1Ysk3UP4CZGIxyo8ZETbS6xF3MdbhdmL0oUtY1XdkLVpoVMGXCCq2stQrd2o+/
57eAbBJ/yUnO95zznH4vnm+1Wq1Ws9W3trZGPp/XCOQrKChQodPpth6Qos3IZrPc
nD2P/8zznP26ljOfalUIF008yTw4d19JJpMhdOF1zn5ZzMzlJ0klXlNudVSFcNHE
k4xkN5dtFKVWlvjpeBPB0xb+zhwht3qQO6kXySadKoSLJp5kJCsz62UbRb7RPn74
1spk6A1mwr3cCHXzy0UHd2/vUiHnqQkHsRt9X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sMmKB
JzoQCGCg5xUGrNXwWkvh6iyUYMwaOWq2PP3/Xgnz8/Pw+/3wer1wOBwSjFkjl+k+
+gNGzgdGk6oIXwAAAABJRU5ErkJggg==
}

icon-folder.img: load 64#{
iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAA
AARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAA
OpgAABdwnLpRPAAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYyLjFiT2tyLwAA
AZxJREFUOE+tlE8oBGEYxneSlJRSUohEpCRxc3VYF1dXt1mbSEppt63VbBv5E0lG
0pYUKakl0m42tWnZlF2cHJw2olwUt+81z7vZmdndpjnM1HP4vt75zfM+7/eNJEmS
y5EHICfkCIS7MrpJqwN0t9VPqc0+utnopUz2md7eP8mO4wIIECGESder3RSLJ2zB
GKRDVA1klKD4YgddhtvoXGmhs/lmigYb6STQwG6NThmEdsTPGonvlVIVuYTrY389
KUqYHjJPBRiDkIn4CJHIBSm53lNWieUuii2000WolU6DTewM+nfGIAQrXn0MKM6p
7Fr7IPb3pqvZWWFqDHiconxWxTmVrn+TY1wXmawij8ergzAdkZZ59AxCXhb6io1y
3e5EJcnyuA5C/wDlW9NAyMtCuegI1+14K8wgjBigq6XOPEjLy0ovh0Nct+2RzCCc
E4AwEQZpeVkpGxnkOlV2mTPCCI2HDefkaK6ODmZraX+mhqeDYJEJ2oETQNzuYfL5
A3pGGB+uAjYRnl2hHu+VXFo4S93e25bxmjj2G/kDJoZaD/c+jjgAAAAASUVORK5C
YII=
}

icon-file.img: load 64#{
iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAA
AARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAA
OpgAABdwnLpRPAAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIH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BZM1PAAAAABJRU5ErkJggg==
}

edge-round.img: load 64#{
iVBORw0KGgoAAAANSUhEUgAAABoAAABDCAQAAAAowt16AAACNUlEQVR42u3XQUsb
YRDG8d+72cSoEVtKIKEHPUlvHgqlYA/pud76gdp8kIJfwJv35qAghR68eigBsa3Y
QsG0SpLN9pAYN2ptkoIIdW67vP99ZnaG2X1Cqh87NTVvXBuxVFLXWGv0r0OaAZb9
OZowAONzZBlVqUgiiPSEIZDK9cE37DTXmjF9pIKfNyg91htg3obtmvfLKn75WxTM
ONTkZaxmzGgPklQL2+l4OlDSduBIZIJoieWYDKJrdnIoCJNDpHcbmqomt5ReOo1S
uMWa7qF/heKr/U50nWihpCQ/euQqRM6ZU1+damFBUVVRQTqY7yGUZIbklyPf7duz
jeee+qmsbC5z6pJS27FP9mwij1271j3TU5UfhcJw05w59sGWgiAnyOnZMmPRA1Hm
+Rmlji/2bSkMthuRBJsq5i1ljkYXSi1nPiI6X7/ICdhz6uT6PrWc2JXPIH0sb1tL
63qoZMFznZH3RKLjhZLSKJQOoaKn6GWwRIpVsxauV8qrWrGurast0dPR1fbaispI
b+ILpVhR2TMzwz51sG7VI7Mjlcaj37qynkWVzESsKCsrXp6IXGZg51Q9MO+JVyOz
l9w0sIm8yNKVKQ9/hsLgVr+6+8Xyn0HpNJ/PMF16d/qXYMr0bguaqk+x00mhkq4E
kXrTV3NjQYlvjqhHGuPqFM63UCP3rnkQftRiD+V1bkAWRD5rUl/biNEYGI8bXc1h
3w7VbRCz1tg59yvj+KfmwHT93al1h4YLfgMuDa/Ykl2CzQAAAABJRU5ErkJggg==
}

red-image:      to image! layout/tight [box 96x16 edge [size: 1x1 color: red    effect: 'ibevel] effect reduce ['gradient 1x1 white red   ]]
blue-image:     to image! layout/tight [box 96x16 edge [size: 1x1 color: blue   effect: 'ibevel] effect reduce ['gradient 1x1 white blue  ]] 
green-image:    to image! layout/tight [box 96x16 edge [size: 1x1 color: green  effect: 'ibevel] effect reduce ['gradient 1x1 white green ]] 
yellow-image:   to image! layout/tight [box 96x16 edge [size: 1x1 color: yellow effect: 'ibevel] effect reduce ['gradient 1x1 white yellow]] 


menu-data: [
    file: item "File" 
          menu [
              new:     item  "new"  icons [icon-1.img icon-2.img]
              open:    item  "open" icons [icon-2.img icon-3.img]
              recent:  item "open recent"   icon icon-3.img disable 
                       menu [
                           item "Fugu"       icon icon-1.img 
                           item "Starimbiss" icon icon-2.img disable 
                           item "Nexte Lied" icon icon-3.img disable 
                           item "So Blau"    icon icon-1.img disable 
                       ]
                       ---
              save:    item  "save"    icons [icon-3.img icon-1.img]
              save-as: item  "save as" icons [icon-1.img icon-2.img]
                       ---
              close:   item  "close"   icons [icon-2.img icon-3.img]
                       ---
              exit:    item  "exit"    icons [icon-3.img icon-1.img] 
          ]
    edit: item "Edit" 
          menu [
              item "undo" icon icon-3.img
              item "redo" icon icon-1.img
              ---
              item "cut" icon icon-2.img
              item "copy" icon icon-3.img
              item "paste" icon icon-1.img
          ]
    more: item "More" 
          menu [
              a: item "Drive A:" icon icon-2.img 
                 menu [
                     item "Files" icon icon-3.img
                     menu [
                         item "A File" icon icon-2.img
                         item "This is a multi-line^/menu-item, which is^/unuasual but fun." 
                     ]
                 ]
              b: item "Drive B:" icon icon-2.img 
                 menu [
                     item "(no such drive)" disable
                 ]
              c: item "Drive C:" icon icon-2.img 
                 menu [
                     item "I368"     icon icon-3.img 
                     item "SUPPORT"  icon icon-3.img 
                     item "VALUEADD" icon icon-3.img
                     item "WINDOWS"  icon icon-3.img
                 ]
              d: item "Drive D:" icon icon-3.img 
                 menu [
                     item "The Very Best of $MYFAVOURITEARTIST" icon icon-1.img 
                     menu [
                         item "Greatest Song Ever" icon icon-2.img
                         item "Another great song" icon icon-3.img
                     ]
                 ]
              e: item "Drive E:" icon icon-2.img 
                 menu [
                     item <1> "This"       icon icon-1.img radio of 'Teamleitung on
                     ---  
                     item <2> "is"      icon icon-2.img radio of 'A on
                     item <3>  "an"     icon icon-3.img radio of 'A
                     ---
                     item <4>  "example" icon icon-1.img check                         ; oh, check and radio in one group aren't possible yet!
                     item <5>  "of"      icon icon-2.img check ;radio                  
                     ---
                     item <6> "radio"   icon icon-2.img radio of 'B  
                     item <7> "and"     icon icon-3.img radio of 'B
                     item <8> "check"   icon icon-1.img radio of 'C
                     item <9> "items"   icon icon-1.img radio of 'C
                     ---
                     item  "Hold"       icon icon-2.img check
                     item  "SHIFT-Key"  icon icon-3.img check on 
                     item  "down"       icon icon-1.img check 
                     item  "to"         icon icon-2.img check  
                     item  "toggle"     icon icon-3.img check on  
                     item  "multiple"   icon icon-1.img check on
                     item  "items"      icon icon-2.img check 
                     item  "at"         icon icon-3.img check 
                     item  "once"       icon icon-1.img check 
                 ]
          ]
    again: item "Even more" menu [
        undo:    item "undo"   icon icon-1.img
        redo:    item "redo"   icon icon-2.img
        bar
        cut:     item "cut"    icon icon-3.img
        copy:    item "copy"   icon icon-1.img
        paste:   item "paste"  icon icon-2.img
        bar
        red:     item image red-image     check on  of 'Colors
        green:   item image green-image   check off of 'Colors
        blue:    item image blue-image    check on  of 'Colors
        yellow:  item image yellow-image  check off of 'Colors
        bar
        red:     item "red"     body font [colors: reduce [red    black]] colors [none red   ] radio on of 'Colors edge [color: 0.0.0]
        green:   item "green"   body font [colors: reduce [green  black]] colors [none green ] radio    of 'Colors edge [color: 0.0.0]
        blue:    item "blue"    body font [colors: reduce [blue   black]] colors [none blue  ] radio    of 'Colors edge [color: 0.0.0]
        yellow:  item "yellow"  body font [colors: reduce [yellow black]] colors [none yellow] radio    of 'Colors edge [color: 0.0.0]
        bar
        small:   item "small"  body font [size:  9] radio of 'Size 
        normal:  item "normal" body font [size: 11] radio of 'Size on 
        big:     item "big"    body font [size: 14] radio of 'Size 
        huge:    item "huge"   body font [size: 21] radio of 'Size
        bar
        rebol:   item image rebol-logo.img  icon icon-1.img
        bar
        che: item  "When?" body font [style: 'bold] icon icon-3.img menu [
            month: item "Month" icon icon-2.img menu [
                jan: item radio    "Januar"
                feb: item radio    "Februar"
                mär: item radio    "March"
                apr: item radio on "April" font [color: 0.0.255] action [print [item/body/text ", " item/body/text ", der macht, was er will."]] 
                mai: item radio    "May"
                jun: item radio    "June"
                jul: item radio    "July"
                aug: item radio    "August"
                sep: item radio    "September" menu [.: item "Radio items with sub-menus? What's that?"]
                okt: item radio    "October"
                nov: item radio    "November"
                dez: item radio    "December"
            ]
            week:  item "Week" icon icon-1.img
            day:   item "Day"   icon icon-1.img
            bar
            properties: item "Properties" icon icon-2.img
        ]
        ha:  item "When?"        icon icon-1.img menu [
            month: item "month" icon icon-2.img
            week:  item "week" icon icon-1.img
            day:   item "day"   icon icon-3.img
            bar
            properties: item "Properties" icon icon-2.img
        ]
        ---
        delete:  item "delete"           icon icon-1.img
    ]
    about: item "About" menu [
        author: item "Author" icon icon-1.img 
                menu [
                    logo: item image che-logo.img icon icon-2.img
                ]
                ---
        script: item icon icon-2.img {This is my first attempt^/of implementing a full-fledged^/skinnable REBOL menu-system^/which allows for menus looking^/and behaving pretty much like^/native OS menus.}
                ---
        wish:   item "Hope you'll like it!" icon icon-2.img
    ]
] 

cool-menu: layout-menu/style copy menu-data cool-style: [
    menu style edge [color: none size: 13x33 image: edge-round.img effect: [extend 13x33]]
               color 60.60.60
               effect none
               spacing 0x0
    item style font [name: "Trebuchet MS" size: 16 style: 'bold colors: reduce [white black]]
               edge none 
               colors [none silver]
               effects none
               action [print ["Selected item" item/var]]
]

wierd-menu: layout-menu/style copy menu-data wierd-style: [
    menu style edge    [color: none size: 2x2 effect: [merge alphamul 75 colorize pink]]
               effect  [merge alphamul 75 colorize yellow]
               spacing 2x2
               color   none
    item style font    [name: "Comic Sans MS" size: 12 style: 'bold colors: reduce [reblue yellow] shadow: none]
               effects [
                    [merge alphamul 75 colorize orange]                         ; enabled normal 
                    [merge alphamul 75 colorize violet]                         ; enabled hovered 
                    [merge alphamul 75]                                         ; disabled normal
                    [merge alphamul 75]                                         ; disabled hovered
               ]
               edge    [color: none size: 2x2 effect: 'invert]
               colors  none
] 

winxp-menu: layout-menu/style copy menu-data winxp-style: [
    menu style edge [size: 1x1 color: 178.180.191 effect: none]
               color white
               spacing 2x2 
               effect none
    item style font [name: "Tahoma" size: 11 colors: reduce [black black silver silver]]
               colors [none 187.183.199] 
               effects none
               edge [size: 1x1 colors: reduce [none 178.180.191] effects: []]
               action [print item/body/text]
]

mac-menu: layout-menu/style copy menu-data mac-style: [
    menu style edge [size: 1x1 color: black effect: none]
               image mac-backdrop.img
               effect 'tile color none
               spacing 2x2
    item style font [name: "Haettenschweiler" size: 18 style: none colors: reduce [black white]]
               colors none 
               edge none
               effects [none [merge colorize blue] none [merge colorize silver]]
               action [print ["Item" item/var "chosen."]]
]

rebol-menu: layout-menu copy menu-data                                          ;-- unstyled default

menu-from-dir: func [dir [file!] /local entries menu dirs m] [
    entries: try [sort read dir]
    menu: copy [item style action [drop-file/text: item/body/text show drop-file focus drop-file]]
    dirs: make block! []
    foreach entry entries [
        either #"/" = last entry [
            insert tail dirs compose [item (to string! head remove back tail copy entry)]
            if not empty? m: menu-from-dir dir/:entry [
                insert tail dirs reduce ['icon 'icon-folder.img 'menu (m)]
            ]
        ][
            insert tail dirs compose [item (to string! entry) icon icon-file.img]
        ]
    ]
    if empty? dirs [dirs: [item "(empty)" disable]] 
    append menu dirs
]
dir-data: menu-from-dir dirize system/options/home 

slider-menu: layout-menu/style [
    r: slider        icon [icon-3.img icon-2.img] check
       menu [
           item "red"    <255> [set-menu slider-menu 'r [slider/data: 255]] colors [none red] 
           item "maroon" <128> [set-menu slider-menu 'r [slider/data: 128]] colors [none maroon]
           item "black"  <000> [set-menu slider-menu 'r [slider/data:   0]] colors [none black] font [colors: reduce [black white]]
       ]
    g: slider      icon [icon-3.img icon-2.img] check
       menu [
            item "green"  <255> [set-menu slider-menu 'g [slider/data: 255]] colors [none green]
            item "leaf"   <128> [set-menu slider-menu 'g [slider/data: 128]] colors [none leaf]
            item "black"  <000> [set-menu slider-menu 'g [slider/data:   0]] colors [none black] font [colors: reduce [black white]]
       ]
    b: slider       icon [icon-3.img icon-2.img] check disable
       menu [
            item "blue"   <255> [set-menu slider-menu 'b [slider/data: 255]] colors [none blue]
            item "navy"   <128> [set-menu slider-menu 'b [slider/data: 128]] colors [none navy]
            item "black"  <000> [set-menu slider-menu 'b [slider/data:   0]] colors [none black] font [colors: reduce [black white]]
       ]
       ---
    w: slider     icon [icon-3.img icon-2.img] check off
       ---
    h: slider           icon [icon-3.img icon-2.img] check on
    s: slider    icon [icon-3.img icon-2.img] check on
    v: slider         icon [icon-3.img icon-2.img] check on 
       ---
    b: slider  icon [icon-3.img icon-2.img] check on
] winxp-style

slider-menu-text: {slider-menu-data: [
    r: slider        icon [icon-3.img icon-2.img] check
       menu [
           item "red"    <255> [set-menu slider-menu 'r [slider/data: 255]] colors [none red] 
           item "maroon" <128> [set-menu slider-menu 'r [slider/data: 128]] colors [none maroon]
           item "black"  <000> [set-menu slider-menu 'r [slider/data:   0]] colors [none black] font [colors: reduce [black white]]
       ]
    g: slider      icon [icon-3.img icon-2.img] check
       menu [
            item "green"  <255> [set-menu slider-menu 'g [slider/data: 255]] colors [none green]
            item "leaf"   <128> [set-menu slider-menu 'g [slider/data: 128]] colors [none leaf]
            item "black"  <000> [set-menu slider-menu 'g [slider/data:   0]] colors [none black] font [colors: reduce [black white]]
       ]
    b: slider       icon [icon-3.img icon-2.img] check disable
       menu [
            item "blue"   <255> [set-menu slider-menu 'b [slider/data: 255]] colors [none blue]
            item "navy"   <128> [set-menu slider-menu 'b [slider/data: 128]] colors [none navy]
            item "black"  <000> [set-menu slider-menu 'b [slider/data:   0]] colors [none black] font [colors: reduce [black white]]
       ]
       ---
    w: slider     icon [icon-3.img icon-2.img] check off
       ---
    h: slider           icon [icon-3.img icon-2.img] check on
    s: slider    icon [icon-3.img icon-2.img] check on
    v: slider         icon [icon-3.img icon-2.img] check on 
       ---
    b: slider  icon [icon-3.img icon-2.img] check on
] 
slider-menu: layout-menu/style slider-menu-data winxp-style
}

version: rejoin ["Version: " system/script/header/version " " system/script/header/date]

window: center-face layout/size [
    style text text font [name: "Tahoma" size: 11] 
    backcolor white across
    
    at 0x0 sensor 800x600 feel [engage: func [face action event] [if action = 'alt-up [show-menu/offset window menus/context-menu event/offset]]]
    at 600x2 text 190x22 version as-is effect [gradient 1x0 255.255.255 255.128.128]
    at 2x2 app-menu: menu-bar menu menu-data menu-style winxp-style snow 
    at 2x30
    pad 18 text "Above you see the VID-Style MENU-BAR with a WinXP styled menu." gray
    
    across origin 20x60 pad -18
    text "Here are some examples on skinning / styling menus:" underline return
    
    btn "WinXP"           [show-menu/offset window  winxp-menu 0x1 * face/size + face/offset - 1x0]
    btn "Mac"             [show-menu/offset window    mac-menu 0x1 * face/size + face/offset - 1x0]
    btn "REBOL (default)" [show-menu/offset window  rebol-menu 0x1 * face/size + face/offset - 1x0]
    btn "Cool"            [show-menu/offset window   cool-menu 0x1 * face/size + face/offset - 1x0]
    btn "Wierd"           [show-menu/offset window  wierd-menu 0x1 * face/size + face/offset - 1x0]
    btn "Slideshow"       [show-menu/offset window slider-menu 0x1 * face/size + face/offset - 1x0] pad -8
    box 22x22 effect [arrow red rotate 270] pad -14
    text 200x22 "This one is fun!" left middle effect [gradient 1x0 255.0.0 255.255.255] pad -120x2
    btn 100x18 "See the code ..." [view/new/title center-face layout [style text text font [name: "Courier New" size: 11] backdrop white text slider-menu-text as-is] "All in all, not too complicated"]
    return
    text gray {All these menus are created from the same data with different style sheets^/and are bound to the buttons in their action block}
    return
    
    pad -18
    text "Noticed that you can navigate through the menus using the keyboard, too?" underline return
    text as-is gray {Use UP, DOWN, PAGE-UP, PAGE-DOWN, HOME, END an LEFT (ESCAPE, BACKSPACE), RIGHT to navigate, SPACE to toggle checkable or radio items and RETURN or ENTER to select an item.
Hold SHIFT while selecting or toggling to engage multiple items before menu closes.
And since we don't have TMD (rich text support) yet to support selecting items by typing their underlined letter, you instead can select items by typing their first letter. If multiple items start with the same letter, repeatedly entering that jumps between the items.
}   
    return
    
    pad -18
    text "Example of a DROP-MENU VID-style" underline return
    text gray 90 "Select file:" drop-file: drop-menu 320 menu dir-data menu-style winxp-style return
    
    pad -18
    text "Dynamic modification of menus" underline return
    text gray 90 "Item value get:" btn 200 "Query Menu-Bar/About/Wish" [
        use [info] [
            info: layout/tight/offset compose [
                style text text font [name: "Tahoma" size: 11] 
                backcolor white across space 2x2
                image 400x200 ctx-menus/shadow-image effect 'extend
                at 0x0 box white 396x196 black white edge [size: 1x1 color: black 178.180.191 effect: none]
                origin 20x20 below
                text "Querying a menu:" underline
                pad 8
                text ">>  get-menu app-menu 'about/wish 'body/text" gray
                text (join "== " mold get-menu app-menu 'about/wish 'body/text) gray
                at 340x160 btn "okay" [hide-popup/timeout]
            ] 200x200
            info/color:  none
            info/effect: [merge alphamul 128]
            show-popup/window info window 
        ]
    ]
    text gray {get-menu app-menu 3 'body/text}
    return
    text gray 90 "Item value set:" btn 200 "Toggle Menu-Bar/File/Recent" [
        set-menu app-menu 'file/recent [state: not state]    
    ]
    text gray {set-menu app-menu 'file/recent [state: not state]}
    return
    text gray 90 "Item removal:" hide-remove: at remove-btn: btn 200 "Remove Menu-Bar/About/Author" [
        item: remove-menu app-menu 'about/author
        bar:  remove-menu app-menu 'about/1
        show hide-remove hide/show hide-insert show insert-btn 
    ]
    at hide-remove hide-remove: box 200x22 white with [show?: no]
    text gray as-is {item: remove-menu app-menu 'about/author
bar: remove-menu app-menu 'about/1} return

    text gray 90 "Reinserting:" hide-insert: at insert-btn: btn 200 "Insert Menu-Bar/About Author" with [show?: no] [
        insert-menu/head app-menu 'about bar 
        insert-menu/head app-menu 'about item     
        show hide-insert hide/show hide-remove show remove-btn 
    ]
    at hide-insert hide-insert: box 200x22 white 
    text gray as-is {insert-menu/head app-menu 'about bar
insert-menu/head app-menu 'about item} return

    text gray 90 "Fun stuff:"  btn 200 "mess up menus" [
        win:  remove-menu winxp-menu 'about
        reb:  remove-menu rebol-menu 'about
        cool: remove-menu  cool-menu 'about
        wrd:  remove-menu wierd-menu 'about
        mac:  remove-menu   mac-menu 'about
        rnd: random reduce [win reb cool wrd mac]
        insert-menu winxp-menu none rnd/1
        insert-menu rebol-menu none rnd/2
        insert-menu  cool-menu none rnd/3
        insert-menu wierd-menu none rnd/4
        insert-menu   mac-menu none rnd/5   
    ]
    return
    
    text gray 90 "Item creation:" btn 200 "Insert Menu-Bar/About License" [
        insert-menu app-menu 'about layout-menu/style [license: item "License" menu [bsd: item "BSD licensed"]] winxp-style
    ]
    text gray {insert-menu app-menu 'about layout-menu/style [license: item "License" menu [bsd: item "BSD licensed"]] winxp-style}
    at 770x2   btn "X" red font [color: white style: 'bold] [quit]
    at 600x26  text 192 right as-is "close window here " effect [gradient 1x0 255.255.255 128.128.255] black
    at 710x500 image che-logo.img

] 800x600 
window/edge: make face/edge [size: 1x1 color: black style: none]

view/options window [no-title no-border]

unview/all
halt