[Y-devel] Widgets in a canvas

James Harr james at grickle.org
Tue Feb 24 20:36:53 GMT 2004


This is a good idea, I still like the flexibility of being able to draw your 
own widgets. This allows you to do pretty much anything you want with it. 
It's sort of falling back on the original reason why X was so low level... 
They couldn't predict all the uses for it, so why not just give theprogrammer 
complete flexibility.

But in your proposal, I have two thoughts:
a) There's a good chance you'll want multiple widgets...
b) In that case you'll probably want to use layers (assign each widget to a 
layer, determining draw order) to create a predictable situation of "which 
widget wins if they overlap."

That creates a nice situation. You could just make a canvas the lowest level. 
Convenient? I think so.

You could even divide it further:
Layers - create multiple layers of widgets on top of each other
Position - allow positioning/sizing of a widget independent of its container.

Personally I like the idea of having both available if possible. The 
Layers/Position widget could be used for most situations, but the "draw this 
widget I have in this canvas" functionality would be nice for things we 
always think of... Such as creating a widget editor/generator mentioned in 
another thread.

Comments/Ideas/Votes?

Thanks,
James Harr

> How about a layout widget that can contain your button or checkbox, or 
whichever
> other widget, and give that widget the ability to have a background image 
that
> is actually a canvas widget, or just a way to have the client draw on the
> background of the layout widget as if it were a canvas?  I could indeed see
> many uses for this type of advanced layout widget.



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved