Rebol Programming/unview

From Wikibooks, open books for an open world
Jump to navigation Jump to search

USAGE:[edit | edit source]

UNVIEW /all /only face 

DESCRIPTION:[edit | edit source]

Closes window views, except main view.

UNVIEW is a function value.

REFINEMENTS[edit | edit source]

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

SOURCE CODE[edit | edit source]

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
]