REBOL 3.0

GUI Survey - Do you want panel embedded styles?

Carl Sassenrath, CTO
REBOL Technologies
22-Sep-2008 22:20 GMT

Article #0149
Main page || Index || Prior Article [0148] || Next Article [0150] || 19 Comments || Send feedback

Ok, while we wait for an actual name to be picked for the R3 GUI, it's time to start talking about a few things...

Question: Do you want embedded style definitions in panel blocks (layouts)?

In my current GUI implementation, you add styles with the stylize function, similar to R2 VID. I've not yet added the style command for local styles within a panel, because I'm not so sure we want to do that. It's only useful if you use more than one face with that style within your panel.

If we did add it, it would look something like this:

panel [
   example: style 'parent-style [spec goes here]
   ...
   example "here it is"
   example "there it was"
]

This defines a new local style called example and uses it.

Advantages

You can easily add styles anywhere within your panel contents. This keeps them local to where you use them, making them easier to create. You don't have to maintain a separate style sheet.

Disadvantages

You don't maintain a separate style sheet. So, now your style definitions get scattered around in various panels in a disorganized way. The argument could be made that this also makes it difficult for you to make global changes or for others to change skins, because your local style definitions will take precedence. (Of course, the GUI allows you to modify any face instance with an options block anyway, so you can still make local variations.)

My Opinion

I think we should leave it out for now, then see if we feel under "pressure" to add it. If not, it can stay out.

19 Comments

REBOL 3.0
Updated 26-Apr-2024 - Edit - Copyright REBOL Technologies - REBOL.net