World: r3wp
[!REBOL3 GUI]
older newer | first last |
Pekr 9-Nov-2010 [4177x2] | There is now Carl's blog upon how to easily list styles in R2. I posted corresponding R3 code, although it might be preliminary: foreach [name obj] guie/styles [print [name "-" obj/about]] But - I would like the GUI team to think about following aspects: Imo the guie/styles list is highly insufficient. Imagine you want to auto-inspect (load) list of styles into your GUI designer. What you get now is a flat list of styles, where apart from 'table, you have its sub-styles like 'table-cell, 'table-row, 'table-header, etc. I am not sure that in the case of an IDE, you want to see those styles listed. OTOH those are legitimate styles, from which you might want to derive something, or just being able to change their aspects. So, I propose to resolve this situation somehow. The implementation is up to gurus, just few wild ideas: - use tagging - tag style as 'main/root/parent, whatever - but - that introduces another field to the styles? Maybe not, because I expect some tagging system being available anyway? - create guie/widgets, e.g.: guie/widgets: [table [table-cell table-header table-row] - that way we will be able to list just/only widgets as table, not having the list poluted with widget internals - the above aproach might not work well in the case, when you aproach styles more as a CSS, not as widgets. Because - even e.g. 'table-cell might be derived from a totally different style, e.g. a box, or field, so I have no idea of how to keep track of those dependencies, but this is the area I leave for gurus to think about. E.g. someone changes box style and your table is influenced and user might be confused, why it happened. But I expect style/parent or something like that being available? |
Maybe we need two separate things - style grouping (use gui/widgets for that), and style hierarchy - tree or other map of styles, their inheritance and dependencies (maybe this is what Rebolek now referst to as an object browser?) | |
Rebolek 9-Nov-2010 [4179] | Tags can be used, they are implemented.But, IMO, if you need a list of styles for a GUI builder, you better make a list manually. |
Henrik 9-Nov-2010 [4180] | > Imo the guie/styles list is highly insufficient. Imagine you want to auto-inspect (load) list of styles into your GUI designer. What you get now is a flat list of styles, where apart from 'table, you have its sub-styles like 'table-cell, 'table-row, 'table-header, etc. I am not sure that in the case of an IDE, you want to see those styles listed. We already have and use tagging. The styles you mention should be tagged INTERNAL, if they are not already, as they are part of compound styles. So it's up to an IDE to discern that properly It might be possible to make a helper function that filters in only end-user styles, but we'll see how important that becomes. |
Pekr 9-Nov-2010 [4181] | dunno if having guie/widgets grouping would allow us to e.g. extract some style and its related code into separate file? I expect it not being so easy to isolate style/widget completly, as other stuff as event handling etc. might be involved. |
Henrik 9-Nov-2010 [4182] | But it's important to note that all styles are equal citizens in the R3 GUI. Tags are used for conceptual separation. |
Pekr 9-Nov-2010 [4183x2] | Rebolek - making list of styles manually is not imo acceptable. It should be auto-inspectable. |
I propose to use guie/widgets then, to group related styles. By related I don't mean derived, but more of a compound styles - table is good example ... | |
Rebolek 9-Nov-2010 [4185x2] | As Henrik said, INTERNAL tag can be added to styles like table-row etc. |
Actually, I will do it right now... | |
Pekr 9-Nov-2010 [4187] | OK, I've provided you with some idea, now it is your team's take to discuss. Maybe such proposal could go into the long R3 GUI doc, before dismissed right away :-) |
Henrik 9-Nov-2010 [4188] | I need to finish the compound style document, so you can see how they are done. |
Pekr 9-Nov-2010 [4189] | OK, INTERNAL tag - at least something ... although it means two things: 1) adding INTERNAL tag to the style does not provide you with info, which widget it is related to 2) for listing only non-internal tags, you have to write special code to filter all internal styles away :-) |
Henrik 9-Nov-2010 [4190x2] | 1) because one style can be related to several styles and new user-designed styles and also can be used dynamically by a style, depending on the situation. 2) a few lines of code. |
Current list of tags (subject to change): ; set at stylize time style-tags: [ internal ; the style is intended for internal use panel ; the style is panel of other faces compound ; the style is a compound of part styles field ; the style is a field with editable text state ; the style is a user interactive state changing item action ; the style is a user interactive action item info ; the style is an indicator tab ; the style is part of tab navigtion auto-tab ; the style automatically tabs away on a specific event select ; the style contains user selectable text keep ; the style retains highlighting and caret after unfocusing ] ; set at layout and any other time face-tags: [ default ; the face is the window default focus ; the face is in focus disabled ; the face is disabled frozen ; the face is frozen dirty ; the face is dirty ] ; set at window creation time window-tags: [ form ; windows containing a validatable form or other field or state faces inform ; windows containing only text or images and no validatable faces popup ; windows containing a menu or selection, which when interacted with, results in immediate return of a value ] | |
Pekr 9-Nov-2010 [4192] | ad 1) I can understand that, and that was also one of my worries in my initial post. However, as a designer/programmer, wouldn't you find usefull to have: - something like tree-view (or node based visual display) of styles and their dependencies? - wouldn't it help your orientation to have some list like guie/widgets, grouping particular styles, just for your info? So that you know that e.g. table is being built using xyz styles? I am just asking - so no offense please :-) |
Rebolek 9-Nov-2010 [4193x2] | 1) One internal style may be related to more styles. 2) Is this really a problem? I see no benefit of having such a simple function as part of R3GUI - because R3GUI doesn't need it. |
I see no use forguie/widgets, style dependencies can be covered in documentation. | |
Pekr 9-Nov-2010 [4195] | Henrik - tags - very nice! |
Henrik 9-Nov-2010 [4196] | 1) It's possible to make the style tree, when the styles are being initialized. In fact I already have this as a separate script, but it has not been used lately. |
Pekr 9-Nov-2010 [4197] | btw - when I derive style by 'stylize, is there the 'parent field being set, so that the hierarchy can be created? |
Henrik 9-Nov-2010 [4198x3] | Tags are really trivial. They are just a list of words and we have a few TAG functions to set/unset/inspect them during runtime. It's entirely up to styles or the higher level code to use tags correctly and this is for example done with face navigation. |
'stylize hierarchy, not at this time, I think. it would be easy to implement if we need it. | |
The hard part about tags is to name the right ones, so they won't overlap too much. | |
ssolie 15-Nov-2010 [4201] | Was just trying out the r3-gui.r3 script and found out the fonts are hard-coded for Windows. I changed them to some Amiga fonts and the hello world GUI popped up. We'll need to find some way of handling fonts on non-Windows platforms via freetype to keep that script generic... |
Henrik 15-Nov-2010 [4202] | Thanks for info. Passed on to Carl. |
Pekr 15-Nov-2010 [4203] | ssolie - IIRC Cyphre reported here, that he has FreeType support done for A110, he just has to release it. That should help platforms like OS-X, Linux, Amiga IIRC . |
ssolie 15-Nov-2010 [4204] | Pekr: I'm using Cyphre's patch along with my own changes which enables the FreeType support on Amiga to function. |
Rebolek 15-Nov-2010 [4205] | I've got one question. There's face/faces for all faces that are part of a face. There also needs to be some container for faces that are part of face but are not visible (hidden) right now. Currently it's called face/cache, but I think the name should be different. Any ideas? |
GrahamC 15-Nov-2010 [4206] | face/hidden ? |
Rebolek 15-Nov-2010 [4207] | Thanks! Native speaker is always appreciated when chosing right names for words :) |
Henrik 16-Nov-2010 [4208] | I'm considering a rewrite of the validation prototype as there are some parts missing with regards to initial state. Have there been any considerations on how to use the DIRTY tag? I have some ideas on when DIRTY is set: - The user creates an edit in a field, changes setting in a radio group, etc. It would not be enough to focus the face, but a specific action would have to be taken. - When the user deliberately moves the edit back to the original state, the field is still dirty, so we can observe which fields were manipulated. - Using a function DIRTY?, we can observe whether a field or a panel is dirty. - It's not possible or logical to set the DIRTY tag programmatically (other by forcing it in with TAG-FACE face 'dirty) It would be cleared when: - Using a function CLEAN, we can unset the DIRTY tag in a face or panel of faces. This would be the only way to unset the tag. |
Robert 16-Nov-2010 [4209] | - When the user deliberately moves the edit back to the original state, the field is still dirty, so we can observe which fields were manipulated. - I don't like this one. Than we should have a manipulated flag. As dirty means: changed. |
Henrik 16-Nov-2010 [4210] | ok, we need specific scenarios for the use of both DIRTY and MANIPULATED. |
Pekr 16-Nov-2010 [4211] | What about finally releasint useable GUI with more than useable button style? :-) |
Henrik 16-Nov-2010 [4212x2] | For DIRTY being changed, that has relevance for when validation is not used, for enabling submit buttons. But this also means the original value should be stored, which may be covered by the undo system. I'm not sure that's useful, if the undo system can show the number of changes in a field. For MANIPULATED doing what is described above, it overlaps most of what DIRTY would do and it would also overlap most of what validation already does, namely detect and approve/deny changes in a field. I'm not sure it's useful either. |
It all depends on what DIRTY would be used for. | |
jocko 16-Nov-2010 [4214] | I have a very basic question, that I have already asked to Carl : how to get a working gui.r version ? when doing load-gui, I get the following error message : ** Script error: size-text has no value. It seems to me that this point should be definitely fixed, as it prevents anybody to do view tests (for instance the ones given in the reference doc http://www.rebol.com/r3/docs/gui/guide.html) I think that this should be done quickly and independently of any improvement and evolution of the gui styles and functions. |
GrahamC 17-Nov-2010 [4215x4] | you're loading the wrong gui |
load-gui references Carl's old GUI but you need to manually load Henrik's Gui | |
script | |
which is a result of the work of the RM team | |
jocko 17-Nov-2010 [4219] | Is it the r3-gui file ? Then the gui doc page should be corrected accordingly ... |
GrahamC 17-Nov-2010 [4220] | yeah .. it should be if anyone has the time and rights |
Henrik 17-Nov-2010 [4221] | Now provides a visible frame for keyboard navigation: http://94.145.78.91/files/r3/gui/248.png |
Pekr 17-Nov-2010 [4222] | nice! |
Kaj 17-Nov-2010 [4223] | Henrik, what happened to your skin of a few years ago? That looked much better |
Henrik 17-Nov-2010 [4224] | Kaj, it was very hardcoded, but it will probably be reimplemented. |
Kaj 17-Nov-2010 [4225] | That would be good |
Henrik 17-Nov-2010 [4226] | This won't start until sometime later though, so it's going to look like this for a while. I'd hate to do too many rewrites, if I were to start now. |
older newer | first last |