[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sc-devel] Transparent backgrounds in Views
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