Manuel PortaNum

tests on R3 GUI

        mis à jour le 17-Mar-2011

index

An experimentation on r3-gui
Want to try right now?
instructions
Warnings
still in alpha !
contributions welcome
Windows only
other guis will appear
Which versions ?
GUI test and demo revisited
GUI guide revisited
Download versions
Where to find the original gui and demo ?
version 0.5.0, updated march, 17th , new tests: drawing, clock, scroller, windows, text-list (simple system browser)

An experimentation on r3-gui

After trying for a long time to get information on the status of availability of the gui(s) for Rebol3, I decided to make my own opinion, "experimentally". This document's purpose is to share this experience, and maybe convince other rebolers that time has come to write r3 graphic applications.

The r3 gui from Rebol (gui.r) is no more compatible with the recent versions of r3. The compatibility ceased after the a94. Then the examples on the reference page on the r3 gui were no more applicable, and the demo.r, a test and demo software written by Carl to illustrate the functionalities of the gui, did not work either.

At that time, RM Assets decided to develop it's own version, based on the Carl's gui, and improved on several points (i.e. resizing, skins using materials ..., styles for professional uses, like database-oriented tables, tab-boxes ...). But until recently, the compatibility was not evident, and, at least, not described.

This time is over, now, and the r3-gui from RMA is widely compatible with recent versions of Rebol3 (from a111).

According to the info collected in several points, I revisited the GUI guide, and the demo software, to check their operability, and the result is very promising.

I thank Pekr for his contributions to this work.

Try and enjoy,

Jocko

Want to try right now?

Yes, but don't forget to read below, afterwards.

instructions

  • Download the zip test-gui-RMA.zip. Unzip it in a directory.
  • drag the test-demo.r3 file on the r3.exe file. That's all.
  • drag the guideExamples.r3 file on the r3.exe file. That's all.

Alternatively, you can launch r3.exe and type do %guideExamples.r3 in the console.

download test-gui-RMA.zip

This is one of the screens obtained from test-demo.r3 :

Warnings

still in alpha !

Let's say once again that Rebol 3 as well as RMA's r3-gui.r3 are still in alpha stage, and many evolutions can still occur. Also many things may be not representative of the final product, for instance the default skins of the styles. It's recommended to chack periodically the news on both projects.

contributions welcome

I did this work independently, and I may have misunderstood some information, or some way of using styles, objects, functions. Please, Rebol or RMA, feel free to send me remarks, or additional information in case it could help to understand, correct or better illustrate these examples.

Windows only

I did this work for Windows, as I know too bad the world of linux. These demos should also work on linux provided someone does the compilation work for linux, and the r3dll.so is available for a111+.

other guis will appear

This gui is not the only one possible. But to my knowledge, no other has been publicly released so far.

Which versions ?

In the zip above, all the necessary files are included. The following is only if you want to investigate further, or to update r3 or r3-gui.r3

The diffused version of a111 is not compatible with view functions. I had to recompile it under Code::Blocks, from the official r3-host-kit source. I only added the line :

// modif JC
#define TO_WIN32

in the reb-config.h file

You can upload this modified version, including also the make-cpb file r3.cbp to make the solution.

downloads/r3-host-kit-a111-cbp.zip

The RMA r3-gui.r3 file should be downloaded from here, in order to be sure to have the latest version.

http://www.rm-asset.com/code/downloads/

GUI test and demo revisited

Will come soon : waiting for the next release from RMA

here is an example of what you should obtain when selecting one of the tests from the text-list to the left.

Try the different tests. Here is one of the screens

GUI guide revisited

replace load-gui by

do %r3-gui.r3

The simple "Hello world" works as previously

view [
   title "Hello World"
   button "Close" close
]

The simple form example is almost ok. Just replace panel by hpanel

view [
   title "Simple Form"
   hpanel 2 [
       label "Name:"
       field
       label "Message:"
       area
   ]
   button "Cancel" close
]

Same here, replace panel by hpanel, group by hgroup

view [
   title "Simple Form"
   hpanel 2 [
       label "Name:"
       name: field
       label "Message:"
       message: area
   ]
   hgroup [
       button "Submit" submit http://www.rebol.com/cgi-bin/gui-form.r
       button "Help" browse http://www.rebol.com/r3/docs/gui/gui.html
       button "Close" close
   ]
]

Here also, replace panel by hpanel, group by hgroup

view [
   title "Opinion Survey"
   text "Do you want programs to be easy to build?"
   hpanel 2 [
       label "Answer:"
       hgroup [
           radio "Agree"
           radio "Disagree"
           radio "Not sure"
       ]
       pad
       check "I'm a programmer."
       pad
       check "I am also a REBOL expert."
       label "Name:"
       field
       label "Comment:"
       area
       pad ; temporary, for bug
   ]
   hgroup [
       button "Submit" submit http://www.rebol.net/cgi/submit.r
       button "Reset" reset
       button "Cancel" close
   ]
]

The most complex example is easily adapted also :

Here, we use vpanel in two cases, where the elements are aligned vertically.

The 'delta parameter here is not yet operational

view [
   title "Progress, Scrollers, and Sliders"
   text "These will change:"
   vpanel [
       prog: progress
       sbar: scroller attach 'prog 
   ]
   text "Change the above, variable amounts:"
   vpanel 80.200.180.80 [
       slider attach 'sbar
       scroller attach 'sbar
   ]
   text "Change the above, predefined amounts:"
   hpanel 3 [
       button "Set 0%" set 'sbar 0%
       button "Set 10%" set 'sbar 10%
       button "Set 50%" set 'sbar 50%
       button "Set 90%" set 'sbar 90%
       button "Set 100%" set 'sbar 100%
       button "Set 150%" set 'sbar 150%
   ]
   text "How wide to make them (their deltas):"
   hpanel 3 200.100.80.80 [
       radio "Delta 10%" on set 'sbar 'delta 10%
       radio "Delta 50%" set 'sbar 'delta 50%
       radio "Delta 100%" set 'sbar 'delta 100%
   ]
]

Download versions

Present version is test-demo 0.5.0, for r3-gui v 1993. New tests added

download test-demo

Previous version : test-demo 0.4.0, for r3-gui v 1993

download test-demo-0.4

Where to find the original gui and demo ?

Here, you will find an r3_a94 and the compatible gui.r, the GUI guide examples, and the original demo.r

downloads/test-gui-REBOL.zip

Valid HTML 4.01 Transitional

copyright J.Colineau - 17-Mar-2011