跳转到内容

Rebol 编程/show-popup

来自维基教科书,开放的书籍,开放的世界
SHOW-POPUP face /window window-face /away 

(未记录)

SHOW-POPUP 是一个函数值。

  • face -- (类型:对象)
  • /window
    • window-face -- (类型:对象)
  • /away

源代码

[编辑 | 编辑源代码]
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
]
华夏公益教科书