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

World: r3wp

[View] discuss view related issues

Geomol
11-Feb-2007
[6739]
I have a problem with field and key in the same layout:

view layout [
	field
	key #"t" [alert "key: t"]
]


If I click in the field and try to enter a "t", the alert pop up. 
I'm doing this under OSX. Is it the same on other versions of View?
Henrik
11-Feb-2007
[6740]
Geomol, it's the same in Windows
Geomol
11-Feb-2007
[6741x3]
I'm wondering, why I haven't noticed this before, or maybe I have 
and forgot about it.
Is there a work-around?
Should it be RAMBOed?
Henrik
11-Feb-2007
[6744]
yes, I think it should
Geomol
11-Feb-2007
[6745]
I've put it in RAMBO.
Henrik
11-Feb-2007
[6746x2]
I wonder if I should put my proposal in RAMBO now as well, but I'd 
like the code to be approved here first...
Tests do show under OSX that the color bug afffects the display of 
images in buttons.
Izkata
11-Feb-2007
[6748x3]
It's the same in Linux, too - just came across it a couple of weeks 
ago
(Ubuntu)
*a couple of days ago
Anton
11-Feb-2007
[6751x4]
Geomol, here is a fix:
system/view/window-feel/detect: func [face event][
    either all [
        event/type = 'key 
        none? system/view/focal-face ; <--- added this line
        face: find-key-face face event/key
    ] [
        if get in face 'action [do-face face event/key] 
        none
    ] [
        event
    ]
]

view center-face layout [
	key #"t" [print "action"]
	field with [focus self]
]
(not well tested, but looks good.)
We should have checked RAMBO database - Romano posted this one three 
years ago
Do not detect hot-keys when a focal-face with caret is active
http://www.rebol.net/cgi-bin/rambo.r?id=3372&
Maxim
12-Feb-2007
[6755x4]
hum... I have the draw docs for AGG but it seems the gradient fills 
are (as usuall with rebol it seems) so documented, such that We have 
no real clue how the values change or what are the basis...
has anyone done some complement docs to describe things like the 
offet and grad-scale ?
ok... the examples after give a few clues...
hum... is it just me or should the minimum colors needed for the 
gradients be 2 ... is there really a reason why we need to put 3 
colors?  its seems like it messes up most of the fills...
Henrik
12-Feb-2007
[6759]
yes, I think gradients are quite hard and non-intuitive to do in 
DRAW
Maxim
12-Feb-2007
[6760x4]
hum... a yellow green blue gradient  give me a ring of BLACK right 
in the middle... not what I call very precise... maybe cyphre could 
explain the maths behind the gradients so we can understand  what 
we are doing?
somehow, it seems like its missing a color blend mode selection, 
multiply, add, screen, etc. right now its a ramp which fades to 0 
on each side, such that when two successive colors do not have any 
bit in common it creates an alpha channel premultiplication grey 
zone...
henrik... any tips you can give me to make it less painless?
since you've played with it a while.
Henrik
12-Feb-2007
[6764]
no, it took a lot of fiddling to get things right. I only played 
a bit with Gradient Lab, but it's not very flexible.
Maxim
12-Feb-2007
[6765]
it seems like using alpha gives better results, when combining with 
bg colors.
Henrik
12-Feb-2007
[6766]
I think Gradient Lab should be made into a useful tool, rather than 
just show off gradients.
Maxim
12-Feb-2007
[6767]
I'll build a few usefull nodes in liquidator... its almost ready 
for a first public show-case  :-)  I never thought it would be this 
quick.
Sunanda
12-Feb-2007
[6768]
A just-in feedback message to REBOL.org:
<<

How to find the documentation for the use of VID and RebGUI} description: 
{Hi;

I find the RebGUI is good, but how can I find the help document for 
the use of this package?

the wewpages in the website donot tell people how to use his software.

How to find the detalied documentation for VID? like how to build 
botton, box, drop-list,combo list?

It seems Rebol is weak in teaching people about how to use the GUI.

Normally people like to learn software quickly, so a good help documentation 
is always welcome.
Thanks,
>>

Can someone give me a useful list of URLs to pass on to the enquirer? 
Thanks.
Cyphre
12-Feb-2007
[6769x2]
Maxim, Henrik: I agree current DRAW gradients aren't the best solution 
and I'm aware about this issue from the time Shadwolf's requests. 
But this improvement will happen probably once the new 2.7.x release 
merge get to more stable state. As you might know Carl don't want 
to add new features until 2.7.x is at the same level like 1.3.2.
Sunanda: I think there is couple of good View documents directly 
on rebol.com: http://www.rebol.com/docs.html
Geomol
12-Feb-2007
[6771]
Thanks Anton! :-)
Maxim
12-Feb-2007
[6772x4]
cyphre, I realised that drawing two shapes and using alphas to blend 
between them is the best additive method so far... its obviously 
a little bit slower, but at least it looks good.
once we understand how the values work I guess its ok... there should 
just be a little bit more info on the fact that things like grad-start 
are in pixel distances...  it might seem obvious... but with my background 
in CG I was expecting shape size relative scale.  Its ok, as long 
as the info is made explict  :-)
a wish?  allow two color gradients ... I now understand  the middle 
color is used as a curve to bend the way the gradient occurs, but 
in many case a linear curve is all that's needed. especially since 
we can edit the start/end of the gradient.
(just my two cents ;-)
Ashley
12-Feb-2007
[6776]
How to find the documentation for the use of VID and RebGUI

 How about Desktop|Demos|EasyVID? Sounds like he wants a step-by-step 
 introductory tutorial. I'll think about how I can address this need 
 for RebGUI (my site makes the assumption that people are somewhat 
 familiar with VID already). Thanks for the heads-up.
Sunanda
12-Feb-2007
[6777]
Thanks Cyphre and Ashley......I should of course have asked in the 
!RebGui group
Cyphre
13-Feb-2007
[6778x2]
Maxim: I agree. There should be more info about the arguments. And 
yes, the need for 3 colors is just because the current gradient interpolation 
uses curve (this was some default AGG code we have used for DRAW 
but  now I think it would be better to rewrite it from scratch. The 
new code will use linear interpolator among other changes.)
re your wish: I'll try to add 2 color arg possibility. At the moment 
as a workaround you can easily compute the 'middle' value and use 
3 args insetad.
Maxim
13-Feb-2007
[6780x4]
thanks for the heads up... If you are going to rewrite it... please 
allow more selections in this kind of thing... curved interpolation 
IS much better, for things like shadows, for example... but the need 
to select filter types (from all available... not just one or two), 
interpolation curve types, start-end snap on beziers, things like 
this are all essential, if we want to allow the next REBOL to be 
able to properly compete.  


defaults are good and often this is all that is needed, but for any 
graphic app, this quickly becomes essential (as you will agree, on 
your own usage), and is a weekness of current toolset.
the other big weekness is our inability to extract any kind of data 
from the AGG computed visuals.  cv info (for a text curve, for example... 
to match a graphic to its corner) , curvature data (length, coord 
+ angle at offset,  etc), box size, centroid (for quick searching 
of  computed visuals), all of this is vastly faster (we are talking 
like 10000 times or more here) when done in binary and available.
but dumping top of my head since the topic was opened briefly  :-)
it might spur other ideas from other gfx coders.
Cyphre
13-Feb-2007
[6784x2]
yes, the new gradients will be even more configurable. Regarding 
the access to the AGG  internal representation. I have talked about 
 this with Carl and we agreed in R3 it would be allowed to do functional 
programming of DRAW blocks. But all this needs more thinking...
Maxim, regarding this: "somehow, it seems like its missing a color 
blend mode selection, multiply, add, screen, etc. right now its a 
ramp which fades to 0 on each side, such that when two successive 
colors do not have any bit in common it creates an alpha channel 
premultiplication grey zone..."

blending is not a part of gradient definition, look at Flash or SVG. 
Gradients work the same as in Rebol inthis case.
Anton
18-Feb-2007
[6786x3]
A style a day keeps the doctor away:

New idea for a style: A "FLATTEN-PANEL" is a PANEL which "explodes" 
its
pane directly into the parent face's pane. eg:

A normal PANEL and resultant face hierarchy:

	layout [
		panel [
			label
			field
			check
		]
	]

	window
		panel
			label
			field
			check
	
A FLATTEN-PANEL and resultant face hierarchy:

	layout [
		flatten-panel [
			label
			field
			check
		]
	]
	
	window
		label
		field
		check

Implementation and test:

	view window: layout [
		style flatten-panel PANEL with [
			append init [
				foreach face pane compose [

     face/offset: face/offset + (do bind [where] first find second :layout 
     [new-face:])
				]

    append get in get first find second :layout [new-face:] 'pane pane
				clear pane
			]
		]
		
		at 500x200
		flatten-panel [
			label "hello"
			field
			check
		]
	]
Full document here:
http://anton.wildit.net.au/rebol/doc/flatten-panel.txt
updated.