r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebGUI] A lightweight alternative to VID

shadwolf
4-Mar-2005
[40]
and i hope rebGUI will integrate new widgets that doesn't exist in 
common VID engine so
Anton
4-Mar-2005
[41]
Why would you need to differenciate them ? The same words can be 
interpreted differently by LAYOUT or DISPLAY.
shadwolf
4-Mar-2005
[42]
that's a suggestion nothing more
Anton
4-Mar-2005
[43]
Ok :)
shadwolf
4-Mar-2005
[44]
It's not a commandement ;)
Anton
4-Mar-2005
[45]
Ahh.. getting tired. Got to go sleep. :)
DideC
4-Mar-2005
[46x7]
Ashley!
Reading this page http://www.dobeash.com/it/rebgui/facets/
I see you have put a "?" for edge/image.
You can simply use an image as an edge :
view layout [box edge [size: 10x10 image: logo.gif]]
I remenber reading somewhere (maybe ML) that an edge is a face pretty 
like other face.
I seems to be true:
view layout [box edge [size: 12x12 image: logo.gif effect: [tile 
gradcol 1x1 255.0.0 0.0.2
55]]]
I = It (seems to...)
Another "?" on 'restore word (face/changes). It's simple:
view/options lay: layout [
	box "Bouncing window !!" 300x200 rate 1 feel [
		engage: func [f a e] [
			if a = 'time [lay/changes: 'restore show lay]
		]
	]
	text "Minimize me (if you can ;-)"
] 'resize
Vincent
4-Mar-2005
[53x2]
a 'progress version without sub-face:
progress: make face [
	    effect: copy [draw [pen blue fill-pen blue box 0x0 0x0]]
		data:	0
		font:	none
		para:	none
		feel:   make feel [
		    redraw: func [face act pos] [
		        if act = 'show [
		            face/data: min 1 max 0 face/data

              face/effect/draw/box: to-pair reduce [to-integer face/size/x * face/data 
              face/size/y]
		        ]
		    ]
        ]
    ]
Ashley
4-Mar-2005
[55]
1) Terminology: I'm starting to gravitate towards Window, Face, Attribute, 
Widget and Feel.

2) Widgets: will have simple VID-like names; e.g. button, icon, image, 
bar, progress, etc ... I'm compiling a list of the required base 
widgets and will publish here for discussion when done

3) Facets document: updated 'restore, 'activate and 'edge/image descriptions

4) Vincent's 'progress widget ... exactly what I was after; added 
it to next build

Did I miss anything? ;)
Vincent
4-Mar-2005
[56]
just a detail: in facets document, /span datatype is pair! . you 
could use it to store other data, but if you set a pair! to /span, 
/view will use it as virtual size for face (it still works in later 
betas, so one should be careful to not use it to store coordinates) 
ie:
f: layout [
   banner "Testing /span" guide 
   box 400x400 effect [gradient 1x1 0.0.0 255.255.255] 
   button "Hello!" return 
   text-list data ["just" "a" "list"] 
   image logo.gif logo.gif/size * 2
]

f/span: f/size  ; here we tells /view to use virtual coordinates 
for all subfaces

view/options f 'resize ; will give a fully resizable window (widgets 
included), but it only works for reducing window's size.
Ammon
4-Mar-2005
[57]
That's an interesting effect!
Vincent
4-Mar-2005
[58]
with it, a program designed for a 1024x768 display can work on a 
640x400, or even a 320x200 screen :-) there's a known bug in /view 
betas with alpha channel, the transparency use real coordinates, 
not virtuals.
Ashley
5-Mar-2005
[59x2]
Good diagnosis. I knew assigning a pair! to span did *something*, 
I could never quantify exactly what though. As Ammon said, an interesting 
effect but somewhat useless in an age where screen ratios are all 
over the place and resizing needs to occur both vertically and horizontally.
First stab at a list of required base widgets

	area
	bar
	box
	button
	check
	droplist - text display + drop-down list
	editlist - edit box + drop-down list
	field
	groupbox - encloses a group of gadgets in a titled border
	icon
	image
	list – single column
	listview – multi-column
	progress
	radio
	scrollbar

 spliter – a “spliter window” which affects the width / height and 
 position of other gadgets
	tab -  arranges multiple gadgets into logical groups
	text
	slider
	treeview

 updown – scrollbar minus the bar (used with a field to increment 
 / decrement numbers, etc)
	menu
	popup-menu - context menu
	status – status bar with one or more “segments”
	toolbar


The aim is to have as few widgets as neccessary to build the majority 
of required GUI's. Take a look at the applications you use on a day 
to day basis, what widgets do they use? Are they in the list above? 
How are they named? Are there any widgets in the above list we can 
do without? (not that *someone* won't need it, just that it isn't 
common enough to be part of the base widget set).
Graham
5-Mar-2005
[61x2]
tabbed panels
use them all the time
Gregg
5-Mar-2005
[63]
As long as there is a glossary that let's you translate from familiar 
terms, I think you're OK using REBOL's native terms, though they 
were foreign to me when I started.

Window or dialog?

 Or Screen or Form or Layout. A Dialog is usually something other 
 than the main screen in an app. You sometimes need to use all those 
 terms if you're speaking in the domain of an application, so use 
 wha'ts appropriate in each context. 

Face or graphical object?

 Or Control or Widget. Tough call on this one. I was used to Control 
 from VB, and Face confused me as it could be a layout as well. I 
 like distringuishing between layouts and controls. Hmmm Maybe a hierarchical 
 tree.

Facet, attribute, property or descriptor?

 I like either Attribute or Property. I can live with Facet in REBOL, 
 it's shorter, and it makes sennse if you think in terms like "let's 
 discuss this facet of the business". 

Style, widget or template?
	Style, definitely.
eFishAnt
5-Mar-2005
[64]
Styles (and Stylize) are also a user-friendly way to get massive 
code-reuse, as well as being the widgets... maybe widget-styles (I 
have seen people say VID-styles before) or something like that could 
describe subsets of styles in use...VID is a package of styles...(just 
some outloud thoughts)
Vincent
5-Mar-2005
[65x4]
bug: the last widget in a rebgui layout determine the width of the 
face - if the last widget is narrow, the window is narrow.

fix: in %display.r, you have to keep track of the maximum x value:

- near "xy: origin-size" you can initialize a 'max-width: "max-width: 
origin-size/x"

- in parse loop, just after xy update "xy/x: xy/x + last-face/size/x", 
you can update the 'max-width: "max-width: max max-width xy/x"

- after (outside) the parse, near where the y size is last updated 
"xy/y: xy/y + last-face/size/y", you can set the x size to be the 
'max-width: "xy/x: max-width"
(it fixes the "crash if 'return is the last word in specification" 
bug too)
for widgets, I would add a basic 'anim - it's just too easy to implement 
to miss it (ie. a looping anim widget) :
anim: make face [
	    image:  none
	    rate:   1
		edge:	none
		font:	none
		feel:	make feel [
			engage: func [face act event] [
			    if event/type = 'time [
			        face/image: first face/data

           face/data: either tail? next face/data [head face/data][next face/data]
				    show face
	    		]
 		    ]
		]
	]
DideC
5-Mar-2005
[69]
editlsit = droplist with a read-only mode in the field IMO
shadwolf
5-Mar-2005
[70x2]
for droplist the edit field must have an auto completion according 
to entries in the dropped list
example you have paris, boston, new-york in the list you type "ne" 
it"s completed automatically by "new-york"
DideC
5-Mar-2005
[72]
There is auto-fill on R-forces Rebsite.
Vincent
5-Mar-2005
[73x5]
a 'check with 'text in one face :
check: make face [
    edge: none
    data: false
    para: make para [origin: 14x0]
    effect: copy [draw [
        pen 96.96.96 fill-pen 255.255.255 box 0x0 12x12
        pen none line 0x7 5x12 11x0 line 0x6 6x12 12x0
    ]]
    feel: make feel [
        redraw: func [face act pos][
            if act = 'show [

                face/effect/draw/9: either do face/data [255.0.0][none]
            ]
        ]
        engage: func [face act event][
            if event/type = 'down [
                face/data: not do face/data
                show face
            ]
        ]
    ]
]
usage: 
check [
    text "a label"
    size 100x15
    data true
]
another bug (or more likely unfinished part): the last widget in 
a row determines the height of the row
sorry, didn't fully read the specification - it's the intended behaviour
Ashley
6-Mar-2005
[78]
Latest release, incorporating all the above changes, available at: 
http://www.dobeash.com/files/RebGUI-012.zip

Documentation also significantly expanded to include:

	- Latest REBOL/View facet observations
	- Glossary of terms
	- Licencing section
	- RebGUI Display User's Guide
	- RebGUI Widget Designer's Guide

Get it here: http://www.dobeash.com/it/rebgui/


My intention with RebGUI is to foster a community project that can 
deliver a credible alternative to VID, with my role being one of 
project leader / sponsor. The licence stuff is just to clarify my 
legal position and the rights of contributors and users. I'm looking 
at how to enable co-operative development (using IOS) but this can 
wait until the base design has stabilized. It's just too easy to 
fork efforts at this stage. All of this is still Alpha so if there 
is anything you disagree with (technical, documentation or legal) 
then please raise it here and I'll do my best to accommodate your 
concerns.


I want this whole process to be as open as possible, but without 
the pitfalls of "design by committee" where nothing gets done! ;)
DideC
6-Mar-2005
[79]
http://www.dobeash.com/it/rebgui/facets.html#section-5

May be you can add to the 'effect definition that any effect can 
be used. Not only 'bezel, 'bevel and so on
shadwolf
6-Mar-2005
[80x9]
AShley thantk you verry mutch for you effort ;)
I have monitored  the memory consumtion of test.r script and I have 
seen that every second betwin 4 to 8 ko are allocated maybe there 
is something to do to avoid this
I think it's related with event analyse
Hum after some tests that eratic memory consumtion apears to be related 
with the anim widget ... I put  it in  comment  then I have a stable 
mémory allocation.
othe widget that consums memory is the progresse widget
progress: make face [

  effect: copy [draw [pen blue fill-pen blue box 0x0 0x0]] ; is copy 
  needed?
		data:	0
		font:	none
		para:	none
		feel:   make feel [
			redraw: func [face act pos] [
				if act = 'show [
					face/effect/draw/box: to pair! reduce [

      to integer! face/size/x * face/data: min 1 max 0 face/data face/size/y
					]
				recycle
				]
			]
		]
	]
this provoque the memory usage stabilisation it will block to the 
needed
after the draw we '"clear" the memory using recycle
same for anim adding to the feel a recycle call after the show face 
will stabilize the memory usage
Anton
6-Mar-2005
[89]
COPY is not needed, though it does not hurt.