Source codeContentsIndex
Image
Description
This module provides access to image resources from files or base64 encoded strings.
Synopsis
class (GUIObject w) => HasPhoto w where
photo :: Image -> Config w
getPhoto :: w -> IO (Maybe Image)
data Image
newImage :: [Config Image] -> IO Image
intToImage :: Int -> IO (Maybe Image)
imageToInt :: Image -> IO Int
data Format
= GIF
| PPM
| PGM
imgData :: Format -> String -> Config Image
Documentation
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)
data Image
The Image datatype.
newImage
:: [Config Image] the list of configuration options for this image object.
-> IO Image An image object.
Constructs a new image object and returns a handler. The image object can be packed like a widget, then it is implicitely displayed inside a label widget.
intToImage :: Int -> IO (Maybe Image)
imageToInt :: Image -> IO Int
Internal.
data Format
The Format datatype - represents the format of a base64 encoded image (see Image.imgData).
Constructors
GIF
PPM
PGM
imgData :: Format -> String -> Config Image
Sets the image data from a base64 encoded string.
Produced by Haddock version 0.3