Source codeContentsIndex
MenuItem
Description
The module MenuItem exports general resources for menu items.
Synopsis
class (GUIObject w) => MenuItem w
createMenuItem :: (MenuItem w) => Menu -> MenuItemKind -> (GUIOBJECT -> w) -> [Config w] -> IO w
class (GUIObject w) => HasColour w where
legalColourID :: w -> ConfigID -> Bool
setColour :: w -> ConfigID -> Colour -> IO w
getColour :: w -> ConfigID -> IO Colour
class (GUIObject w) => HasPhoto w where
photo :: Image -> Config w
getPhoto :: w -> IO (Maybe Image)
class (ButtonWidget w) => SelectButton w where
selectionState :: Toggle -> Config w
getSelectionState :: w -> IO Toggle
selectionStateSet :: w -> Event Toggle
class (SelectButton w) => ToggleButton w where
toggleButton :: w -> IO ()
class (GUIObject w) => HasAccelerator w where
accelerator :: String -> Config w
getAccelerator :: w -> IO String
buttonColours :: (HasColour w) => w -> ConfigID -> Bool
Documentation
class (GUIObject w) => MenuItem w
Menu items instantiate the abstract class MenuItem.
Instances
MenuItem MenuCascade
MenuItem MenuCheckButton
MenuItem MenuCommand
MenuItem MenuRadioButton
MenuItem MenuSeparator
createMenuItem :: (MenuItem w) => Menu -> MenuItemKind -> (GUIOBJECT -> w) -> [Config w] -> IO w
Internal.
class (GUIObject w) => HasColour w where
Coloured objects instantiate the class HasColour.
Methods
legalColourID :: w -> ConfigID -> Bool
Internal.
setColour :: w -> ConfigID -> Colour -> IO w
Internal.
getColour :: w -> ConfigID -> IO Colour
Internal.
Instances
HasColour BitMap
HasColour Box
HasColour Button
HasColour Canvas
HasColour (CheckButton a)
HasColour (ComboBox a)
HasColour Editor
HasColour (Entry a)
HasColour Frame
(HasInsertionCursor w, Widget w) => HasColour (ICursor w)
HasColour IconBar
HasColour Image
(HasIndicator w, SelectButton w) => HasColour (Indicator w)
HasColour (InputForm a)
HasColour (EntryField a b)
HasColour (TextField a b)
HasColour (EnumField a b)
HasColour (RecordField a b)
HasColour Label
HasColour LabelFrame
HasColour (ListBox a)
HasColour Menu
HasColour MenuButton
HasColour MenuCascade
HasColour MenuCheckButton
HasColour MenuCommand
HasColour MenuRadioButton
HasColour Message
HasColour NoteBookPage
HasColour (Notepad a)
HasColour (OptionMenu a)
HasColour Pane
HasColour (Prompt a)
HasColour (RadioButton a)
HasColour (Scale a)
HasColour ScrollBar
(HasColour a, HasScroller a) => HasColour (ScrollBox a)
HasColour SelectBox
(HasSelection w, Widget w) => HasColour (Selection w)
(HasSlider w, GUIObject w) => HasColour (Slider w)
HasColour Space
HasColour SpinButton
HasColour TextTag
(CItem c) => HasColour (TreeList c)
class (GUIObject w) => HasPhoto w where
Image containers instantiate the class HasPhoto.
Methods
photo :: Image -> Config w
Associates an image container (e.g. a label) with the given image.
getPhoto :: w -> IO (Maybe Image)
Gets the image associated with the given image container.
Instances
HasPhoto Button
HasPhoto (CheckButton a)
HasPhoto (Dialog a)
HasPhoto ImageItem
(HasIndicator w, SelectButton w) => HasPhoto (Indicator w)
HasPhoto Label
HasPhoto MenuButton
HasPhoto MenuCascade
HasPhoto MenuCheckButton
HasPhoto MenuCommand
HasPhoto MenuRadioButton
HasPhoto (RadioButton a)
(CItem a) => HasPhoto (TREELISTOBJECT a)
class (ButtonWidget w) => SelectButton w where
A select button can be selected or not selected.
Methods
selectionState :: Toggle -> Config w
Sets the selection state of the select button.
getSelectionState :: w -> IO Toggle
Gets the selection state of the select button
selectionStateSet :: w -> Event Toggle
Returns an event for selection actions.
class (SelectButton w) => ToggleButton w where
The state of a ToggleButton can be toggled.
Methods
toggleButton :: w -> IO ()
Toggles the state of a toggle button.
class (GUIObject w) => HasAccelerator w where
Menu items can have an optional text to display as a reminder about a keystroke binding.
Methods
accelerator :: String -> Config w
Sets the accelerator text.
getAccelerator :: w -> IO String
Gets the accelerator text.
Instances
HasAccelerator MenuCascade
HasAccelerator MenuCheckButton
HasAccelerator MenuCommand
HasAccelerator MenuRadioButton
buttonColours :: (HasColour w) => w -> ConfigID -> Bool
Internal.
Produced by Haddock version 0.3