[Y-devel] Widgets in a canvas
Lincoln Quirk lincoln at cognitoy.com
Tue Feb 24 20:54:30 GMT 2004
Well, I like these ideas. Perhaps a layered layout is what you're
looking for:
Make LayerLayout a layout (similar in the hierarchy to GridLayout) -- it
manages different widgets, so in that respect it is a layout. (I'm
having second thoughts about the name though...0
LayerLayout should have any number of layers. You can add layers, hide
them, reorder them, remove them, etc. I believe they should each be
buffered separately.
That way you can have a Canvas on a lower layer than your widgets, and
they should interact properly.
In addition, a layout that allows you to place widgets in terms of X/Y
coordinates may also be useful, but I don't have a good idea of how that
should be implemented yet.
A LayerLayout allows for easy tabbed dialogs, placing widgets above
background images, hiding large sections of the interface for whatever
reason, and so forth. It seems like a generally good idea.
Lincoln Quirk
On Tue, 2004-02-24 at 15:36, James Harr wrote:
> 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