[PEAK] A layout and styling framework for UI components

Phillip J. Eby pje at telecommunity.com
Fri Dec 7 10:42:00 EST 2007


At 05:11 PM 12/7/2007 +0200, Peter Damoc wrote:
>What do you think about something like this:
><http://www.lucidtoolkit.org/layout_expression_language>http://www.lucidtoolkit.org/layout_expression_language

The peak.ui.layout stuff will be sort of like that, but with Python 
operators rather than strings, and it'll be built on top of the 
rendering module.


>The way I view it, GUI stuff creation has 3 steps:
>- widget creation
>- layout
>- event binding
>
>a lot of the spaghetti code I produced was due to the fact that I 
>wasn't disciplined enough to break code into this distinct steps.

All three of these things will be handled by stylesheet rules, in 
conjunction with layout/style hints.

One of the key ideas in the rendering framework is that the mechanics 
of creation and event binding (not to mention the details of concrete 
style information) should be kept separate from the laying out of 
high-level elements.

For example, rather than gluing together explicit spacing objects to 
separate child components, one can simply have the rules for a parent 
component add the spacing around the children.  Or one can 
temporarily "subclass" the sytlesheet to set the default font for the 
children, etc.




More information about the PEAK mailing list