World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Luc 13-Jun-2005 [1430x11] | i have a problem with the size of an image |
that's the code : | |
; définition du style de l'objet et intégration dans le context de RebGUI : ctx-rebgui/widgets: make ctx-rebgui/widgets [ ;; Object' Style definition : object: make ctx-rebgui/rebface [ size: 20x20 title: "" pane: [] ; gestion des évènements : feel: ctx-rebgui/widgets/default-feel ; Initialisation : init: has [tmp-sze] [ tmp-sze: size ; list countainer insert tail pane make ctx-rebgui/rebface compose [ size: tmp-sze offset: 0x0 pane: [image img-barre] ] ; Insert TitleBar : insert tail pane titlebar: make ctx-rebgui/widgets/image compose [ image: img-barre size: (as-pair tmp-sze/x 30) offset: 0x0 edge: ctx-rebgui/widgets/default-edge ] titlebar/init ; insert scrollers insert tail pane v-scroll: make ctx-rebgui/widgets/scroller compose [ size: (as-pair 15 tmp-sze/y) offset: (as-pair tmp-sze/x 0) ;action: does [scroll-table/y parent-face/pane/1 self] ; put here scrolller function calls ] v-scroll/init insert tail pane h-scroll: make ctx-rebgui/widgets/scroller compose [ size: (as-pair tmp-sze/x 15) offset: (as-pair 0 tmp-sze/y ) ;action: does [scroll-table/x parent-face/pane/1 self ]; put here scrolller function calls ] h-scroll/init ; insertion scrollable countainer insert tail pane/1/pane make ctx-rebgui/widgets/box compose [ size: (as-pair pane/1/size/x (pane/1/size/y - 15)) offset: 0x0 pane: [] ] ] ] ] | |
img-barre: | |
img-barre: load to-binary decompress #{ 789CEB0CF073E7E592E2626060E0F5F4700902D266406CCEC104244F54EBE903 29CE028FC8620606AED720CCD8D4CD1B0514644977F4756460D8D857F33B7032 90AF90EC11E4CBC050A5CAC0D0D0CCC0F0F33F907EC9C0506AC0C0F02A8181C1 6A06038378FEA4F8A36E0C0C8C359E2E8E2115B79262F654181E7EC0C6C078E4 88C10B4607868D1B366DE22B52676211E0E6E73FAF50AE0414FAF0E91358E882 00876B0343D2C367CFE49EF8B1702C509C10CBC0D4D13A7366E5046B41858688 1933D8AA2F720838382B8830326570B480F41A1819418C3BFDFFFF7FF69DC220 090B90E27F7F7F9B9F980B54AD53FFFF9F2CC4BC072E0D0C524C82BC40230E74 32309AB014993830F036EEE306928C6007AC60001960A2CC0035A6CDC1851928 5CA00457E1D10DD23807EC8C458C04943981E41A8411CAA210CE00BBE8C25E26 5401836B20D72D8801B39731039DBFBFEEAF14C8F90AD3D6C7EF878613C8A28D 35FFFE4003E6DF9F9FC660BF3A2F78C1C661C0A02EA26B965FF3B31E18670C9E AE7E2EEB9C129A00CC85951506020000 } | |
the edge of the image has the correct size but the image hasn't the same size than the edge | |
a sample code to illustrate it | |
wind: compose/deep [ button "Ana" [do %anamonitor.r] obj: object return button "UP" [titlebar/size: titlebar/size + 10x0 show titlebar] text (join "REBOL/View : " system/version) ] display "Test du style de l'objet LadyBird" wind do-events | |
the edge grows up but not the image | |
sorry for my english (i'm a french reboler) | |
and thanks for your help | |
Ashley 13-Jun-2005 [1441] | With regards to the image size problem, try adding "effect: 'fit" to your make image code. Also, it's probably easier to make the image directly from a face, as in: insert tail pane make ctx-rebgui/rebface [ offset: 0x0 size: as-pair tmp-sze/x 30 image: img-barre edge: ctx-rebgui/widgets/default-edge effect: 'fit ] |
Anton 14-Jun-2005 [1442x7] | Slider bug has been fixed. It looks solid now. |
site: http://www.lexicon.net/antonr/rebol/ load-thru/check site/rebgui/slider.r 1.0.4 do site/rebgui/demo-slider.r ;<-- modify this file to point to your rebgui installation | |
The fixed bug is the visual off-by-one error and floating-point instability. Text support has been removed from init. | |
Now, scroller should be able to be implemented in rebgui-widgets.r by just: | |
scroller: make slider [append init [append flags [arrows together]]] | |
(where 'together is removeable, depending if you want to default to amiga-style or not.) | |
http://www.lexicon.net/antonr/rebol/doc/create-a-rebgui-widget.r http://www.lexicon.net/antonr/rebol/doc/create-a-rebgui-widget.html | |
Ashley 14-Jun-2005 [1449x2] | Anton, is the slider "stable" enough for me to integrate into the next build yet? |
Good introductory doc BTW, I've added a link to it from the RebGUI Home page already. ;) | |
Arie 14-Jun-2005 [1451x2] | Hi. I 've had a look at REBGUI and it looks terrific! |
However, when I run the tour.r script there is some kind of memory usage display at the bottom which increases by 6 KB every second even if I don't do anything. Would that mean REBGUI is eating memory without control?? | |
Luc 14-Jun-2005 [1453x2] | I have seen that too |
Ashley thank you for your help | |
Vincent 14-Jun-2005 [1455] | no more than any other /View app. It's the memory allocation from the event system, and it's garbage collected later. |
Luc 14-Jun-2005 [1456] | my style is working soon |
Pekr 14-Jun-2005 [1457] | I objected too, but I was told it stops after some time and that garbage collection is invoken only once per some period or so ... |
Arie 14-Jun-2005 [1458x2] | Vincent: oh, that's better. Why does it claim memory whilst nothing is being done however? |
No events seem to happen in between ... | |
Vincent 14-Jun-2005 [1460] | yes, 'time events ... |
Arie 14-Jun-2005 [1461x2] | OK. I understand ;-) |
thx | |
Pekr 14-Jun-2005 [1463] | hmm, time events? Why those don't reuse the same space? :-) |
Ashley 14-Jun-2005 [1464] | I think I'll add a recycle to that display timer just to avoid confusion ... |
Vincent 14-Jun-2005 [1465] | on events : I think it's because you can store them , and they are transmitted to various user feel funcs - so the system must wait to free them. Ashley : yes - it's very confusing, as not everybody wait more than 10 min to see the garbage collection. |
Pekr 14-Jun-2005 [1466] | :-) |
Ashley 14-Jun-2005 [1467] | I'm surprised no-one's asked why memory usage doubled from 0.2.4 to 0.3.0 ;) (before anyone does ask, it's the dictionary) |
Pekr 14-Jun-2005 [1468x2] | dictionary of spell checker? |
btw - is spell-checker really needed? I mean - never used it in my apps, and users never complained :-) | |
Anton 14-Jun-2005 [1470] | Ashley, slider seems ready to integrate to me. I feel I can let it go for a while and work on something else. |
Ashley 14-Jun-2005 [1471] | If you don't need / want it then just delete the dictionary directory ... if it can't find it then it won't be loaded. Spell-check is important for report generation front-ends (or at least that's where I'm using it). |
Pekr 14-Jun-2005 [1472] | it should be mentioned in docs then (if it is not already), how to "disable it". |
Ashley 14-Jun-2005 [1473x2] | http://www.dobeash.com/it/rebgui/edit.html#section-4 The dictionary, if present, is then loaded into the dict block. |
Anton, will do. | |
Anton 14-Jun-2005 [1475x3] | Ashley, I just fixed a small resizing bug. Not a show stopper, but there is a new version anyway. |
site: http://www.lexicon.net/antonr/rebol/ load-thru/check site/rebgui/slider.r 1.0.5 load-thru/check site/rebgui/pair-edit.r 1.0.1 do site/rebgui/demo-slider.r ;<-- modify this file to point to your rebgui installation | |
load-thru/update site/rebgui/slider.r ; (just now updated slider.r again, same version) | |
Allen 14-Jun-2005 [1478] | anton: Can you take a look at the autocomplete style for me, after doing pair-edit you will be more in tune than me. |
Graham 15-Jun-2005 [1479] | Where's the cooking-widgets page? I get a 404 when I go to rebolfrance.org and use the link there... |
older newer | first last |