REBOL Programming/scroll-face

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

USAGE:[edit]

SCROLL-FACE face offset /x /y /no-show 

DESCRIPTION:[edit]

Scroll a face. Default is vertical.

SCROLL-FACE is a function value.

ARGUMENTS[edit]

  • face -- (Type: any)
  • offset -- (Type: number)

REFINEMENTS[edit]

  • /x -- Scroll in width direction
  • /y -- Scroll in height direction
  • /no-show -- Do not show change yet

SOURCE CODE[edit]

scroll-face: func [
    "Scroll a face. Default is vertical." 
    face 
    offset [number!] 
    /x "Scroll in width direction" 
    /y "Scroll in height direction" 
    /no-show "Do not show change yet" 
    /local access
][
    if all [
        access: get in face 'access 
        in access 'scroll-face*
    ] [
        access/scroll-face* face offset x y
    ] 
    if not no-show [show face] 
    face
]