[Y-devel] Widget proposals
Lincoln Quirk lincoln at cognitoy.com
Thu Feb 26 03:23:15 GMT 2004
On Wed, 2004-02-25 at 20:25, James Harr wrote:
> In continuation of "Widgets in a canvas" i have two widget proposals:
>
> 1. LayerLayout: Provide layers for children widgets to use. It will be
> implemented as an array of structs (each struct will contain a widget and a
> layer number). This allows for layers to be negative. The array will be kept
> sorted by layer so a binary search can be employed for fast access to a
> specific widget.
>
> I'll implement these member functions:
> addWidget - add a widget (with a corresponding layer).
> deleteWidget - delete a widget (based on layer).
> modifyWidget - modify a widget's layer number.
> getWidget? - get a widget based on layer
>
> I would implement some sort of hiding, but widgets themselves should support
> hiding themselves, imho.
I had hiding in my original design because I was thinking of hiding an
entire layer at a time. Then I realized that each layer only has one
widget in it, so you are correct in saying that the widgets should
implement hiding themselves. :-) I like this design.
>
> 2. PositionLayout: Provide methods to state a specific size, of a single child
> widget. I'm still thinking this one out but it will allow pretty much any
> sort of sizing constraints for a child widget as well as alignment (IE -
> align an ok button right, give it only the size it requires, pad the rest).
Check the TaskList on the Wiki - you can write yourself in for the
LayerLayout, but I want to do PositionLayout.
https://y-win-wiki.jciteassist.org/y-win-wiki/TaskList
> Thanks,
> James Harr
Lincoln Quirk
--
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved