[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Transparent backgrounds in Views



well, looking at the code, we would need to introduce another for- loop, but then it would work as expected.


On Dec 2, 2007, at 3:20 PM, Sciss wrote:

thanks. i have no insight into the code, but maybe it's just that the drawing for-loop needs to run in reverse direction!

Am 02.12.2007 um 07:26 schrieb Jan Trutzschler:

yes you're right, i would need to look into that. Not sure at the moment how to change the mouse focus in sc.


On Dec 1, 2007, at 9:42 PM, Sciss wrote:

on a related issue, jan, i wanted to ask you if you think it's possible to change the z-order of gadgets in cocoa GUI. the problem is things like the example from thor:

GUI.cocoa;
GUI.swing;
(
var size;
size = 12;
a = GUI.window.new("test", Rect(200 , 450, 10 + (size * 17), 10 + (size * 17))).front;


b = GUI.slider2D.new(a, Rect(0, 0, size * 17, size * 17))
	.knobColor_(Color.blue)
	.x_(0.8)
	.background_(Color.green.alpha_(0.0))
//	.fillColor_(Color.blue);
	;

c = GUI.slider2D.new(a, Rect(0, 0, size * 17, size * 17))
	.knobColor_(Color.red)
	.x_(0.4)
	.background_(Color.green.alpha_(0.0))
)

they are identical in cocoa and swing, but in cocoa the red slider receives mouse actions, in swing the blue one; that is, i adopted the z-ordering of cocoa by putting earlier created views in front of those created later, but i have no influence on the mouse tracking (java is doing that for me), so gadgets painted in front of others have priority regarding mouse tracking. i think that behaviour is logical. so my question is if it would be possible to

a) reverse the drawing order of gadgets in cocoa GUI without reversing the mouse priorities b) alternatively, reversing the mouse priorities without reversing the drawing order

if this is solved, people could safely use layered gadgets with both GUI kits... i think variant a) is better because it kind of sounds logical that views created later appear on top of old ones.

as i said, in SwingGUI i cannot decouple the painting and mouse focus order, so if that's possible in the cocoa GUI, it would be quite useful IMO...

ciao, -sciss-




Am 01.12.2007 um 20:05 schrieb Jan Trutzschler:

Thor,

note:
there is not fillColor in SC2DDSlider. remove that and it does work.
j.

On Dec 1, 2007, at 7:50 PM, thor wrote:

But what about SC2DSlider? The code pasted below does not do that.

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel