[ALLY] Re: Layout Bind or Context in stylized Layouts
From: jeff:rebol at: 13-Nov-2000 15:36
Thanks, folks, for your kind words of encouragement. I
really enjoy trying to spread to REBOL knowledge when I can
(and I'm very much still learning all the time myself!)
> Petr asked:
>
> While you are at it - what is the purpose of 'facets and
> 'multi fields and their content?
Not sure what you mean. A facet is just a field of a face
object, like if we have:
face: make face [size: 2x2]
SIZE is a facet of the face. Other face facets are EDGE,
PARA, FONT, FEEL, RATE, etc.. I'm not clear what you mean
by "'multi fields and their content".
> Also - what's the difference between using 'with and custom
> word? (e.g. difference in setting edge's size using 'with
> and 'edge) (see my email to general ml today)
Well, WITH is a "custom word", or what is referred to in VID
as a "FACET word" (even though WITH really isn't typically a
facet of a face WITH lets you manually set various other
facets in the face when using a VID style). Below are all
the current facet words that can be found after a vid style
in a layout:
edge font para feel effect effects keycode rate colors
texts help user-data with bold italic underline left
center right top middle bottom plain of font-size
font-name font-color wrap no-wrap as-is shadow frame bevel
ibevel
I can't explain all of them at this point, but most of them
are pretty self explanatory. Let's get all crazy and use
most every facet word for a single style:
view layout [
image http://www.rebol.com/view/docs/vid-6.jpg
edge [size: 10x10 effect: [blur nub] color: 255.255.255]
font [name: "courier"] para [origin: 5x15]
feel [engage: func [face action event][
face/effect: compose [crop fit colorize (
either action = 'down [
[255.0.0 cross 255.255.255]][[0.255.0 blur]]
)
]
show face
]
] effect [colorize 0.255.0] keycode #"q" [unview/all] bold
italic left center bottom font-size 32 font-color yellow
shadow ibevel wrap "Aaaaaaahhhh!!"
]
Neato. :-) At this point we're almost programming directly at
the "face level", but in a terser, less verbose, smaller kind
of way, if you see what I mean? Using WITH, on the other
hand, is like doing IN-LINE FACE PROGRAMMING right in your
layouts for extra tight tweaking (sorta like doing in-line
assembler! (-:). VID is really a slick short hand for
programming faces.
Cheers!
-jeff