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

World: r3wp

[View] discuss view related issues

james_nak
12-Aug-2005
[2185]
Anton, I thought your example was superb. I started to adapt it to 
my "grid" of toggles but as usual I'm not thoroughly understanding 
what's going on and I can't make my 4 x 48 grid without the rows 
being the same toggle.
[unknown: 10]
13-Aug-2005
[2186]
Is it or isnt it...the mouse-wheel in rebol..? looks not...
Pekr
13-Aug-2005
[2187x3]
it is ...
http://www.rebol.com/docs/view-system.html#section-5.10- look at 
scroll-line and scroll-page events ...
Some week or two ago someone posted kind of visual app to see even-flow 
... maybe link could be reposted here, but dunno if it featured mouse 
wheel events ....
[unknown: 10]
13-Aug-2005
[2190]
Thanks... !
PhilB
13-Aug-2005
[2191]
You can process mouse wheel events in view .... AltMe does it for 
example .... I believe that the event type is  .... event/type = 
'scroll-line
[unknown: 10]
13-Aug-2005
[2192]
Does anyone have a good performance with Rebol/view and i.e. Hummingbird 
Remote Desktop?  Seems Rebol is quiet slow here where GTK GUI is 
flashing over my screen my Rebol gui's do need far more time..
Any hint of tip is welcome..
Graham
13-Aug-2005
[2193x2]
I previously used this for buttons with images :


view layout [ button "Reply" 60 font [align: 'right] myimage effect
[] ]

but this doesn't work for btn

view layout [ btn "Reply" 60 font [align: 'right] myimage effect
[] ]
myimage: load 64#{
R0lGODlhDwAMALMPAKnZ+P/yqvSs/83x/fnP//3kj/GT////9f/9zwAAAP//6eT3
/Hd8oUNJdvTReAAAACH5BAEAAA8ALAAAAAAPAAwAAARX8MnHap1YsnMUCkymKdzx
FSHGIGR3JsnUBHRROHhCJGmzBp9AQbeDJRoDBqhCJAiexwWAsVg0nwLDcTo4VHVP
g/hIrQ7Oiaxxewa43QltQ9Ko2++w+SMCADs=
}
Chris
14-Aug-2005
[2195]
view layout [btn "Reply" 60 effect [extend draw [image 5x5 myimage]] 
para [origin: 20x2]]
Graham
14-Aug-2005
[2196]
Kewl .. thanks.
Anton
14-Aug-2005
[2197x5]
James, what do you want to do with your grid of toggles ? (sounds 
like could be used for an audio application, like drum patterns). 
Do you want them to have different texts and colors as well, etc. 
?
Here is a demo of a box receiving mouse scroll-wheel events:
view layout [b: box navy feel [engage: func [face action event][print 
[event/type event/offset]]] do [focus b]]
In my recent explorations of the view system, I found it necessary 
to see what is going on.

This program shows detect, engage and over functions in action for 
a face and its subface:
http://www.lexicon.net/antonr/rebol/doc/event-flow-diagram.r
(this doesn't show scroll-wheel events, but it does if you FOCUS 
the first face in the layout. eg.
	layout [... b: big-label ... do [focus b] ]
james_nak
14-Aug-2005
[2202]
Anton, again thanks for your expert help. What I am trying to do 
is to set up a grid that has 15 minute increments as toggles for 
a whole day. To make it easier for the user, I wanted to have the 
4 columns: morning, afternoon,evening and night. Your program helped 
me with getting the rows to be different but the columns were the 
same. Just minutes ago the idea came to me that perhaps I have been 
approaching it all wrong and the simple answer (although not too 
elegant perhaps) was to just create 4 individual lists across. It 
works so now I can clean up my "scratch" app and move on to making 
the actual tool. Thanks Anton. You don't know how much you have helped.
Anton
14-Aug-2005
[2203x7]
James, I'm on to it. Shouldn't be hard.
http://www.lexicon.net/antonr/rebol/gui/iterated/grid-of-toggles.r
Are events really comparable? It looks like some events are sent 
twice:
mold-event: func [e][remold [e/1 e/2 e/3 e/4 e/5 e/6 e/8 e/9 e/10]]
old-event: none
view layout [
	b: box navy feel [
		detect: func [face event][
			print [same? old-event event mold-event event]
			old-event: event
		]
	]
]
(hold the mouse over the blue box, look for TRUE at the left)
Is it really that the same event is sent twice ?
(or are events not properly comparable with SAME?)
james_nak
14-Aug-2005
[2210]
Anton, wow, you make it seem so easy. You really understand how Rebol 
works. Thanks. That's a much more elegant way than I had done.
Pekr
15-Aug-2005
[2211x5]
I tried to define my own stylesheet. I used backdrop, but it does 
not seem to adapt to resizing. So I used backeffect, but it seems 
to me I can't use it inside stylize/master?
hmm, even backeffect is buggy .... even without resizing it does 
not cover whole background, oh my ...
it seems to me, that backeffect is recalculated wrongly, if 'resize 
window option is used. Can anyone confirm? It seems as low-level 
buffering bug - I can see background screen underneath :-)
view/options layout [backeffect compose [gradient 1x1] btn "Quit" 
[quit]] [resize]
... sorry if there is bug in above code, wrote it off-hand ...
Anton
15-Aug-2005
[2216x4]
Cool James, but it can be yet more elegant, using a single iterated 
face instead of four (one for each column), but it's not a concern 
for your app, as you have a fixed, small number of columns (4).  
If it was a grid of large or "infinite" width, then you would better 
program the list's pane function yourself.
Pekr, this is an old problem, as I recall. Now what was the solution 
again..?
;Found it: You have to WAIT:

view/new lay: layout [size 200x200 bd: backdrop blue effect [gradient]]
bd/size: lay/size: lay/size + 40x40  ;== 240x240
show lay
wait 0.01
You can notice some other quirky bugs related to resizing the window 
and backdrop, too.
Chris
15-Aug-2005
[2220x2]
; It seems snappier to apply backdrop and effects to 'lay itself, 
and works with resize:
lay: layout [size 200x200 backcolor blue]
lay/effect: [gradient]
view/options lay [resize]
'Seems' being the operative word -- I haven't explored potential 
downsides...
Anton
15-Aug-2005
[2222]
Yes, that's probably better. Pekr, BACKCOLOR and BACKEFFECT change 
the color and effect of the window face, while BACKDROP creates a 
new face and puts it in the window-face/pane (like any other style).
Chris
15-Aug-2005
[2223]
Or asked, why backdrop doesn't  apply to the window face...
Anton
15-Aug-2005
[2224]
Well, because BACKDROP is a face, you can do more stuff with it.
Chris
15-Aug-2005
[2225x2]
'course this'd be better than my example: [size 200x200 backcolor 
blue backeffect [gradient]]
I suppose, it's a shame you can't manipulate the window face from 
VID though (with those exceptions)
Anton
15-Aug-2005
[2227]
Yes, a /with refinement might be good.
Pekr
15-Aug-2005
[2228x6]
That guys, but those are by-solutions. I regard it being bug - background 
is background, no matter if you resize or not :-) Rebol resizing 
is rather weak anyway - I have seen no other app, which freezes its 
UI when you resize its window ....
That = thanks ...
I would like to ask for your experience with UI methodology. I am 
about to create small system, featuring "many" screens, as as I am 
not experienced with more complete UI with Rebol, I would like to 
ask for assistance.
If you look at IOS for e.g., there is something I don't like about 
it - UI inconsistency - some reblets do feature cancel button, some 
don't, you can find the same buttons with different screens at different 
positions ...
I would like to ask, what aproach do others take?
E.g., with some older scripts, I used 'panel, for grouping buttons, 
as it allowed me for kind of "sub-layout" (reset coordinates). My 
typical screen will feature "menu buttons" (as I don't want to use 
menu, as none is standard in VID yet and choise is ugly - both in 
look and in behavior), grid, and I want "Add, Edit, Delete" buttons 
(probably on the right side of grid, alligned to top of grid vertically 
etc.
MikeL
15-Aug-2005
[2234]
Petr,  In a recent production application, here is what we recommended 
to the users in a web based environment and they liked enough to 
support us with our standards group:

1. tab boxes to cut down on many screens (or to give appearance of 
that) and saves on some trips to the server
2. flyout menus to allow more intuitive navigation

3. breadcrumbs to show they where they are now and how to get back 
to a higher plane

This was a pretty big step forward from the very plain html screens 
which they had been using before with more roundtrip activity.

We prototyped the system in HTML using REBOL CGI functions and got 
some pretty detailed flow before the project was launched.

Maybe your many screens solution should look at those things. I am 
assuming you are creating a View application.