windowF :: [XCommand] -> K a b -> F a b
windowF startcmds fkernel
windowF
is used to create ``leaf'' windows, i.e windows that are the
basic building blocks, and don't contain any other windows. They are
used to create a wide range of
basic user interface elements, e.g. displays, input fields, buttons, etc.
startcmds :: [XCommand]
ChangeWindowAttributes
command
to set window attributes. One important window
attribute is the event mask, where you typically
include things like ExposureMask
, ButtonPressMask
,
KeyPressMask
, and so on. (An empty attribute list
implies the default event mask, which is the empty
event mask.)
fkernel :: K a b
The fudget is expected to cooperate with the dynamic layout mechanism. This amounts to the following:
LayoutLimits
, which has an
argument of type LayoutRequest
:
data LayoutRequest = Layout Size Bool Bool | LayoutMakeVisible Rect | LayoutScrollStep Int | LayoutName String | LayoutPlacer Placer | LayoutSpacer Spacer | LayoutHint LayoutHint | LayoutDoNow | LayoutDestroy
The constructor Layout
is used to specify the layout. The
first argument to Layout
is the minimum initial size of
the window. The second and third arguments determine whether
the horizontal and vertical size are fixed, respectively. If
these are set to True
, layout functions of enclosing
fudgets will try to keep the size of this window fixed, and let
other fudgets change in size if the enclosing shell window is
resized. If they are set to False
, this fudget is likely to be
resized when the enclosing shell window is resized.
LayoutSize
, the only argument of which is
the new size of the window. The fudget should adjust its
behaviour accordingly.
windowF
:
displayF, stringF.
Related combinators: groupF.
Dynamic Layout.
Fudget kernel programming: K, putK, getK, nullK, XCommand, XEvent, LayoutRequest.
startcmds
argument is redundant, since the commands could be output
by the fudget kernel itself.