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

World: r3wp

[!REBOL3 GUI]

Henrik
17-Feb-2011
[6044x2]
They should exist, because they are words used by the draw block, 
I assume. But the specific colors should be set somewhere outside, 
and then you use materials to derive the correct color.
The color is something you set, when creating the use of the material. 
That's how I can create buttons of many different colors, but with 
same material properties. That is another abstraction, which is not 
yet implemented, so I had to do it in the style for those buttons.
Pekr
17-Feb-2011
[6046]
I don't understand - so color fields should be regular facet fields, 
but just settable by material system? And that is not implemented?
Henrik
17-Feb-2011
[6047]
No, that is implemented, but the color that is passed to the materials 
system to generate the final color or material object, is ultimately 
still passed to it inside the style.
Robert
17-Feb-2011
[6048]
material != color
Pekr
17-Feb-2011
[6049x2]
In the following document (images don't work), there was a way to 
show, how one can create complete style. No need to go outside the 
stylize. No imagine incorporating material system in there. First 
you have to know, how it works, so it is not enough to work with 
style draw frames, but you have to react accordingly in various phases, 
as on-init, on-draw. 


Then you have to go to completly different place, to define it. And 
that is breaking the workflow for me ...
http://www.rebol.com/r3/docs/gui/styles.html
Henrik
17-Feb-2011
[6051]
If you keep everything inside the style, it's hard to create a skinning 
system.
Pekr
17-Feb-2011
[6052]
No, it is not, why it should be?
Henrik
17-Feb-2011
[6053]
because that means you have to create entirely new styles with every 
new skin.
Pekr
17-Feb-2011
[6054]
1) Anyone yet has to prove to me, that having centralised skin/material 
storage will be practically usefull. What tool on Earth will you 
use to visually edit them? Imo none - we will have to come up with 
own REBOL based tool, which might understand all those draw defnitions 
imo


2) Having materials stored in the style (being part of stylize) means 
you can internally do whatever you want with it. In fact - what material 
system does in on-init style phase is, that it physically stores 
the material object into face/material. You could work even the opposite 
way - knowing the list of styles, you can collect all materials, 
if you need them to have in one place - what for, I don't know, maybe 
for some visual tool, where you will be able to tweak them ... one 
day ... maybe ... as surely Photoshop is not usable ...


The fact is, that having materials stored centrally is correct design-wise. 
But having to deal with styles, and based upon practical merits, 
having definitions scattered around lowers usability of the system, 
and easiness of understanding of system internals ...
Rebolek
17-Feb-2011
[6055]
ad 1) if the styles are draw blocks, no tool will understand them 
no matter if there's centralized storage or not.
Pekr
17-Feb-2011
[6056]
Rebolek - yes, and that is why I prefer things having in one file 
per style ....
Rebolek
17-Feb-2011
[6057]
Do you prefer using images in buttons? Patching current buttons to 
use images instead of draw blocks isn't that hard.
Pekr
17-Feb-2011
[6058x2]
Even current source distribution is wrong for me. What would be cool 
would be system internal functions being separate. And all particular 
style functions being part of the style itself.
Images? No. I talk about logic of how things are organised.
Rebolek
17-Feb-2011
[6060]
And all particular style functions being part of the style itself
 - what exactly do you mean?
Pekr
17-Feb-2011
[6061]
I mean - there is an engine. And then there are styles. My idea (maybe 
wrong :-) is, to have one file per style, containing everything style 
related. Or at least having max 2 files. panel.r3, panel-funcs.r3. 
I just don't know - looking into style definitions is a disappointment 
for me - there is only few basic things, and there should/could be 
more. First things which come in my mind is materials, then options 
block handling, and I can imagine even functions: [] slot, where 
all related functions could be put.


I'll leave it where it is now, before the system is more complete. 
But later on, if I have a feeling, that there is some usability problem 
for users, I'll restructure the system myself.
Rebolek
17-Feb-2011
[6062]
looking into style definitions is a disappointment for me - there 
is only few basic things

 - isn't it good thing if you can write new style with changing just 
 few basic things without need for long code?
Pekr
17-Feb-2011
[6063x3]
No, because it is not of course true. What you show to user inside 
of stylise, is only part of the style. For some styles, as shown 
in the above link, it might be true. But when you start to add things, 
you need to go outside the stylize, and I would like if stylize would 
be able to contain everything, having following slots:

style: [
    about:
    tags:
    facets:
    options:    
    actors:
    draw: 
    materials:
    funcs:
]
Plus the naming of inline options, options block, and style level 
facets vs options - http://curecode.org/rebol3/ticket.rsp?id=1847&cursor=7
should be resolved too ...
If I would not meet with Ladislav, I would not be able to find out, 
how are those things related. That is time-waster to anyone trying 
to study the system ...
Henrik
17-Feb-2011
[6066]
it might be that I'm understanding it wrong, but do you simply want 
a MATERIAL word for the style? that seems to be the only difference.
Pekr
17-Feb-2011
[6067x3]
Not exactly. Because in fact, there are both material, and materials 
words in the final face object. What I would like to see is the materil(s) 
word(s) for the style/stylize phase.
My idea is to have style "simulator", having just few named code 
areas, representing above post style: [ ......] structure. Then by 
protytyping, you would be able to develop full style, by putting 
code into particular slots. Well, that could be done even now, but 
I don't find a reason, why e.g. draw blocks, or actors are there, 
but code like options block handling, supporting functions, materials, 
are not part of the process ...
But I think that ideas for IDEs will come later. The system is still 
not complete.
Rebolek
17-Feb-2011
[6070]
I don't see a single reason why code like option block handling should 
be part of every style, it simply bind words from options to facets 
and one function does it for every style.
Robert
17-Feb-2011
[6071x3]
Petr, maybe it helps when you think about "programming in the large". 
I like self-contained stuff too. It's simple and fast to use. The 
problem is, it doesn't scale.
Imagine 20 customers, all wanting their own branded version etc. 
with an externalized material system you just link in a different 
setup code and you are done.
One rule we follow with the GUI is, that everything that provides 
"additional features" should be plug-in able. If you want to use 
it, you can include it and you won't notice an artifical break. If 
you don't need it, don't use it.
Pekr
17-Feb-2011
[6074]
I don't see a single reason why code like option block handling should 
be part of every style, it simply bind words from options to facets 
and one function does it for every style.

 - Rebolek - what function is that? I found that e.g. for panel, it 
 seems to be an init-panel function, which maps options block to facets. 
 And no, it is not about simple binding, it does more than that.
Rebolek
17-Feb-2011
[6075x2]
Yes, it does more, but this is clearly not part of style but part 
of GUI system.
Styles should be easy to write, so the system should provide funcionality 
that can be used by style writers. Why would you want this functionality 
be part of every style instead?
Pekr
17-Feb-2011
[6077x2]
Robert - my long time experience is, that code reuse is very often 
being a trade-off. I can't even imagine, how you make new material 
for your new customer. You don't have any visual tool for that anyway. 
And I am not sure if I can if it is in separate file, or with each 
style. I can understand the plug-in mechanism, but I am just right 
now not sure, if it outweights the usability aspect. I simply remember, 
that I liked to use the AMOS basic. Because it allowed cool things 
rather easily. And if users like the system they use, they will use 
it, and extend it. And sometimes it is about how cleverly the code 
is organised. We will see, how it turns out ...
Rebolek - no, because it IS NOT part of the system, but part of the 
style, can't you just see that?
Rebolek
17-Feb-2011
[6079]
I hated AMOS basic because of how system-unfriedly it was.
Pekr
17-Feb-2011
[6080x2]
Imagine I am writing new style. How on earth I define, in stylize 
level, how is options block mapped to facets?
Show me other basic allowign rather easy animations, sound, and game 
creation :-)
Maxim
17-Feb-2011
[6082]
blitz basic  ;-)
Rebolek
17-Feb-2011
[6083]
:)
Pekr
17-Feb-2011
[6084]
Rebolek - to not be confused:

button 100x20 "OK" options [here is the options I talk about]
Maxim
17-Feb-2011
[6085]
actually better in all regards  :-)  but it had all the OS friendliness
Pekr
17-Feb-2011
[6086]
Max - a good one :-)
Maxim
17-Feb-2011
[6087]
their cow and camper racing game was hilarious  :-D
Rebolek
17-Feb-2011
[6088]
How on earth I define, in stylize level, how is options block mapped 
to facets?


Why do you want to do that? Let's say I want to write KNOB style. 
I can set for example it's value, color and size, so options would 
be something like:

options: [
	level: [percent!]
	knob-color: [tuple!]

 knob-size: [integer!]	; it's round, so diameter is enough for size
]


Then I can use knob-color, knob-size... in draw block without any 
manual mapping.
Pekr
17-Feb-2011
[6089]
You see, you have mess in naming, no wonder you don't know what I 
am talking about!
Maxim
17-Feb-2011
[6090]
what mess?
Pekr
17-Feb-2011
[6091x3]
Options you put here, are inline options, whereas what I am talking 
about is the options block from the dialect level, which maps to 
facets!
http://curecode.org/rebol3/ticket.rsp?id=1847&cursor=7
Uh oh, trying another way:

button "OK options [my-field: "test"]


Where is the 'my-field processed? That is the 'options I talk about, 
which I want added to stylize ...