| |
The pack and grid action families are quite
similar in the actions they offer. In the following table, manager
can be either pack or grid. Also, WIDGET_NAMES
represents a sequence of one or more arguments and not a list.
manager configure WIDGET_NAMES ?OPTIONS? -
This action initiates or reconfigures geometry management for a
particular master and slave. In normal usage the action name configure
is omitted and this command looks like
manager WIDGET_NAMES ?OPTIONS?
In other words, executing pack or grid without a specified action
will cause the configure action to be chosen.
For how to use this action with pack, see below in
Slicing,
Slicing for Size Changes, and
The Cavity.
For how to use this action with grid, see below in
An Array of Cells.
For options that pack and grid have in common see below in
Padding. For options that are not in common but have a similar
purpose, see
Placing Widgets more Carefully.
manager forget WIDGET_NAMES - Terminates manager's
geometry management of all the widgets whose names are listed. If a widget
exists but is not under geometry management by manager, that is OK nothing happens. Note that this command does not destroy widgets but
that destroying a widget also takes it out of geometry management.
manager info WIDGET_NAME - Returns information about how the
geometry manager is managing the named widget. Use this when it is known
that WIDGET_NAME is a widget that is under geometry management by
manager. Behavior in other circumstances varies a bit between pack and
grid.
manager propagate WIDGET_NAME BOOLEAN - Normally, a master's
size is adjusted to what is needed by its slaves. If you want a master to
ignore the needs of its slave, execute this action with false.
A use for pack propagate is given in
Tricks for Using Pack.
manager slaves WIDGET_NAME - Returns a list of the designated
widget's slaves. Of course, this list may be empty. Use for known
widgets. If the widget is not a master of any slaves under manager,
the empty list will be returned.
The elements of this list are under geometry management by manager.
The named widget may not be.
|
Exercise 13.1a -
Finish implementing this procedure,
proc forgetGeometry Master { ... }
so that all widgets that are (direct or indirect) slaves of Master are
removed from geometry management. Geometry management here includes widgets
managed by pack or grid.
This is a paper and pencil exercise as it will be kind of hard to test
forgetGeometry until you know how to configure geometry management under
both pack and grid.
Solution
|
|