REBOL Programming/show-popup

USAGE:Edit

SHOW-POPUP face /window window-face /away 

DESCRIPTION:Edit

(undocumented)

SHOW-POPUP is a function value.

ARGUMENTSEdit

  • face -- (Type: object)

REFINEMENTSEdit

  • /window
    • window-face -- (Type: object)
  • /away

SOURCE CODEEdit

show-popup: func [face [object!] /window window-face [object!] /away /local no-btn feelname][
    if find pop-list face [exit] 
    window: either window [feelname: copy "popface-feel-win" window-face] [
        feelname: copy "popface-feel" 
        if none? face/options [face/options: copy []] 
        if not find face/options 'parent [
            repend face/options ['parent none]
        ] 
        system/view/screen-face
    ] 
    if any [face/feel = system/words/face/feel face/feel = window-feel] [
        no-btn: false 
        if block? get in face 'pane [
            no-btn: foreach item face/pane [if get in item 'action [break/return false] true]
        ] 
        if away [append feelname "-away"] 
        if no-btn [append feelname "-nobtn"] 
        face/feel: get bind to word! feelname 'popface-feel
    ] 
    insert tail pop-list pop-face: face 
    append window/pane face 
    show window
]
Last modified on 13 November 2012, at 10:49