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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Louis
3-Mar-2005
[13x2]
Definitions of widget on the Web:


    A standardized on-screen representation of a control that may be 
    manipulated by the user. Scroll bars, buttons, and text boxes are 
    all examples of widgets.
    www.redhat.com/docs/glossary/


    A set of clickable, graphical element in a user interface. This includes 
    buttons, radios, checkboxes, and scroll bars. Widgets vary in appearance 
    and dimension from platform to platform.
    www.gerbilbox.com/newzilla/glossary.php


    n. 1. A meta-thing. Used to stand for a real object in didactic examples 
    (especially database tutorials). Legend has it that the original 
    widgets were holders for buggy whips. "But suppose the parts list 
    for a widget has 52 entries...." 2. [poss. evoking `window gadget'] 
    A user interface object in {X} graphical user interfaces.

    www.worldwideschool.org/library/books/tech/computers/TheHackersDictionaryofComputerJargon/chap55.html


    (n.) In a window system, a reusable user interface component such 
    as a button, scrollbar, control area, text edit area, and so on. 
    When an X Toolkit Intrinsics function creates a widget, it is returned 
    as an opaque data handle and assigned to a variable called a widget 
    identifier. See also OLIT.
    docs.sun.com/db/doc/805-4368/6j450e610


    – A graphical user interface programming object (button, scrollbar, 
    radio button, etc.) for the X Window System. (Also, see X Window 
    System.)
    www.newtolinux.org.uk/glossary.shtml
Ashley, widget is a good term as long as you explain what one is. 
 :>)
shadwolf
3-Mar-2005
[15]
quick explaination widgets contraction of windows gadgets that designates 
all on screen interface
Ammon
3-Mar-2005
[16x2]
Window, Face, Facet, Style...
...With the definition of each of them somewhere near the top of 
the document or easily accessible.
Graham
3-Mar-2005
[18]
window - graphical object - descriptor - template
Ammon
3-Mar-2005
[19]
IMHO you have a tendancy to confuse a user if switch lingo in the 
middle of something so you might as well begin with the lingo that 
you want to use for the entirety of your docs and provide definitions...
Graham
3-Mar-2005
[20]
alternative view point - some of us are infrequent view users, and 
the extra jargon we have to remember just makes things difficult
Louis
3-Mar-2005
[21]
...With the definition of each of them somewhere near the top of 
the document or easily accessible.


Yes, please give a clear defination and example for every term.  
Do not asume that anyone already knows the meaning of a term.  The 
fact that a term can have different meaning in rebol can cause a 
lot of confusion sometimes.  For example from the Core manual, "The 
copy word as used in parse is different from the copy function used 
in REBOL expressions. Parse uses a dialect of REBOL, and copy has 
a different meaning within that dialect."
Ammon
3-Mar-2005
[22]
Ashley, what is the point of only using positional references to 
sub-faces?  The whole reason that I started creating my styles was 
because I found the positional references of VID to be too restricting 
and difficult to deal with. IMHO, just making subfaces a facet of 
the style face increases the usability of VID at least 10 fold.
Ashley
3-Mar-2005
[23x2]
Louis, agree totally. Witness the confusion between Anton and myself 
in the View group about what a facet is (and throw into the mix View 
facets, VID facets and Style facets). I also don't like the close 
visual and phonetic similarity between face and facet ... it's just 
too easy to mistype / misread (with a single "t" to distinguish the 
two). Another term to consider:

	Feel, behaviour, action or event handler?


The very first section of the document will be a concepts / terminology 
section which will have a simple table that maps View terms / concepts 
to their RebGUI equivilents. Thereafter the RebGUI terms will be 
*consistently* used.
Ammon, positional references should only be the concern of the widget 
designer (ie. its not a user-code level concern). If a complex widget 
needs additional facets to control its appearance and behaviour then 
I'm all for it. Once we get a widget or two under our belts, we can 
write a "Widget Designer's Guide" to at least have common accessors. 
(there's another term we need to nail down).
Ammon
3-Mar-2005
[25]
Yeah, the accessors...  Not sure I really got the complete concept 
of accessors.  IMHO, it is just extra work and the developer not 
the end user who puts the widget in an application generally has 
to build those unless the end user starts digging deeply into the 
style.  This IMHO, is a MAJOR problem.  If you make the sub-faces 
a facet of the style then the end user can always access the sub-faces 
of the style and do as they like with them AND DO IT EASILY.  And 
the developer gets the benefit of not having to guess at all the 
ways that the end user may want to access the sub-faces!  That in 
and of itself is a goldmine, to me.
Vincent
3-Mar-2005
[26]
Ashley: just one little fix to make it work with /View 1.2.1:

(in display.r, line 99, word -> :word) if :word [set :word last-face]
else, 'if is confused (can't find then-block)
Ashley
3-Mar-2005
[27]
Done.
Robert
4-Mar-2005
[28]
Terms: I'm all for using "standard" terms. I must say that View always 
forces me to map the words and rethink them. I would like to see:
	Window
	Canvas instead of face

 Attribute instead of facet (please keep non-native speakers in mind)
	Action instread of feel
	Widget instead of style

For me a Widget can have different styles: Windows, Mac etc.
Anton
4-Mar-2005
[29x2]
I have almost forgotten all those old words. :)
I suggest to stick with official, rebol-documented terminology. It's 
more accurate, then, as it's definitely in the rebol domain.
Robert
4-Mar-2005
[31]
Yes, but it makes switching to Rebol really hard. I still get confused. 
It's the same with Maxims Steel! stuff. The words just don't help 
me to undestand what it's about. It's contra-productive. Even if 
wording might not be perfect it's known and people willl know for 
about 80% what it's talked about.
Anton
4-Mar-2005
[32x2]
The more standard the terminology used, the more "standard" expectations 
people will have. I think the rebol way is quite different to other 
languages, so it shouldn't restrict its language (and thus ideas) 
to other standards.
Well, you can see it both ways. And I don't think this argument is 
winnable by either side.
shadwolf
4-Mar-2005
[34x3]
in C widget libraries the names are quite the same but with a prefix
gtk_button, QButton, wx_button, etc ... why not retake the comon 
denomination adding rg_ suffixe to them ?
like rg_button, rg_field, rg_image, rg_check, rg_radio, rg_menubar, 
rg_statusbar, rg_table, rg_scoller, rg_slider etc...
Anton
4-Mar-2005
[37x2]
Yuck.
That's not why I came to rebol, to repeat myself endlessly.
shadwolf
4-Mar-2005
[39x2]
but if we clone the VID widgets naming how to diferenciate the both 
engines ?
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