World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Henrik 20-May-2006 [3692x3] | I've also thought about splitting the code in more levels to achieve better abstraction. Whether this would help for a RebGUI version or not, I don't know. I do think that there would be a need to create automation for building both for VID and for RebGUI. |
another solution again is to simply wait a bit longer until I get some more critical features in and then simply fork the thing. This I don't particularly like. | |
I guess I need to make use of RebGUI in the near future and figure out how it works. Then I could make the port myself | |
Ashley 21-May-2006 [3695] | Having converted (or at least used as a starting base) a number of VID styles to RebGUI widgets I've observed that the final code is 40%-60% smaller (YMMV) and easier to understand in that most of the logic resides in the widget itself (i.e. it is self-contained). But, once the code to be converted reaches a certain size where I can no longer 'grok' it in a single reading (about a hundred lines for me) I find it easier to code from scratch. ;) I'd also break it into two separate widgets: grid and list-view, and look at the minimum function set each requires (KISS). Simplest way to start is to read all the doco under 'RebGUI Documentation' at http://www.dobeash.com/RebGUI/then look at the source code of a few widgets (start with something simple like %button.r then move onto %table.r which shares a lot in common with list-view). If you run into any brick walls (or find yourself asking, "why oh why did they do it that way?") just drop a note here. ;) |
Robert 21-May-2006 [3696x3] | I just want to inform you what enhancements I needed and Cyphre did so far for RebGUI: table: Add an API to table that allows to change the columns layout at runtime: my-table/set-columns ["Column 1" left 0.25 "Column2" center 0.75] drop-list: fire action only if selection was made/changed, at the moment action fires if clicked on field too general: on-un/focus should be fired if user clicks an other widget, not only if carets leaves the widget when TAB is pressed table: moving bar up/down with keyboard should fire click-action, alternativ: pressing RETURN can fire click action table: align header text like data (left, center, right) at the moment always left table: TRAC #21 TRAC #5 Cyphre: should be fixed but please test it and let me know. TRAC #6 |
I'm going to test all those changes and than we are ready to publish them back to the official RebGUI repository. Ashley, do you first want to take a look at the changes or should I just check them in? What about the docs? Who is going to update them? Should the RebGUI docs be added to the repository as well? | |
WRT Henrik's list-view: I think Ashley is right, that we should try to seperate the list-view and grid-view and see if we can extract common code to both. I would preferr a layered approach, where I can add more "comfort layers" if I want but I'm not forced to always have this code included. | |
Graham 21-May-2006 [3699] | I'd also like to see the drop list drop down on clicking on the text and not just the down arrow. |
Robert 21-May-2006 [3700x2] | Graham, all things I mentioned are implemented. |
So just give us some days to see if it really works. | |
Pekr 21-May-2006 [3702] | Robert - would it be problematic to "port" Cyphre's grid? It contains nicely abstracted engine too, is rather small. IIRC you contracted Cyphre for that earlier and even I did, to add horizontal scrolling ... |
Robert 21-May-2006 [3703x4] | Yes, that's an option as well. |
Ashley, how about adding some screenshots to paragraph 3.3 of the docs? Would make it much easier to understand what's going on. | |
So, how can I create a column based layout? I need first to draw several buttons downward and than right of them several fields downward. I can't layout out them by line because I need the focus to cycle through all fields and not to jump from button to field to button etc. | |
Better: Is there a way to remove a widget from the focus cycle? | |
Volker 21-May-2006 [3707x2] | Do you have a short example? Maybe i find some interesting lines in the source. |
of rebgui | |
Robert 21-May-2006 [3709x3] | Example: At the moment I use button "a" field "a" return button "b" field "b" return and I need below button "a" button "b" return ; return right of button "a" positon field "a" field "b" |
So something like GUIDE in VID but more convinient to use. The VID GUIDE isn't very logical to use IMO. | |
Maybe a LINE or COLUMN keyword would be good. And the COLUMN width is derived from the widest widgets placed in one line. | |
Volker 21-May-2006 [3712] | removing focus would save your problem too? |
Robert 21-May-2006 [3713] | Yes, if I could specify for each widget in the OPTIONS block if the focus can be set to the widget via keyboard or not, that would solve the problem as well. Pressing TAB should search so long until an "open" widget is found. |
Volker 21-May-2006 [3714] | Would preprocesing help for now? something like below[ . button "a" . button "b" return ; return right of button "a" positon . field "a" . field "b" ] |
Robert 21-May-2006 [3715x2] | What do you mean with pre-processing? |
how to add this than to a bigger layout? | |
Volker 21-May-2006 [3717x3] | giving it a layout like the above and turning it into button "a" field "a" return button "b" field "b" return |
compose? | |
i hope rebgui has sub-panels. | |
Robert 21-May-2006 [3720] | Adding a new keyword like BELOW would be OK. |
Volker 21-May-2006 [3721x2] | But i dont know the internals for now. If you can wait for Ashley ok, just playing around. |
No, i made a thinking-error. preprocessing would not work. | |
Robert 21-May-2006 [3723] | table: Can I set the selected row at run-time? I would like to pre-select the first entry. |
Volker 21-May-2006 [3724x4] | display "Example" compose [ button "a" [face/type: 'untabbed-button] field "a" return button "b" field "b" return ] |
in rebgui-edit tabbed: [area field edit-list password button] tabbed?: make function! [face [object!]] [all [find tabbed face/type face]] ; [che] Returns TRUE if a face itself (not one of it's pane's subfaces) is tabbable (NONE otherwise). | |
how to do that type-change on creation? | |
my demo: after pressing button "a" its no longer tabbable. | |
Anton 21-May-2006 [3728] | Yes, rebgui asserts that certain widget types are tabbable. It is not an attribute of a widget instance that can be changed, except by a trick such as Volker's, above. Changing the type is not recommended because it is bound to break other rebgui behaviour. |
Volker 21-May-2006 [3729] | But as a hack on button? |
Anton 21-May-2006 [3730x3] | So this means Rebgui's behaviour must change or you must accept the current behaviour. |
I wouldn't be very happy with this hack in my code. | |
But I thought of a better hack. Put the non-tabbing widget into a group of its own. Looks like rebgui doesn't recurse into subfaces when tabbing. | |
Volker 21-May-2006 [3733] | Can widgets be derived from each other? If i make a lookalike of button and change only the name, it would be the same? |
Anton 21-May-2006 [3734x3] | But rebgui would not know about your new style, and so it may miss out on other facilities of rebgui. |
In VID, there is face/flags, which can contain the 'tabbed flag. | |
Thus the VID style is independant of the tabbability of an instance. Rebgui strongly ties tabbability to the rebgui type. | |
Volker 21-May-2006 [3737x2] | ;hack but tab works: display "Example" compose [ button "a" field "a" return button "b" field "b" return do [ foreach [but fie] face/pane [but/type: 'untabbed-button] ] ] |
what else is the /type used for? | |
Anton 21-May-2006 [3739x3] | Well, it's referred to a few times in rebgui-edit.r |
Ahh, it doesn't work! Rebgui also tabs into the group-box... | |
display "" [field group-box "" data [field] field] | |
older newer | first last |