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

Safe HaskellNone
LanguageHaskell98

HTk.Components.Image

Description

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

Synopsis

Documentation

class GUIObject w => HasPhoto w where Source #

Image containers instantiate the class HasPhoto.

Methods

photo :: Image -> Config w Source #

getPhoto :: w -> IO (Maybe Image) Source #

Instances

HasPhoto MenuCascade Source #

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

HasPhoto MenuCheckButton Source #

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

HasPhoto MenuCommand Source #

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

HasPhoto MenuRadioButton Source #

You can specify the size of a menu radiobutton.

HasPhoto Button Source #

A button can contain an image.

HasPhoto Label Source #

A label can contain an image.

HasPhoto MenuButton Source #

A menubutton can contain an image.

HasPhoto ImageItem Source #

An image item is a container for an image object.

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

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

HasPhoto (CheckButton a) Source #

A checkbutton can contain an image.

HasPhoto (RadioButton a) Source #

A radiobutton can contain an image.

HasPhoto (Dialog a) Source #

A dialog can have an image

data Image Source #

The Image datatype.

Instances

Eq Image Source # 

Methods

(==) :: Image -> Image -> Bool #

(/=) :: Image -> Image -> Bool #

Destroyable Image Source #

An image object can be destroyed.

Methods

destroy :: Image -> IO () #

Synchronized Image Source #

You can synchronize on an image object.

Methods

synchronize :: Image -> IO b -> IO b #

GUIObject Image Source #

Internal.

HasFile Image Source #

Images can be read from files.

HasBorder Image Source #

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

HasSize Image Source #

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

HasColour Image Source #

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

Widget Image Source #

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

FormLabel Image Source # 

Methods

formLabel :: Frame -> Image -> IO (IO ()) Source #

newImage Source #

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 Int Source #

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 Image Source #

Sets the image data from a base64 encoded string.

imgGamma :: Double -> Config Image Source #

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

imgPalette :: PaletteSpec p => p -> Config Image Source #