REBOL Programming/unview

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

UNVIEW /all /only face 

DESCRIPTION:[edit]

Closes window views, except main view.

UNVIEW is a function value.

REFINEMENTS[edit]

  • /all -- Close all views, including main view
  • /only
    • face -- Close a single view (Type: object)

SOURCE CODE[edit]

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
]