EZ
Up Prev Next Contents


1.6 Geometry Management

The purpose of the geometry manager is to automate widget layout. Each widget in EZwgl has attributes that control the placement of children widgets as well as attributes to hardcode the geometry of widgets. Unless absolutely necessary, it is recommended that you do not hard code the geometry of your widgets.

EZwgl implements two geometry managers: a simple (default) geometry manager that arranges children widgets in one row or one column, and a more sophiscated grid bag geometry manager that arranges children widgets across mutiple rows and columns.

1.6.1 The Default Geometry Manager

The default geometry manager arranges children widgets in one row or one column. To compute the layout, it uses the following set of attributes of container widgets

and the following set of attributes of children widgets

1.6.2 The Grid Bag Geometry Manager

The grid bag geometry manager arranges children widgets in multiple rows and columns. It is more powerful and flexible than the default geometry manager. The down side is that it is not very intuitive and can be extremly complex.

The grid bag geometry manager uses the row/column contrains of the container widget and cell geometry attributes of children widgets to compute the layout. Row/column contrains are set by the following configuration options

Cell geometry of children widgets are set by the following two configuration options

1.6.3 About EZ_PROPAGATE

Geometry managers in EZwgl use a recursive algorithm to compute the layout of widgets. If the geometry of a widget changes, the change by default propagates to the whole widget tree. If your interface has many widgets packed as descendants of one toplevel widget, the perfermence may not be satisfactory if the geometry of leave widgets change constantly. Updating the geometry and move/resize/redisplay all widget windows can be slow. This is especially noticable if the application is running on a different machine across the network.

The attribute EZ_PROPAGATE is designed to alter the the default behavior about propagating geometry changes. When set True for a widget, change of geometry of the widget will no longer propagate.


Up Prev Next Contents

HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>