WReq - requests made by child widgets.
A component will for most of the time receive and obey commands passed to it, but sometimes requests need to go the other way. An example is when some wordy guy overflows and input field and a larger type-in window is needed to display the outpourings. This is handled by the text input widget by requesting its parent for more space.
Note that these are requests, so the child cannot assume that the request will be fulfilled, the parent is free to do whatever it likes with the request (i.e. toss it).
data WReq
= {-
most of the time components manages to deal with
redisplays locally, but if for some reason a component is unable
to do so, a request for redisplay is issued.
-}
RedisplayReq
{-
ResizeReq notifies the parent that a child is in need of
more space (or perhaps less). The parent will then mull a bit
over the request and compute a new size for the child, which
is then communicated by sending a Resize command.
The CompassDirection specifies which point of the child's bounding
box that should remain fixed during the attempted resize, i.e.,
ResizeReq (20,20) SouthWest
will (hopefully) cause the child bounding box to remain fixed within
the parent coordinate system, just set its size to (20,20) units.
GeoNotify is similar, informing the parent that its geometric
requirements (i.e. nat.size, min. size etc.) has changed. This is
potentially useful for layout combinators, as they will then
correctly invalidate any cached info and re-fetch geometric info
for that child.
-}
| ResizeReq Size CompassDirection
| GeoNotify
{-
GrabReq asks the parent if it can get the device input focus, i.e.,
all device events forwarded to the parent should automatically get
forwarded to this child.
UnGrabReq is the inverse, the child asking if it can loose focus.
This request is always honoured.
-}
| GrabReq DeviceHandler
| UnGrabReq
{-
DieReq is the inverse of CloseWidget in WComm, and is
for the situations where the child wants to terminate
without the parent having issued a CloseWidget
command/request. The parent could interpret this as signalling
that a terminating condition has been reached, and propagate the
shutdown request upwards.
-}
| DieReq