r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebGUI] A lightweight alternative to VID

shadwolf
12-Jun-2005
[1416x2]
I don't get the point ...  people that work on a widget of rebgui 
must be noticed to the public  ;)
this is usefull for us too to know how many people work on a widget 
and what was the role of every intervenent
Anton
12-Jun-2005
[1418]
Yes, I just realised I didn't put much credits in the source. I should 
have credited at least Ashley, because I started from rebgui scroller 
style, listed in rebgui doc as authored by Ashley.
shadwolf
12-Jun-2005
[1419x4]
No problem I make it  ;)
As I say this table about on cooking widgets is like a summary of 
the in progress work ;)
it can be use to collect from public the widgets needs too :)
we all know that the most of the work was done by ashley our intervention 
is most a support one (well in listview it's 100%  my own code ... 
 but that the only one and it's not ended it lot to bet that AShley 
will adapt it befor intergring it to rebgui  :))
Anton
12-Jun-2005
[1423x2]
Just for the record, there is very little original code of the scroller 
in my slider implementation. It is totally re-engineered.
Mmm...  checks don't do face/action when they change state. Is that 
by design ?
Ashley
13-Jun-2005
[1425]
re: check actions - by omission; fixed in next build. I've also updated 
the roadmap to include a link to the RebolFrance Wiki (shadwolf) 
and a link back to the RebGUI Home page (Robert).
Anton
13-Jun-2005
[1426]
ok cool.
Luc
13-Jun-2005
[1427x14]
hello everybody
i'm testing RebGUI for my project
i build my widget for inserting it dynamicly later
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.