World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Ashley 26-Apr-2005 [604] | Nice, I understand what you want to do now ... create a GAL (GUI Abstraction Layer) that enables RebGUI widgets to be used in VID with zero RebGUI changes. Interesting to see whether you can get it working the other way (VID -> RebGUI) as painlessly! ;) |
Volker 26-Apr-2005 [605x2] | i hope. after all, both create faces. thee are a few differences in your api (action has 2 arguments, init is function). and you have a resize-system. will look what i can do. at least something like vid[ vid-stuff ] ; symply calls 'layout should be doable. |
btw related dialects: how about using #xywh instead of that tuple? then it could be easier detected on the vid-side (issue! -< resize-options) | |
Ashley 26-Apr-2005 [607] | Good idea, I'll change that in the next build. |
Volker 26-Apr-2005 [608] | btw is the verbose dialect by design or to keep parser short. i guess i could do some automatic with few lines overhead. to allow strings and actions without the extra brackets. |
Ashley 26-Apr-2005 [609] | By design, to keep it as simple (and efficient) as possible. I'm open to a more VID-like parse-based approach as long as the complexity / efficiency doesn't blow out as a result. |
Allen 27-Apr-2005 [610] | My old autofill is here. do http://www.rebolforces.com/reb/auto-fill.r |
Ashley 27-Apr-2005 [611] | Thanks, I've had the code lying around for ages and was trying to find a link (for attribution purposes) the other day. ;) |
Anton 27-Apr-2005 [612] | Paul, you mean like Q ? That used windowsXP-only window transparency feature for the window. Inside a rebol window I can think of a circular color-mapped gadget (who was it again...?) |
[unknown: 5] 27-Apr-2005 [613x2] | Yes Anton. I'm looking for a brief example - a small layout that shows the capability. |
I remember when /view first came out it seemed there was someone that made a gui that was eliptical using only faces and no layout. | |
Vincent 27-Apr-2005 [615x6] | For VID in RebGUI, an external face widget : |
x-face: make face [ size: -1x-1 init: does [ pane: get data pane/offset: 0x0 if negative? size/x [size/x: pane/size/x] if negative? size/y [size/y: pane/size/y] ] ] | |
Usage: my-face: layout [field "just a field" [print face/text]] display "A RebGUI display" [ ... x-face [data 'my-face action [print "Hi!"]] ... ] | |
sorry, correction (some VID widgets need a block as parent face) : | |
x-face: make face [ size: -1x-1 init: does [ pane: reduce [get data] pane/1/offset: 0x0 if negative? size/x [size/x: pane/1/size/x] if negative? size/y [size/y: pane/1/size/y] ] ] | |
(note the 'feel is replaced by 'action definition when one is specified) | |
shadwolf 27-Apr-2005 [621x4] | Well after one day of work on the multicolumn list here is a little screen shot of what I succed to do http://shadwolf.free.fr/rebgui-list.jpg |
What I need to do : | |
* Vertacal and Horizontal scrollers management * Header rendering * Column content resizing management (internal & external) * Line Selection with a filled fill (not sure of the wanted way to make this work ...) * Inseting rows * Deleting rows * More widgets support (for the moment I can handle images checks and texts) | |
Actually my code is about a little less than 100 lines | |
Volker 27-Apr-2005 [625] | Ashley: changed %display.r to use more parse-features. Hope you like it. but introduced a bug, scrollers are broken now. Would now be easy to detect something like button "hello" but then that string has it has to be merged with the attributes-block somehow. I let you think about it ;) because the attributes are in a block we clash with vid-style action. MAybe we could put the action in parens then, like parse does? button "quit" [size 200x100] (quit) |
Vincent 27-Apr-2005 [626] | Volker: ( ) for actions - it will be a pain to use with compose/deep (needed because 'display evaluation is kept to minimal). |
Volker 27-Apr-2005 [627] | True. |
shadwolf 27-Apr-2005 [628x3] | lastest screenshot of the listview item ... http://shadwolf.free.fr/rebgui-list2.jpg |
TODO: * Vertacal and Horizontal scrollers management * Column content resizing management (internal & external) * Line Selection with a filled fill (not sure of the wanted way to make this work ...) * Inseting rows * Deleting rows * More widgets support (for the moment I can handle images checks and texts) | |
* Sorting ;) | |
Ashley 28-Apr-2005 [631] | Latest build available at: http://www.dobeash.com/files/RebGUI-021.zip Highlights include: - Specification dialect is now VID compatible (and 35% slower) - request-color and request-date added - Span attribute changed from tuple to issue - Couple of minor fixes - %tour.r has an additional "Requestors" tab I wanted to get this build out before folks went too far down the converting from VID to RebGUI and vice versa path. If a parse expert (I'm not one) could suggest performance improvements for the main display parse loop that would be great. |
shadwolf 28-Apr-2005 [632] | I like very mutchthe requestors :) |
Robert 28-Apr-2005 [633] | there is quirk with them: If you select a color, the requestor button keeps the highlighting frame. Should be reseted to neutral. |
shadwolf 28-Apr-2005 [634x2] | I like the new way to hadle face parameters :) |
I addapted my actual listview work to rebGUI 0.2.1 ;) | |
Vincent 28-Apr-2005 [636] | compatibilty bug with set-words in definition - investigating |
Robert 28-Apr-2005 [637] | How does this line work? | set arg word! ( either in widgets arg [append-widget widget: arg] [attribute-color: get arg] ) append-widget checks for 'widget but 'widget is set after the call to 'append-widget Further, in the parse-rule the above line comes last. But it parses the widget words. When do the parameters get parsed? I would have expected this rule to be the first after the keyword rules. |
shadwolf 28-Apr-2005 [638] | 0.2.1 i see the memory use growing up from 5976 kB to 7090 KB then it's stable is it normal ? |
Vincent 28-Apr-2005 [639] | bug found: line 243 in display.r : | set arg set-word! (append-widget word: arg) arg should be a get-word : | set arg set-word! (append-widget word: :arg) to work with 1.2.1 |
Robert 28-Apr-2005 [640] | speed: Ashley, the parse spec looks very much like a degenerated 'switch statement to me. You are not doing anything wild that requires parse. Have you tried to loop through the spec block and use a switch statement instead? It might require a bit state handling but could be faster. |
Vincent 28-Apr-2005 [641] | Robert, not that simple : we have selection on both datatypes and keywords, with optional parameter of various datatypes. The 'switch wouldn't be trivial There is a room for improvements in the parse loop, as a set-word! is always followed by a word!, and file!, string!, issue! (and others) are never alone. |
Robert 28-Apr-2005 [642] | the datatypes are unique. Each on only shows up once. I don't see any optional parameters. The parameters can either be of type A or B, ok. But that can be handled in the action block of the matching switch. And there we can reposition the spec block to skip those handled cases. |
shadwolf 28-Apr-2005 [643] | I make a sample data table of 5 by 100 entries to allow me to test the resizing / scrollings issues ;) |
Robert 28-Apr-2005 [644] | Shadwolf, did you consider to specify names for the columns so that I can provide a name/value block? With this the name/value block can contain much more values than the grid should handle. Very handy feature. |
shadwolf 28-Apr-2005 [645x2] | robert yes this feature was yet passed to me by cr8825 on french forum for non visible data what I plan to do Is hadding a special flag like hid for example:) |
I figured out a little problem when I ste up the scrolling has the header and is in the same countainer as the column and row scrooling make desapear the header buttons :) | |
Robert 28-Apr-2005 [647] | shadwolf: Adding a hide flag requires me to alter all my data. Just wrap it around, if the grid doesn't know about it, just skip it. |
Vincent 28-Apr-2005 [648] | Robert: on switch version : trying - but some difficulties. A rebgui declaration is of kind : any [ global-parameter | global-parameter-with-arg argument | opt set-word! word! any [integer! | pair! | ... | keyword [integer! | pair! | ...] ] ] the problem with that is a) the optional set-word!, b) for widgets, both values and keyword/values are allowed with 'switch it's far less readable (for arguments, we have to separate keywords and datatypes and use "switch/default [] [swtich []]"), and takes more code |
shadwolf 28-Apr-2005 [649x4] | I solved the problem with the scrolling ;) |
?? don't understand ... but we have lot of time to have me understanding... | |
you want to be able to join directly the column is this what you want ? | |
or being able to make formula like in Excel = AA:01 + AB:02 | |
Volker 28-Apr-2005 [653] | n: 100'000 bench: func [code] [t1: now/precise loop n code print [difference now/precise t1 mold code] ] bench [switch 'f [a [] b [] c [] d [] e [] f [] g [] h []]] bench [parse [f] ['a () | 'b () | 'c () | 'd () | 'f () | 'g () | 'h ()]] |
older newer | first last |