¤ buttonGroupF, BMevents

Types

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

Synopsis

buttonGroupF keys fudget

Description

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.

Arguments

keys :: [(ModState, KeySym)]
Key equivalent list. Instead of clicking on the button, a combination of modifiers and a key from the list can be pressed.
fudget :: F (Either BMevents a) b
A fudget that handles the visual feedback and output suitable high level messages.

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).

See Also

buttonF, toggleButtonF, buttonBorderF, pushButtonF.