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

World: r3wp

[View] discuss view related issues

Anton
4-Mar-2008
[7339]
I can help you with this, as I've done it a number of times, the 
most recently in my editor replacement (see Editors group).
Pekr
4-Mar-2008
[7340]
Anton - your editor work is awesome. I would like to ask, if you 
looked into VID3 styles already, or if you consider becoming VID3 
style's author? I can bet you would be one of the most prominent 
ones :-)
Anton
4-Mar-2008
[7341]
Well, thanks Pekr. I'm quite proud of the editor (which is why I 
keep mentioning it.)
Henrik
4-Mar-2008
[7342]
I wouldn't mind seeing an advanced editor built on top of the area 
style for R3
Anton
4-Mar-2008
[7343]
VID3... I've been finding it hard to be inspired in this area.
Henrik
4-Mar-2008
[7344]
need the style dialect to be finished first, so we can build all 
the basic styles
james_nak
4-Mar-2008
[7345]
Thanks to all of you for your input. That definitely puts me in the 
right direction (and keeps me from wasting any more time with "list".) 
 This morning I took a look at Carl's #29 cookbook and at least there's 
a fast way to get closer to what I'd like. I really appreciate your 
support.
james_nak
6-Mar-2008
[7346]
Is there a way to catch the "X" (close) button on a window. I'd like 
to offer a "Save File"
Henrik
6-Mar-2008
[7347x3]
yes, use insert-event-func for that and detect on event/close.
main-window-title: "my little app"

view/new/title center-face main main-window-title
insert-event-func func [face event] [
  switch/default event/type [
    close [

      either event/face/text = main-window-title [ ; only reacts when main 
      window is closed
        quit
      ][
        event
      ]
    ]
  ][

    event
  ]
]
the switch might be a little elaborate. I use it in case I need to 
detect on more things.
james_nak
6-Mar-2008
[7350]
Thanks Henrik!
DanielP
7-Mar-2008
[7351]
Hello, I search to implement drag'ndrop between 2 windows. How to 
proceed ?
Henrik
7-Mar-2008
[7352]
it's not possible in R2 VID
DanielP
7-Mar-2008
[7353x2]
ok, thanks
Is it possible by using View directly ?
Henrik
7-Mar-2008
[7355]
I'm not sure you can. Anton may know better than me.
Luis
7-Mar-2008
[7356]
Rebol2  Console can be drag destination:  http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=sys-port-drag-accept.r

Rebol3 can be drag destination on view (drag.r example in rebol3 
alpha) :  http://www.rebol.net/builds/rebol3/alpha/rebol29904031.zip
and  http://www.rebol.net/r3blogs/0098.html

About drag source look  at  http://www.rebol.net/cgi-bin/r3blog.r?view=0098#comments
DanielP
8-Mar-2008
[7357]
thanks, unfortunately R2 example need view/pro
Graham
8-Mar-2008
[7358]
2.7.6 test versions are available and have library freed.
DanielP
8-Mar-2008
[7359x2]
cool
how can I find this new version ?
[unknown: 5]
8-Mar-2008
[7361]
Were testing the final beta now and you should have it very soon.
amacleod
11-Mar-2008
[7362]
Graham, what does that mean: "Library freed"? Can you use dll's?
Graham
12-Mar-2008
[7363x2]
use
afaik ... I've got command so haven't tried it
DanielP
12-Mar-2008
[7365]
Hello ! Is use the halt function to stop  to freeze my graphical 
app and open Rebol console .How can I close the console to return 
to my app ("quit" close the app too) ?
Henrik
12-Mar-2008
[7366]
you can't close the console again, but you can continue the program 
by typing "do-events". that'll make VID start catching events in 
your program again.
Brock
13-Mar-2008
[7367]
Do you know if the possibility of closing the Console when restarting 
the Vid app will be possible in R3?
Henrik
13-Mar-2008
[7368x2]
since the R3 console will be VID3 based, possibly.
but nothing is built yet
Oldes
16-Mar-2008
[7370x3]
How to reset button state before unview?
l1: layout [btn "win1" [unview/only l1 view l2]] l2: layout [btn 
"win2" [unview/only l2 view l1]] view l1
once I click the win2 button the button from the first layout is 
still in the down state
Geomol
16-Mar-2008
[7373]
l1: layout [btn "win1" [face/state: false unview/only l1 view l2]] 
l2: layout [btn "win2" [face/state: false unview/only l2 view l1]] 
view l1
Will
24-Mar-2008
[7374]
how do I convert an %image.jpg to to a height of 100 and a cropped 
width of 200 ?
Henrik
24-Mar-2008
[7375]
I think you need to use draw for that.
Geomol
24-Mar-2008
[7376]
Should the height also be cropped?
Will
24-Mar-2008
[7377x2]
no
say I have 1200x 5000 adn I want to resize proportionally to a height 
of 100 and crop widht to 200
Geomol
24-Mar-2008
[7379x4]
If your height is 5000 and you resize to a height of 100, your width 
will be less than 100, if it initially were 1200!?
So you just wanna resize height, and not width in the first go?
If i1 is your original image, you can do:


i2: copy/part to-image layout [origin 0 image i1 as-pair i1/size/1 
100] 200x100

This will resize height to 100 and crop width to 200.
If you use DRAW, as Henrik suggest, the result will look prettier.
Henrik
24-Mar-2008
[7383x2]
maybe not, since downscaling in R2 DRAW does not support filtering. 
that's only possible in R3 DRAW.
upscaling will work, however.
Geomol
24-Mar-2008
[7385]
That's not what I see. Try:

i1: to-image layout [origin 0 box 300x150 red "An image"]

i2: copy/part to-image layout [origin 0 image i1 as-pair i1/size/1 
100] 200x100

view layout [image i1 image i2 box 300x100 effect [draw [image i1 
0x0 300x0 300x100 0x100]]]
Henrik
24-Mar-2008
[7386x3]
The eye is cheating you here. In fact it's just fuzzy, not antialiased. 
I've investigated this closely.
do http://www.hmkdesign.dk/rebol/thumbtest/thumbtest.r<--- try this 
and you'll see it.
(and that's why R2 DRAW is largely worthless for creating thumbnails. 
R3 is however very good at it. :-))