[Y-devel] Widget proposals
James Harr james at grickle.org
Thu Feb 26 01:25:42 GMT 2004
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.
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).
Comments/ideas/Flames?
Any ideas before I attempt coding them? (I'm still learning how everything
works right now, but I'll try the layers first).
Thanks,
James Harr
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved