uni-htk-2.2.1.0: Graphical User Interface for Haskell Programs

HTk.Components.Image

Description

This module provides access to image resources from files or base64 encoded strings.

Synopsis

Documentation

class GUIObject w => HasPhoto w whereSource

Image containers instantiate the class HasPhoto.

Instances

HasPhoto MenuCascade

A menu cascade item can contain an image (instead of text or a bitmap).

HasPhoto MenuCheckButton

A menu checkbutton can contain an image (instead of text or a bitmap).

HasPhoto MenuCommand

A menu command can contain an image (instead of text or a bitmap).

HasPhoto MenuRadioButton

You can specify the size of a menu radiobutton.

HasPhoto Button

A button can contain an image.

HasPhoto ImageItem

An image item is a container for an image object.

HasPhoto Label

A label can contain an image.

HasPhoto MenuButton

A menubutton can contain an image.

(HasIndicator w, SelectButton w) => HasPhoto (Indicator w)

You can specify specify an alternate image for the selector of menu checkbuttons and menu radiobuttons.

HasPhoto (CheckButton a)

A checkbutton can contain an image.

HasPhoto (RadioButton a)

A radiobutton can contain an image.

HasPhoto (Dialog a)

A dialog can have an image

CItem a => HasPhoto (TREELISTOBJECT a) 

data Image Source

The Image datatype.

Instances

Eq Image 
Destroyable Image

An image object can be destroyed.

Synchronized Image

You can synchronize on an image object.

GUIObject Image

Internal.

HasFile Image

Images can be read from files.

HasBorder Image

An image object has a configureable border (if implicitely displayed inside a label widget).

HasSize Image

You can specify the size of the containing label, if the image is implicitely displayed inside a label widget.

HasColour Image

An image object has a configureable foreground and background colour (if implicitely displayed inside a label widget).

Widget Image

An image object has standard widget properties (concerning focus, cursor / if implicitely displayed inside a label widget).

FormLabel Image 

newImageSource

Arguments

:: [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)Source

Internal.

imageToInt :: Image -> IO IntSource

Internal.

data Format Source

The Format datatype - represents the format of a base64 encoded image (see Image.imgData).

Constructors

GIF 
PPM 
PGM 

imgData :: Format -> String -> Config ImageSource

Sets the image data from a base64 encoded string.

imgGamma :: Double -> Config ImageSource

The gamma correction factor. Values less than one darken the image, values greater than one brighten up the image.

imgPalette :: PaletteSpec p => p -> Config ImageSource