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

World: r3wp

[!REBOL3-OLD1]

Graham
15-Feb-2009
[11465]
BrianH, how does R3 styles work?  I didn't notice it on the R3_Gui 
page
BrianH
15-Feb-2009
[11466x2]
Remember, the layout won't have style code in it.
(sorry, your message hadn't come through yet)
Graham
15-Feb-2009
[11468]
R3 styles?
BrianH
15-Feb-2009
[11469]
(sorry, I was busy). Imagine if you took the structure/appearance 
separation of HTML/CSS to the extreme, and had *no* appearance code 
in your layouts, just behavior and structure. Put all appearance 
code in the styles. That's the R3 GUI. Oh, and the styles will be 
themable too.
Graham
15-Feb-2009
[11470x2]
got an example?
the one I took from the wiki has the behavior code attached to the 
structural elements
BrianH
15-Feb-2009
[11472x2]
Not really, ask Henrik. I'm a Core guy.
Behavior and structure are together in the layout, yes, but in a 
way that is easily seperable. And that doesn't matter because the 
layout won't have appearance code in it.
Graham
15-Feb-2009
[11474x2]
Can we style behaviours as we can structure?
( I keep switching between UK and US spellings ... )
BrianH
15-Feb-2009
[11476x4]
I don't get the question. You can seperate the actual implementation 
of behavior from the layout easily. You can't style structure.
You style styles (what other GUI systems call controls).
The panel system let's you swap in different pages if you have more 
complex apps - see the demo code.
It will be much easier to build 300-screen apps. :)
Henrik
15-Feb-2009
[11480x2]
I can provide an example:

view [
	panel [
		error-text "Something went bad"
	]
	group [ok-button cancel-button]
]

There's no appearance code in this layout.
You can do the same in VID for R2.
BrianH
15-Feb-2009
[11482]
But it's *much* harder :(
Henrik
15-Feb-2009
[11483]
Well, I've done that in my own VID extension kit (which I'm still 
contemplating whether I will release some day): Provide more styles 
with very specific purposes. This strongly reduces the need to be 
specific many times all over a layout and the layout becomes much 
smaller and cleaner. Also avoiding stylize inside the layout helps.
Graham
15-Feb-2009
[11484]
we have close buttons, and ok buttons etc.  Can we define them on 
the fly for the scope of the window?
Henrik
15-Feb-2009
[11485]
again this also comes from the concept of styles that are described 
by purpose rather than appearance, so you don't want a red or blue 
button, but an ok or close button.
Graham
15-Feb-2009
[11486]
and if you want both?
Henrik
15-Feb-2009
[11487]
VID3.4 will allow that.
Graham
15-Feb-2009
[11488x2]
What's the code name now for R3's gUi?
was it ever decided upon?
Henrik
15-Feb-2009
[11490x2]
You can define the button actions as you please. If you look at this 
shot:

http://rebol.hmkdesign.dk/files/r3/gui/180.png

The 5 colored buttons are separate styles, based on BUTTON.
I just call it VID3.4.
BrianH
15-Feb-2009
[11492]
No decision yet. I call it R3 GUI.
Henrik
15-Feb-2009
[11493x2]
Note that I was against users setting colors. This makes it much 
harder to build good styles.
It's so tempting to set colors and styles directly in the layout, 
because it's quick to prototype with, like in R2 VID, but once your 
layouts grow, you really want to get rid of those appearance decisions.
BrianH
15-Feb-2009
[11495]
Yeah, it is much better to set names of semantic attributes that 
have associated colors in the theme, then let the theme pick the 
actual color that fits with the rest.
Graham
15-Feb-2009
[11496x2]
Well, I change button colours all the time trying to direcct users 
on which path to take.
So I have a white "save" button .. but once they edit something, 
the button changes to green.
Henrik
15-Feb-2009
[11498]
that could easily be part of a style
BrianH
15-Feb-2009
[11499]
Ah, but those colors have meaning within your apps. Change the attribute 
for that meaning, then let the style pick the color.
Henrik
15-Feb-2009
[11500]
you could describe in your layout code that it's a SAVE-BUTTON style 
and nothing else. then in your style code, you add logic to change 
the color depending on the state of your user's need to save content.
Reichart
15-Feb-2009
[11501x2]
Graham, sort of like in browsers where links you have been to are 
a diff colour?
What about colour blind people?
Might be interesting to build a little check box into buttons you 
have already pressed and completed (or something).
Graham
15-Feb-2009
[11503x2]
color blind males ... red/green ... life is tough for them
will we get sued for not providing addtional cues for color blind 
disabled individuals??
Reichart
15-Feb-2009
[11505]
I designed an interface like this for tasks.

Who What When Where would go dark once you did something on each 
tab (these were tab names).
Henrik
15-Feb-2009
[11506]
view [
	panel [
		...config-options...
	]
	close-button save-button
]


It could look like that in the layout. No need to worry about the 
logic. It already works in the style you wrote.
Reichart
15-Feb-2009
[11507x2]
People liked it, and I plan to bring it back.  We got rid of it for 
another reason, but I did like it.
I think if it is medical interfaces you might.
Graham
15-Feb-2009
[11509]
the alternative is to hide the save-button until you need it.
Reichart
15-Feb-2009
[11510x2]
When I worked on airplane interfaces we did everything in BLACK and 
WHITE.
Or GHOST it.
Graham
15-Feb-2009
[11512]
can't ghost in R2
Henrik
15-Feb-2009
[11513]
we will get sued, because people will be distracted by our pretty 
UI and spill hot coffee in their laps.
Reichart
15-Feb-2009
[11514]
In theory you can force people to walk a path, in the case of the 
task example I just gave, we can't do that, since you can click on 
anything.