跳轉到內容

Rebol 程式設計/unview

來自華夏公益教科書,開放的書籍,為開放的世界
UNVIEW /all /only face 

關閉視窗檢視,除了主檢視。

UNVIEW 是一個函式值。

  • /all -- 關閉所有檢視,包括主檢視
  • /only
    • face -- 關閉單個檢視(型別:物件)

原始碼

[編輯 | 編輯原始碼]
unview: func [
    "Closes window views, except main view." 
    /all "Close all views, including main view" 
    /only face [object!] "Close a single view" 
    /local pane
][
    pane: head system/view/screen-face/pane 
    either only [remove find pane face] [
        either all [clear pane] [remove back tail pane]
    ] 
    show system/view/screen-face
]
華夏公益教科書