Rebol Programming/set-style

USAGE:

edit
SET-STYLE name new-face /styles ss 

DESCRIPTION:

edit

Set a style by its name.

SET-STYLE is a function value.

ARGUMENTS

edit
  • name -- (Type: word)
  • new-face -- (Type: object)

REFINEMENTS

edit
  • /styles
    • ss -- Stylesheet (Type: any)

SOURCE CODE

edit
set-style: func [
    "Set a style by its name." 
    name [word!] 
    new-face [object!] 
    /styles ss "Stylesheet" 
    /local here
][
    if none? styles [ss: vid-styles] 
    either here: find ss name [change next here new-face] [repend ss [name new-face]]
]