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.
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
EZ_ORIENTATION
EZ_FILL_MODE
EZ_SIDE
EZ_PADX
EZ_PADY
EZ_IPADX
EZ_IPADY
EZ_WIDTH
EZ_HEIGHT
EZ_EXPAND
EZ_WIDTH
EZ_HEIGHT
EZ_X
EZ_Y
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
EZ_GRID_COLUMN_CONSTRAINS
EZ_GRID_ROW_CONSTRAINS
Cell geometry of children widgets are set by the following two
configuration options
EZ_GRID_CELL_GEOMETRY
EZ_GRID_CELL_PLACEMENT
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.