[Y-devel] Widgets in a canvas
James Harr james at grickle.org
Tue Feb 24 21:30:52 GMT 2004
> Well, I like these ideas. Perhaps a layered layout is what you're
> looking for:
Yeah, I'm just proposing both ideas, being able to draw widgets in a canvas, a
placement widget, and a layering widget. All are useful on their own levels.
> 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
Good point...
LayerLayout
PositionLayout (place a widget at a specific place).
> 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.
Well, buffering each layer would use a lot of memory. Canvases are self
buffering so we don't have to worry about them, and simple widgets are easy
to draw and will eventually be very optimized as well. And a buffer for the
entire window will alleviate most of this stress.
Remember that most layers won't be really complex like HTML (which would be
where widget rendering in a canvas would be very suitable since HTML pages
sometimes need to do some weird stuff with widgets).
> That way you can have a Canvas on a lower layer than your widgets, and
> they should interact properly.
You could also put a canvas on a higher layer (remember alpha channel) to do
some stuff if you needed.
> 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.
Yeah.. I think having a separate widget that simply creates a small box for a
child widget would be the best way to implement this, so it could be used in
virtually everything. You could have different methods for sizing it.
Specific size with x/y coordinates, or specify a margin for each side on the x
axis as well as the y, or have it centered and be 'width' wide. There's
several possibilities that could be combined into some sort of placement
widget that would be nice.
This allows it to be used anywhere, not just in layering.
> 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.
Yes this is a good idea however I think we should make a separate tab widget
because in tabs most people want to hide everything in one tab, not hide just
a few things. When you want to hide just a few layers you really get into
very specialized activity.
It's useful, yet I don't think that it's useful enough to implement tabbing in
this manner as it makes tabs very very complex.
I have lots of stuff (laundry,homework,taxes,etc) to do so I need to stop
going through the mailing list :) I'll check it tomorrow.
Thanks,
James Harr
> 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