Rebol Programming/viewtop

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

USAGE:[edit | edit source]

VIEWTOP url /only 

DESCRIPTION:[edit | edit source]

Display the REBOL viewtop

VIEWTOP is a function value.

ARGUMENTS[edit | edit source]

  • url -- (Type: url file any-type)

REFINEMENTS[edit | edit source]

  • /only -- Only if prefs/desktop option says so

SOURCE CODE[edit | edit source]

viewtop: func [
    "Display the REBOL viewtop" 
    url [url! file! any-type!] 
    /only "Only if prefs/desktop option says so"
    if all [only not user-prefs/desktop] [exit] 
    system/options/quiet: true 
    if block? ctx-viewtop [
        ctx-viewtop: context ctx-viewtop 
        bind dtw-keymap ctx-viewtop
    if value? 'url [ctx-viewtop/show-folder :url]