Source codeContentsIndex
Configuration
Description
Basic types and classes concerning widget configuration.
Synopsis
class (GUIObject w) => HasColour w where
legalColourID :: w -> ConfigID -> Bool
setColour :: w -> ConfigID -> Colour -> IO w
getColour :: w -> ConfigID -> IO Colour
background :: (ColourDesignator c, HasColour w) => c -> Config w
getBackground :: (HasColour w) => w -> IO Colour
foreground :: (ColourDesignator c, HasColour w) => c -> Config w
getForeground :: (HasColour w) => w -> IO Colour
activeBackground :: (ColourDesignator c, HasColour w) => c -> Config w
getActiveBackground :: (HasColour w) => w -> IO Colour
activeForeground :: (ColourDesignator c, HasColour w) => c -> Config w
getActiveForeground :: (HasColour w) => w -> IO Colour
disabledForeground :: (ColourDesignator c, HasColour w) => c -> Config w
getDisabledForeground :: (HasColour w) => w -> IO Colour
fg :: (ColourDesignator c, HasColour w) => c -> Config w
bg :: (ColourDesignator c, HasColour w) => c -> Config w
hasBackGroundColour :: (HasColour w) => w -> ConfigID -> Bool
hasForeGroundColour :: (HasColour w) => w -> ConfigID -> Bool
class (GUIObject w) => HasSize w where
width :: Distance -> Config w
getWidth :: w -> IO Distance
height :: Distance -> Config w
getHeight :: w -> IO Distance
size :: Size -> Config w
getSize :: w -> IO Size
class (GUIObject w) => HasPosition w where
position :: Position -> Config w
getPosition :: w -> IO Position
class (HasSize w, HasPosition w) => HasGeometry w where
geometry :: Geometry -> Config w
getGeometry :: w -> IO Geometry
class (GUIObject w) => HasCanvAnchor w where
canvAnchor :: Anchor -> Config w
getCanvAnchor :: w -> IO Anchor
class (GUIObject w) => HasBorder w where
borderwidth :: Distance -> Config w
getBorderwidth :: w -> IO Distance
relief :: Relief -> Config w
getRelief :: w -> IO Relief
class (GUIObject w, GUIValue v) => HasValue w v where
value :: v -> Config w
getValue :: w -> IO v
class (GUIObject w, GUIValue v) => HasText w v where
text :: v -> Config w
getText :: w -> IO v
class (GUIObject w) => HasFont w where
font :: (FontDesignator f) => f -> Config w
getFont :: w -> IO Font
class (GUIObject w) => HasUnderline w where
underline :: Int -> Config w
getUnderline :: w -> IO Int
wraplength :: Int -> Config w
getWraplength :: w -> IO Int
class (GUIObject w) => HasJustify w where
justify :: Justify -> Config w
getJustify :: w -> IO Justify
class (GUIObject w) => HasGrid w where
setgrid :: Toggle -> Config w
getGrid :: w -> IO Toggle
class (GUIObject w) => HasOrientation w where
orient :: Orientation -> Config w
getOrient :: w -> IO Orientation
class (GUIObject w) => HasFile w where
filename :: String -> Config w
getFileName :: w -> IO String
class (GUIObject w) => HasAlign w where
align :: Alignment -> Config w
getAlign :: w -> IO Alignment
class HasIncrement w a where
increment :: a -> Config w
getIncrement :: w -> IO a
class (GUIObject w) => HasEnable w where
state :: State -> Config w
getState :: w -> IO State
disable :: Config w
enable :: Config w
isEnabled :: w -> IO Bool
class (GUIObject w) => HasAnchor w where
anchor :: Anchor -> Config w
getAnchor :: w -> IO Anchor
class (GUIObject w) => HasBBox w i where
bbox :: w -> i -> IO (Maybe (Distance, Distance, Distance, Distance))
Documentation
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)
background :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the background colour.
getBackground :: (HasColour w) => w -> IO Colour
Gets the background colour.
foreground :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the foreground colour.
getForeground :: (HasColour w) => w -> IO Colour
Gets the foreground colour.
activeBackground :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the active background colour.
getActiveBackground :: (HasColour w) => w -> IO Colour
Gets the active background colour.
activeForeground :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the active foreground colour.
getActiveForeground :: (HasColour w) => w -> IO Colour
Gets the active foreground colour.
disabledForeground :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the disabled foreground colour.
getDisabledForeground :: (HasColour w) => w -> IO Colour
Gets the disabled foreground colour.
fg :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the foreground colour.
bg :: (ColourDesignator c, HasColour w) => c -> Config w
Sets the background colour.
hasBackGroundColour :: (HasColour w) => w -> ConfigID -> Bool
Internal.
hasForeGroundColour :: (HasColour w) => w -> ConfigID -> Bool
Internal.
class (GUIObject w) => HasSize w where
Objects with a configureable size instantiate the class HasSize.
Methods
width :: Distance -> Config w
Sets the object's width.
getWidth :: w -> IO Distance
Gets the object's width.
height :: Distance -> Config w
Sets the object's height.
getHeight :: w -> IO Distance
Gets the object's height.
size :: Size -> Config w
Sets the object's width and height.
getSize :: w -> IO Size
Gets the object's width and height.
Instances
HasSize Arc
HasSize BitMap
HasSize Box
HasSize Button
HasSize Canvas
HasSize (CheckButton a)
HasSize (ComboBox a)
HasSize Editor
HasSize EmbeddedCanvasWin
HasSize (Entry a)
HasSize Frame
(HasInsertionCursor w, Widget w) => HasSize (ICursor w)
HasSize IconBar
HasSize Image
HasSize (InputForm a)
HasSize (EntryField a b)
HasSize (TextField a b)
HasSize (EnumField a b)
HasSize (RecordField a b)
HasSize Label
HasSize LabelFrame
HasSize Line
HasSize (ListBox a)
HasSize MenuButton
HasSize MenuCascade
HasSize MenuCheckButton
HasSize MenuCommand
HasSize MenuRadioButton
HasSize MenuSeparator
HasSize Message
HasSize NoteBook
HasSize (Notepad a)
HasSize (OptionMenu a)
HasSize Oval
HasSize PanedWindow
HasSize (RadioButton a)
HasSize Rectangle
HasSize (Scale a)
HasSize (Slider (Scale a))
HasSize ScrollBar
HasSize (ScrollBox a)
HasSize SelectBox
HasSize Separator
HasSize SpinButton
HasSize TextItem
(CItem c) => HasSize (TreeList c)
(Window w) => HasSize w
class (GUIObject w) => HasPosition w where
Objects with a configureable positon (e.g. canvas items) instantiate the class HasPosition.
Methods
position :: Position -> Config w
Gets the object's position.
getPosition :: w -> IO Position
Sets the object's position.
Instances
HasPosition Arc
HasPosition BitMapItem
HasPosition EmbeddedCanvasWin
(Window w) => HasPosition (Icon w)
HasPosition ImageItem
HasPosition (NotepadItem a)
HasPosition Oval
HasPosition Rectangle
HasPosition TextItem
(Window w) => HasPosition w
class (HasSize w, HasPosition w) => HasGeometry w where
Objects with a configureable size and position instantiate the class HasGeometry.
Methods
geometry :: Geometry -> Config w
Sets the object's geometry.
getGeometry :: w -> IO Geometry
Gets the object's geometry.
Instances
HasGeometry Arc
HasGeometry Oval
HasGeometry Rectangle
(Window w) => HasGeometry w
class (GUIObject w) => HasCanvAnchor w where
Canvasitems with an anchor position on the canvas instantiate the class HasCanvAnchor.
Methods
canvAnchor :: Anchor -> Config w
Sets the anchor position on the canvas.
getCanvAnchor :: w -> IO Anchor
Gets the anchor position on the canvas.
Instances
HasCanvAnchor BitMapItem
HasCanvAnchor EmbeddedCanvasWin
HasCanvAnchor ImageItem
HasCanvAnchor TextItem
class (GUIObject w) => HasBorder w where
Objects with a configureable border instantiate the class HasBorder.
Methods
borderwidth :: Distance -> Config w
Sets the width of the object's border.
getBorderwidth :: w -> IO Distance
Gets the width of the object's border.
relief :: Relief -> Config w
Sets the object's relief.
getRelief :: w -> IO Relief
Gets the object's relief.
Instances
HasBorder BitMap
HasBorder Box
HasBorder Button
HasBorder Canvas
HasBorder (CheckButton a)
HasBorder (ComboBox a)
HasBorder Editor
HasBorder (Entry a)
HasBorder Frame
(HasInsertionCursor w, Widget w) => HasBorder (ICursor w)
HasBorder IconBar
HasBorder Image
HasBorder (InputForm a)
HasBorder (EntryField a b)
HasBorder (TextField a b)
HasBorder (EnumField a b)
HasBorder (RecordField a b)
HasBorder Label
HasBorder LabelFrame
HasBorder (ListBox a)
HasBorder Menu
HasBorder MenuButton
HasBorder MenuCascade
HasBorder MenuCheckButton
HasBorder MenuCommand
HasBorder MenuRadioButton
HasBorder MenuSeparator
HasBorder Message
HasBorder NoteBookPage
HasBorder (Notepad a)
HasBorder (OptionMenu a)
HasBorder (Prompt a)
HasBorder (RadioButton a)
HasBorder (Scale a)
HasBorder ScrollBar
HasBorder (ScrollBox a)
HasBorder SelectBox
(HasSelection w, Widget w) => HasBorder (Selection w)
HasBorder Separator
HasBorder SpinButton
HasBorder TextTag
(CItem c) => HasBorder (TreeList c)
class (GUIObject w, GUIValue v) => HasValue w v where
Objects that have a value instantiate the class HasValue.
Methods
value :: v -> Config w
Sets the object's value.
getValue :: w -> IO v
Gets the object's value.
Instances
(GUIValue a) => HasValue (CheckButton a) a
(GUIValue a, GUIValue [a]) => HasValue (ComboBox a) [a]
(GUIValue a) => HasValue Editor a
(GUIValue a) => HasValue (Entry a) a
(GUIValue v) => HasValue HTk v
(GUIValue a, GUIValue [a]) => HasValue (ListBox a) [a]
(GUIValue v) => HasValue MenuCheckButton v
(GUIValue v) => HasValue MenuRadioButton v
(GUIValue a) => HasValue (OptionMenu a) a
(GUIValue a) => HasValue (Prompt a) a
(GUIValue c) => HasValue (RadioButton a) c
class (GUIObject w, GUIValue v) => HasText w v where
Objects containing text instantiate the class HasText.
Methods
text :: v -> Config w
Sets the object's text.
getText :: w -> IO v
Gets the object's text.
Instances
(GUIValue v) => HasText Button v
(GUIValue v) => HasText (CheckButton a) v
(GUIValue v) => HasText (Dialog a) v
(Window w, GUIValue v) => HasText (Icon w) v
(GUIValue b, GUIValue c) => HasText (EntryField a b) c
(GUIValue b, GUIValue c) => HasText (TextField a b) c
(GUIValue c) => HasText (EnumField a b) c
(GUIValue c) => HasText (RecordField a b) c
(GUIValue b) => HasText Label b
(GUIValue v) => HasText LabelFrame v
(GUIValue v) => HasText MenuButton v
(GUIValue v) => HasText MenuCascade v
(GUIValue v) => HasText MenuCheckButton v
(GUIValue v) => HasText MenuCommand v
(GUIValue v) => HasText MenuRadioButton v
(GUIValue b) => HasText Message b
(GUIValue a) => HasText NoteBookPage a
(GUIValue a, GUIValue b) => HasText (Prompt a) b
(GUIValue v) => HasText (RadioButton a) v
(GUIValue v) => HasText (Scale a) v
(GUIValue b) => HasText TextItem b
(Window w, GUIValue v) => HasText w v
class (GUIObject w) => HasFont w where
Objects with a configureable font instantiate the class HasFont.
Methods
font :: (FontDesignator f) => f -> Config w
Sets the object's font.
getFont :: w -> IO Font
Gets the object's font.
Instances
HasFont Button
HasFont (CheckButton a)
HasFont Editor
HasFont (Entry a)
HasFont (InputForm a)
HasFont (EntryField a b)
HasFont (TextField a b)
HasFont (EnumField a b)
HasFont (RecordField a b)
HasFont Label
HasFont (ListBox a)
HasFont Menu
HasFont MenuButton
HasFont MenuCascade
HasFont MenuCheckButton
HasFont MenuCommand
HasFont MenuRadioButton
HasFont Message
HasFont (OptionMenu a)
HasFont (Prompt a)
HasFont (RadioButton a)
HasFont (Scale a)
HasFont SpinButton
HasFont TextItem
HasFont TextTag
class (GUIObject w) => HasUnderline w where
Objects that have a text underline configure option instantiate th class HasUnderline.
Methods
underline :: Int -> Config w
Sets the index position of the text character to underline.
getUnderline :: w -> IO Int
Gets the index position of the text character to underline.
wraplength :: Int -> Config w
Sets the maximum line length for text in screen units.
getWraplength :: w -> IO Int
Gets the maximum line length for text in screen units.
Instances
HasUnderline Button
HasUnderline (CheckButton a)
HasUnderline Label
HasUnderline MenuButton
HasUnderline MenuCascade
HasUnderline MenuCheckButton
HasUnderline MenuCommand
HasUnderline MenuRadioButton
HasUnderline (RadioButton a)
class (GUIObject w) => HasJustify w where
Objects that have a configureable text justification instantiate the class HasJustify.
Methods
justify :: Justify -> Config w
Sets the text justification.
getJustify :: w -> IO Justify
Gets the set text justification.
Instances
HasJustify Button
HasJustify (CheckButton a)
HasJustify (Entry a)
HasJustify Label
HasJustify MenuButton
HasJustify MenuCascade
HasJustify MenuCheckButton
HasJustify MenuCommand
HasJustify MenuRadioButton
HasJustify Message
HasJustify (RadioButton a)
HasJustify TextItem
HasJustify TextTag
class (GUIObject w) => HasGrid w where
Objects that support geometry gridding instantiate the class HasGrid.
Methods
setgrid :: Toggle -> Config w
Enables geometry gridding.
getGrid :: w -> IO Toggle
Gets the current setting.
Instances
HasGrid (ListBox a)
class (GUIObject w) => HasOrientation w where
Oriented objects instantiate the class HasOrientation.
Methods
orient :: Orientation -> Config w
Sets the object's orientation.
getOrient :: w -> IO Orientation
Gets the object's orientation.
Instances
HasOrientation Box
HasOrientation IconBar
HasOrientation MenuSeparator
HasOrientation (Scale a)
HasOrientation ScrollBar
HasOrientation Separator
HasOrientation Space
class (GUIObject w) => HasFile w where
Objects associated with a file instantiate the class HasFile.
Methods
filename :: String -> Config w
Sets the name of the associated file.
getFileName :: w -> IO String
Gets the name of the associated file.
Instances
HasFile BitMap
HasFile Image
class (GUIObject w) => HasAlign w where
Objects with a configureable alignment instantiate the class HasAlign.
Methods
align :: Alignment -> Config w
getAlign :: w -> IO Alignment
class HasIncrement w a where
Incrementable objects (e.g. scale wigdgets) instantiate the class HasIncrement.
Methods
increment :: a -> Config w
Increments the object.
getIncrement :: w -> IO a
Gets object's incrementation.
Instances
(ScaleValue a) => HasIncrement (Scale a) a
(ScaleValue a) => HasIncrement (Slider (Scale a)) a
class (GUIObject w) => HasEnable w where
Stateful objects that can be enabled or disabled instantiate the class HasEnable.
Methods
state :: State -> Config w
Sets the objects state.
getState :: w -> IO State
Gets the objects state.
disable :: Config w
Disables the object.
enable :: Config w
Enables the object.
isEnabled :: w -> IO Bool
True if the object is enabled.
Instances
HasEnable Button
HasEnable Canvas
HasEnable (CheckButton a)
HasEnable (ComboBox a)
HasEnable Editor
HasEnable (Entry a)
HasEnable IconBar
HasEnable (InputForm a)
HasEnable (EntryField a b)
HasEnable (TextField a b)
HasEnable (EnumField a b)
HasEnable (RecordField a b)
HasEnable (ListBox a)
HasEnable MenuButton
HasEnable MenuCascade
HasEnable MenuCheckButton
HasEnable MenuCommand
HasEnable MenuRadioButton
HasEnable (OptionMenu a)
HasEnable (Prompt a)
HasEnable (RadioButton a)
HasEnable (Scale a)
HasEnable ScrollBar
HasEnable SelectBox
HasEnable SpinButton
class (GUIObject w) => HasAnchor w where
Objects that have an anchor position instantiate the class HasAnchor.
Methods
anchor :: Anchor -> Config w
Sets the anchor position.
getAnchor :: w -> IO Anchor
Gets the anchor position.
Instances
HasAnchor Button
HasAnchor (CheckButton a)
HasAnchor (ComboBox a)
HasAnchor Label
HasAnchor MenuButton
HasAnchor Message
HasAnchor (OptionMenu a)
class (GUIObject w) => HasBBox w i where
Objects or sets of objects with a bounding box (e.g. canvas tags) instantiate the class HasBBox.
Methods
bbox :: w -> i -> IO (Maybe (Distance, Distance, Distance, Distance))
Returns the bounding box of the given object.
Instances
(GUIObject c) => HasBBox Canvas c
(HasIndex Editor i BaseIndex) => HasBBox Editor i
(HasIndex (ListBox a) i Int) => HasBBox (ListBox a) i
Produced by Haddock version 0.3