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

PREZ dialect

 [1/8] from: etienne::alaurent::free::fr at: 5-Jun-2001 0:28


Hello all, I saw in a french programming magazine (it name is LOGIN:), in an article introducing REBOL, that there is a dialect allowing the conception of graphical presentations. The name of this dialect is PREZ. Is it true ? I would like to know more about this dialect. Anyone can help me ? Cheers, --- Etienne

 [2/8] from: jchapdelaine:datachest at: 5-Jun-2001 15:39


is there a web site address for this magazine ? I am interested too... Jeannot Chapdelaine

 [3/8] from: etienne:alaurent:free at: 6-Jun-2001 0:28


Le mar, 05 jun 2001, vous avez écrit :
>is there a web site address for this magazine ? I am interested too...
The site address is www.loginmag.com Ciao --- Etienne

 [4/8] from: allen:aussieweb:au at: 6-Jun-2001 9:26


Prez is a dialect by Jeff. [jeff--rebol--com] There is also a presenter script by Carl. [carl--rebol--com] with a demo presentation for comdex. I am not sure if either of those scripts have been updated for the current version of View. Drop a line to the authors if they don't respond to the thread. Cheers, Allen K

 [5/8] from: jeff:rebol at: 6-Jun-2001 9:14


Thanks for the reminder, Allen.. The Prez dialect is up on my reb page: http://www.cs.unm.edu/~whip/index.r There is a simple test script that the viewer will fetch from my site as well. I don't have it doc'd really, but below is the test example, with a little explaination: First the main function PRESENT expects to receive a block, sort of like LAYOUT. At the beginning of the block you can define some preset effects. These effects can be based on the built in effects with overrides for your needs (sort of like stylize). So for example, we have a slow-fade-red, below, which is a fade that starts immediately (0:0:0) and fades to red in 0:0:10 seconds. GO is an effect which says to move to an absolute place. GROW is an effect which affects the element's size, positive or negative (shrinking). (there's also an effect MOVE which will just move some item in a given direction, usually given a small pair, like 1x1, move up 1 over 1 etc..) Each new preset can be built out of a number of different builtin effects. ;-- Test-prez.r ------------------------------------------------------ effects [ slow-fade-red fade [start: 0:0:0 fade-to: red duration: 0:0:10] go-c-slow go [xy: 250x250 duration: :0:5] go-c-fast go [xy: 250x250 duration: :0:1] go-c-med-fade go [xy: 250x250 duration: :0:3] fade [ start: :0:1 fade-to: green duration: :0:3 ] slow-grow-fade grow [start: :0:1 xy: 150x150 duration: :0:10 ] fade [ start: :0:1 fade-to: 10.20.200 duration: :0:10 ] slow-shrink grow [start :0:1 xy: 5x5 duration: :0:10] ] size 500x500 [ backdrop 200.150.130 h1 "Testing presentation engine" across button "8" :0:0 slow-grow-fade tab button "9" :0:0 slow-shrink below txt "1" :0:0 go-c-slow txt "2" :0:1 go-c-fast h1 "3" :0:2 go-c-med-fade at 480x400 guide h1 "4" :0:0 go-c-fast h2 "5" :0:1 go-c-slow h3 "6" :0:2 go-c-med-fade ] ;------------------------------------------------------------------ Okay, so the actual presentation portion has the required format of size pair! [prez-block]. The size must be set because the things may be flying all over the place and there'll be no way to figure out the bounds of the presentation. So then the presentation block is a lot like a layout. You can specify any number of styles and then provide effects that apply to the preceding style. Above we are using presents, but they are shorthand for the more generic approach where you place the effect info right after the affect. This is the format: style appear-time [effect-block] For example: button "Hello" 0:0:1 [ fade :0:0 green :0:02 fade :0:2 yellow :0:04 fade :0:4 black :0:06 ] The button, specified above, will appear 1 second after the presentation begins (the first time after "Hello"). It will immediately fade to green taking 2 seconds to complete (specified by the first line). At 2 seconds after the button's effects have started (right after the green fade completed) the button will fade to yellow for 2 seconds-- finally, 4 seconds after the effects have begun, the button fades to black in 2 seconds. Green yellow and black fade, like some crazy rasta man stuff, a'rite! A preset works basically by replacing that big block with the effects block that it represents. This is handy if you are applying the same effect repeatedly to a number of elements. You can, of course, use any VID style, including images -- but there are some odd bugs with some of VID that may appear. Images don't have a proper fading ability, just fade to a color-- not fade to transparent.. The way the system works is it basically takes the presentation, runs through and makes absolute time calculations for everything in the presentation. Then there's a central player loop that says "hmm, is there anything that needs to appear now? yes-- appear and start your effects... hmm are there any effects that need updating? Yes.. go update yourselves.." etc.. The code might seem a little hairy if you look at it, but do feel free to modify and/or improve it!! :-) -jeff

 [6/8] from: etienne:alaurent:free at: 7-Jun-2001 0:57


Hi, Jeff, Your Prez dialect is very, very, very cool :-)) I was waiting for this kind of things :-; What are the conditions (free or not ? any restriction ?) to use it in an app ? Cheers --- Etienne

 [7/8] from: jeff:rebol at: 6-Jun-2001 23:22


Howdy, Etienne: Thanks for the compliment. The Prez dialect code is public domain. It is "AS IS" and comes with no warranty or guarantees. The Prez dialect should not be used to operate nuclear power facilities, air traffic control systems, etc.. If you make improvements, please consider sharing them-- especially if you operate a nuclear power facility with it! I also remembered there's another effect in the Prez dialect (I think in the one posted) which allows you to incrementally add effects to a vid element-- this is pretty fun because you can use the DRAW dialect and create animated drawing pretty easily. I'll go verify that when I get the chance -- -jeff

 [8/8] from: gjones05:mail:orion at: 7-Jun-2001 5:21


From: "Jeff Kreis"
> The Prez dialect code is public domain. It is "AS IS" and > comes with no warranty or guarantees. The Prez dialect should > not be used to operate nuclear power facilities, air traffic > control systems, etc..
Oh, good, so I don't have to trash my new Space Station Command and Control module! ;-)
> If you make improvements, please > consider sharing them-- especially if you operate a nuclear > power facility with it!
Homer Simpson: "Doh!" --Scott Jones