Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Where to find "Style Chapter"?

From: anton::wilddsl::net::au at: 12-May-2007 16:14

I don't remember the "Style Chapter", but here is how to list all the available VID styles: print mold extract system/view/vid/vid-styles 2 And you can see a style's entire definition like this: print mold svv/vid-styles/button print mold svv/vid-styles/field ; etc.. Getting into your editor can be done like this: write clipboard:// mold svv/vid-styles/button then paste into a new document in your editor. (I use Crimson Editor on Windows, for which there is a rebol syntax highlighter available.) This gives you a chance to read exactly how the style works, and an insight into how to modify it to do what you want. I do the above steps very frequently when creating new styles, as I want to see if there is a built-in style which does close to what I want to derive from. Every style can be modified with "facets" (face attributes), which can be mentioned after a style name in a LAYOUT spec. These words can be seen here: print mold remove-each item copy svv/facet-words [function? :item] So the above words can be applied to all the styles, but some styles also have a few style-specific dialect words. Here are the styles with specific dialect words: foreach [style face] svv/vid-styles [if face/words [print [style remove-each item copy face/words [function? :item]]]] To see if the dialect expects any arguments, we do the same except we don't remove the functions: foreach [style face] svv/vid-styles [if face/words [print [style mold face/words]]] Hope that helps, if you have any more specific questions at all about how to do something, this is the place to ask. Regards, Anton.