Jump to content

Rebol Programming/show-popup

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
SHOW-POPUP face /window window-face /away 

DESCRIPTION:

[edit | edit source]

(undocumented)

SHOW-POPUP is a function value.

ARGUMENTS

[edit | edit source]
  • face -- (Type: object)

REFINEMENTS

[edit | edit source]
  • /window
    • window-face -- (Type: object)
  • /away

SOURCE CODE

[edit | edit source]
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
]