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

[REBOL] Re: How to use system/*

From: brett::codeconscious::com at: 28-Dec-2001 8:00

Hi Jason,
> write %vid-dump.r read system/view/vid/vid-styles > > ok.. > ..impressive: Can anyone please suggest ways to approach this?
Well here's a leg up. system/view/vid/vid-styles appears to me to be the master stylesheet where BOX, FIELD, AREA, etc live. It is a block of pairs, each pair being the style name and the style definition as an object. This style definition is a smart template for making VID faces. Stylesheets can be created with the STYLIZE function. You can see all the styles listed in derivation order in my vid-ancestry.r program which also makes an attempt at showing the full definition of the style as it might have been given to STYLIZE. Most of the styles use a feel object. For the master stylesheet styles (vid-styles), most of these feel objects live under system/view/vid/vid-feel. If you right-click on a style in vid-ancestry.r you are presented with the feel object of the style, if the program can it will identify which feel object it is. In my mind I have this picture of the life and times of a style: (A) The style definition (a block of VID dialect) (B) The style object created from the definition (A) and stored in a stylesheet by STYLIZE (C) A face made from the style (B) by execution of LAYOUT. Something to note is that the styles contain fields that are relevant only at different times in the style's "lifecycle". In (B) the style object, there is a field FACETS which contains most of the definition from (A). There are also fields here named WORDS and INIT which are used by LAYOUT. Finally at (C) things like COLOR, TEXT etc are relevant. At some point you should read through the source of LAYOUT the function that ultimately makes use of all these styles. And you can have a read through my vid-notes.r program which is in bad need of rewrite, has some misstatements, but does have some clues. It has a big weakness in that it has not distinguised between (A), (B) and (C) much at all. Both of my programs can be found in the docs folder of my rebsite "Code C." Brett.