buttonGroupF :: [(ModState, KeySym)] -> F (Either BMevents a) b -> F a b data BMevents = BMNormal | BMInverted | BMClick instance Eq BMevents instance Ord BMevents instance Show BMevents
buttonGroupF keys fudget
buttonGroupF
is used to create buttons. It converts mouse and keyboard events
to intermediate events that indicates the state of the button. It
depends on an argument fudget to provide the visual feedback and
translation of the intermediate events to high level events.
keys :: [(ModState, KeySym)]
fudget :: F (Either BMevents a) b
Messages of type BMevents
are sent to the argument fudget to indicate
the state of the button.
BMNormal
is sent when the button enters its normal, resting state. This
is also the inital state of the button.
BMInverted
is sent when the button is agitated, e.g. when the user
presses the mouse button.
BMClick
is sent when the button has been activated (when it has been
``clicked''), e.g. when the user presses and then
releases the mouse button while the pointer is over the button.
Note: a button can be agitated and then return its normal state without
being clicked (e.g. if the user removes the pointer from the button before
releasing the mouse button).