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

World: r3wp

[View] discuss view related issues

Janeks
18-Jul-2006
[5250]
Is it possible to change tray icon?
Cyphre
18-Jul-2006
[5251]
no at the moment
Sunanda
18-Jul-2006
[5252]
. (apologies for the dot, but the web shows this group has failed 
to sync on my machine)
Josh
18-Jul-2006
[5253]
Iterated faces.  A good reference to look at?  The Wiki seems to 
be missing some helpful info
Henrik
18-Jul-2006
[5254]
josh: http://www.rebol.com/docs/view-system.html#section-10
Anton
19-Jul-2006
[5255]
do http://home.wilddsl.net.au/anton/rebol/gui/iterated/iterated-face-drag.r

do http://home.wilddsl.net.au/anton/rebol/gui/iterated/iterated-face-drag-drop.r
Janeks
20-Jul-2006
[5256]
How to change part o f a color in gradient?
F.ex.

	at 535x100 box teal 30x315 effect [
		draw [
			fill-pen linear 0x0 0 315 90 1 1 red yellow green
			box 0x0 30x315
		]
	]


Now I have each color equal, but how to make so that f.ex. green 
is ~50%, Yellow ~30% and red ~20% of box?
Cyphre
20-Jul-2006
[5257]
This is not possible in the current version of DRAW. You have to 
'compose' more boxes to create linear gradients with different ratio 
of color spread at the moment.
Janeks
20-Jul-2006
[5258x2]
Is it possible to rotate feels, f.ex. progress bar so that it will 
be verical?
Vertical
Graham
20-Jul-2006
[5260x2]
just change the size
so, progress 5x30 instead of 30x5
Janeks
21-Jul-2006
[5262x3]
I need that progress color will go up!
Ah ok - I was just do not belive that unti testing mysefl!
;-)
Next question:
How to tell that text in 'area face should be auto wrapped?
Anton
21-Jul-2006
[5265]
These are all ways of specifying the same thing:
view layout [area wrap]
view layout [area para [wrap?: yes]]
view layout [area with [para: make para [wrap?: yes]]]

view layout [area with [append init [para: make para [wrap?: yes]]]]

and you can test a little bit faster by making the area nice and 
thin:
view layout [area 40 wrap]
Janeks
21-Jul-2006
[5266]
How is about clipboard for last version of view?
Is it possible to insert in clipboard port image?
Henrik
21-Jul-2006
[5267]
only text is allowed
Henrik
23-Jul-2006
[5268x2]
I have a small problem regarding event handling in TOOLBAR: Each 
icon consists of an icon frame face with a pane that contains the 
icon image and a text face.


The icon frame face has an ENGAGE event set for highlighting, doing 
the action of the button, etc. The containing faces both have their 
feel set to NONE.


Now when clicking on either the text and the image, the event seems 
to correctly bubble up to the icon-frame face, but OVER and AWAY 
events correspond to the face in which the event occurs, which can 
be for example the text face. So if you click on the text face and 
then drag away, the click is no longer valid, even if the mouse is 
still over the icon-frame face, because it detects OVER and AWAY 
for the face, I'm clicking and not the parent face.


This causes some clicks to be lost if you are clicking at the edge 
of the text face and accidentally moving the mouse away from the 
text face, say, the space between the icon and the text which is 
a natural place to click.


I've tried using DETECT, but this is greatly inefficient, because 
it processes all events.


I've noticed that the standard ICON face in VID behaves the same 
way. which I think is incorrect. Is there a way to transfer OVER 
and AWAY information from the parent face?
view layout [i: icon "Hello!"]


demonstrates this: Click and hold on the text and drag towards the 
icon. Or do the same from the icon towards the text. The click is 
lost.
Anton
23-Jul-2006
[5270]
So the face hierarchy looks like this:

tool-bar
       |
icon-frame
      /  \
    /      \
icon   text


I would suggest blowing away the feels of the icon and text and do 
all your event handling in icon-frame/feel.
Is there any reason you can't do that ?
Henrik
23-Jul-2006
[5271]
that's already what I'm doing. the problem is that the OVER and AWAY 
events seem to be from those faces with FEEL set to none anyway.
Anton
23-Jul-2006
[5272x6]
You're right, that's a confusing aspect of over and away events in 
the engage function.
I am quite positive I solved this before using a combination of feels 
somehow....
Yep, I was an expert on this 11 months ago, apparently.
do http://home.wilddsl.net.au/anton/rebol/doc/event-flow-diagram.r
Have a play with that and see if you can capture all the state changes 
you need.
I think now you probably have to have feel/engage in both the icon 
and text faces.
Henrik
23-Jul-2006
[5278x4]
neat program!
maybe it can be done by measuring the offset instead of relying on 
AWAY
apparently not directly...
making it possible to see where an OVER or AWAY came from would make 
this a whole lot easier.
Anton
23-Jul-2006
[5282]
Are you sure you need subfaces ? Is the text really essential as 
a separate face ? You might avoid all this confusion with feels by 
using a single face, which can show both an image and text natively, 
or use the draw dialect.
Henrik
23-Jul-2006
[5283]
text is required to be centered. this is not possible to do with 
draw accurately.
Anton
23-Jul-2006
[5284x2]
(I suspect you are aiming for a simple specification using existing 
VID styles icon and text. Is that true?)
Yes it is. It's fiddly though.
Henrik
23-Jul-2006
[5286]
I've tried and found it to be too hard to be worth the trouble. It 
depends on the font and the size of the font.
Anton
23-Jul-2006
[5287]
Calculating the size of the text is the most fiddly part. But I can 
help there.
Henrik
23-Jul-2006
[5288]
I won't be using DRAW.
Anton
23-Jul-2006
[5289x2]
I've just been doing that whilst making a tab-bar the last couple 
of days.
Yes, I don't think you need draw for this. What's the link again 
to your tool-bar demo ?
Henrik
23-Jul-2006
[5291x3]
see announce
I've redone some feel code so it responds much better now, but there 
are still problems. this is a different problem now with being unable 
to use the 'over function to determine whether the mouse is over 
the icon frame or not while the left mouse button is pressed.
so if you are clicking on top of the icon frame and move the mouse 
away, you can't cancel a click.
Anton
23-Jul-2006
[5294]
Mmm.. just quickly, looks to me like you don't need subfaces... but 
dinner time..
Henrik
23-Jul-2006
[5295]
highlighting requires two different effects, one for each face. also 
there are differences when showing icons and text, or only one of 
each.
Anton
23-Jul-2006
[5296]
Ok, so you need subfaces for those effects.
Henrik
23-Jul-2006
[5297]
oh well... perhaps DRAW is the right way forward to draw the image 
and then bottom align the text. maybe then it really can be done 
in one face.
Anton
23-Jul-2006
[5298]
can't you use font/valign: 'bottom ?
Henrik
23-Jul-2006
[5299]
yeah that seems to work