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

World: r3wp

[View] discuss view related issues

Pekr
23-Feb-2005
[415]
btw - he uses imo 1.2.10, as he told me he want to use last "stable" 
version .... once again - we should probably do something with View 
release, or ppl will still use old stuff, even if new one is stable 
enough to use ...
Rebolek
23-Feb-2005
[416]
I think if you 'view face and then you use 'to-image rendered bitmaps 
are taken - so it's just 100x100. If the face is not viewed at all 
or unviewed, all faces and subfaces must be completely rendered, 
so you get full bitmap....just my thoughts
Pekr
23-Feb-2005
[417x2]
hmm, so no chance of getting image of 100x100 face?
I have thought that "unview" "destroys" rendered faces? So I am surprised 
he got correct result?
Rebolek
23-Feb-2005
[419x2]
'unview probably "clears" "bitmapcache" so all faces and subfaces 
must be rendered again if you use 'to-face. and 'view probably composes 
all bitmaps together, so everything overlayed is lost when using 
'to-image...but that's just what I think, I don't know how it really 
works internaly
'to-face --- it should be 'to-image
Pekr
23-Feb-2005
[421]
hmm, and once he is in View layout = rendered state, he simply wants 
to press a button and get resulting image ... Maybe he could render 
it once again in the background somehow? But how?
Rebolek
23-Feb-2005
[422]
mh, probably make new face (without 'view-ing it) with the content 
of the subface
Volker
23-Feb-2005
[423]
has he tried "show container-face/pane" before to-image? maybe that 
helps.
Pekr
23-Feb-2005
[424]
why would there be show needed? IMO it is correct that container-face 
clips the image .... hmm, although maybe not, becase the image is 
still 100X100, just content is 50x50 :-)
Volker
23-Feb-2005
[425]
the buffer is 100x100, but /view knews only the 50x50-part is needed, 
so draws only that in the buffer.
Pekr
23-Feb-2005
[426]
I will send him email to try ...
Volker
23-Feb-2005
[427x2]
you must somehow tell the image its not clipped. when you show the 
container, it thinks it is. when you show itself, maybe it renders 
full.
i guess faces remember if they are already rendered or not. but they 
don't remember that they are only rendered partly. 'unview tells 
them they are unrendered. hmm, maybe a 'hide does the same. would 
only flicker, not unview the whole window.
Pekr
23-Feb-2005
[429x2]
I just tried show and it does not seem to work ... but maybe my code 
is buggy :-)
>> container-face: layout [b: box 50x50 red button "to-image" [show 
b/pane r: to-image b/pane]]

>> subface: layout/size/offset [at 0x0 box 100x100 blue] 100x100 
0x0  b/pane: subface
>> view container-face
>> view layout [image r]
Volker
23-Feb-2005
[431x3]
No, your code is ok, only rebol is - ahem ;)
b/pane: none show subface ; and then restore b/pane
rebol[]

container-face: layout [b: box 50x50 red button "to-image" [b/pane: 
none show subface r: to-image subface b/pane: subface show b view/new 
layout [backdrop black image r] ]]

subface: layout/size/offset [at 0x0 box 100x100 blue] 100x100 0x0 
 b/pane: subface
view container-face
Pekr
23-Feb-2005
[434x3]
why b/pane: none?
do you think there is something strange with face rendering/composition/refresh?
actually - if you set b/pane to none, where will subface be shown/rendered? 
:-)
Volker
23-Feb-2005
[437]
its rendered in its buffer. you must tell /view that the parent-face 
of subface is invalid. thus b/pane: none. now b/pane does not know 
subface and subface must re-render itself and then it goes full size. 
else it knows only the 50x50 is visible. should be fixed in to-image 
to force a full redraw.
Pekr
23-Feb-2005
[438]
nice, thanks a lol! It sounds also logical :-)
Gabriele
23-Feb-2005
[439]
Rondon: the styles for the Detective were designed and implemented 
by Romano and Chris. The code is under the GPL; i guess you can contact 
them about them. bear in mind they were not intended to be generic 
styles, but were done just for the detective.
Chris
23-Feb-2005
[440]
http://www.ross-gill.com/r/btn-style-old.r-- this is an earlier 
version of my xp-themed btn style.
Guest
23-Feb-2005
[441]
.
Cyphre
23-Feb-2005
[442x2]
Pekr: the solution for your problem is:

sublay: layout/offset [
	box 100x100  field ""
] 0x0
view layout [
	b: box 50x50
	button "do-obr" [
		save/bmp %obr.bmp to-image make sublay [
			pane: head forall pane [
				pane/1: make pane/1 []
			]
		]
	]
	do [b/pane: sublay  show b]
]
in other words the to-image takes the parent-face references for 
rendering so you have to get rid of them.
Pekr
23-Feb-2005
[444x2]
That is nice ... but another example of how even short rebol code 
can be difficult to understand, at least for me ...
pane: head forall pane [pane/1: make pane/1 []] ... is a magic to 
me ...
Ashley
23-Feb-2005
[446]
You're not the only one! ;)
Pekr
23-Feb-2005
[447x2]
hmm, so during the button-press, you simply make sublay [] In such 
case, you get clone of sublay face definition, right? So you also 
need to iterate thru sublay pane elements and recreate them for made 
face?
Ashley - I think it is like I described it now ... Cyphre is making 
new sublay face ... and original sublay can contain xy elements, 
e.g. field with some filled-in info, so he imo iterates thru its 
pane and recreates it ....
Ammon
24-Feb-2005
[449]
How do you change the title of a window that has already been VIEWed?
Allen
24-Feb-2005
[450x2]
lay/text: title 
	lay/changes: 'text
;-- working example
lay: layout [
	size 500x200
	button "Change Title" [
		lay/text: join "Time: " now
		lay/changes: 'text
		show lay
	]
]

view lay
Ammon
24-Feb-2005
[452]
See, I knew it was something easy...
Brock
26-Feb-2005
[453x2]
Ammon, I was attempting to use your dropdown.r with view version 
1.2.56.3.1 (agg9 version) and notice the dropdown list items don't 
appear in the list.  Are you aware of this change from earlier versions 
of view and if so, did you fix it yet?
Does anyone here use later betas on an ongoing basis instead of the 
last official release from rebol?  Wish Carl would release a new 
official view.
Geomol
26-Feb-2005
[455]
I mostly use rvdraw57e.exe, when doing View stuff. I find it more 
likely, that I will have to change less, when a new official REBOL/View 
is release this way.
Ammon
26-Feb-2005
[456x2]
Brock, check the source...


                ;options/data: data ;uncomment for View 1.3 support
                options/lines: data
I haven't had a chance to actually test it with the AGG betas though...
Brock
26-Feb-2005
[458x3]
Ah, didn't look at the source.  I do recall the /lines /data change 
that occured way back.  I'll give it a try.
Ammon, yes that did the trick with one of the latest views.
;May I suggest a change in your code something like this...
        either 1.2.8.31 < system/version [
            	options/data: data ; for later view 1.3 betas
        ][
            	options/lines: data
        ]
Ammon
26-Feb-2005
[461]
Absolutely.  Thanks!
Ashley
26-Feb-2005
[462]
Does anyone here use later betas on an ongoing basis

 REBOL/View 1.2.10.3.1 30-May-2003, as it's a good match for the latest 
 [working] SDK  (REBOL/Encap 1.2.0.3.1). It is frustrating how REBOL 
 has become more and more "write once, test everywhere" over time 
 - hopefully /Platform will provide a unified base so we don't have 
 as many of these "which version(s) of View does this work" on type 
 issues in the future.
Anton
26-Feb-2005
[463]
Mmm.. see my note in --> RAMBO group.
JaimeVargas
26-Feb-2005
[464]
Ashley I only use the latest beta, because they usually fix something 
that has been bugging me currently that 1.2.48 for me.