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

Safe HaskellNone
LanguageHaskell98

HTk.Toolkit.GenGUI

Description

A generic graphical user interface.

Synopsis

Documentation

data GenGUI c Source #

The GenGUI datatye.

Instances

CItem c => Eq (GenGUI c) Source #

Internal.

Methods

(==) :: GenGUI c -> GenGUI c -> Bool #

(/=) :: GenGUI c -> GenGUI c -> Bool #

CItem c => Destroyable (GenGUI c) Source #

A GenGUI object can be destroyed.

Methods

destroy :: GenGUI c -> IO () #

CItem c => Synchronized (GenGUI c) Source #

You can synchronize on a gengui object.

Methods

synchronize :: GenGUI c -> IO b -> IO b #

CItem c => GUIObject (GenGUI c) Source #

Internal.

CItem c => Window (GenGUI c) Source #

A GenGUI object is a window.

newGenGUI Source #

Arguments

:: CItem c 
=> Maybe (GenGUIState c)

an optional GenGUI state to recover.

-> Bool

True if lleaves should be displayed in the tree list.

-> IO (GenGUI c)

A gui.

Constructs a new gui and returns a handler.

setStatus :: CItem c => GenGUI c -> String -> IO () Source #

Sets the status label's text.

clearStatus :: CItem c => GenGUI c -> IO () Source #

Clears the status label.

updateTextArea :: CItem c => GenGUI c -> [MarkupText] -> IO () Source #

Displays the given markup text on the editor pane.

clearTextArea :: CItem c => GenGUI c -> IO () Source #

Clears the editor pane.

genGUIMainMenu :: CItem c => GenGUI c -> Menu Source #

Gets the gui's menu container.

data NewItem c Source #

External representation of gengui objects.

Constructors

LeafItem c (Maybe (Position, Bool)) 
FolderItem c [NewItem c] (Maybe (Bool, Bool)) 

data Item c Source #

internal object representation

Instances

CItem c => Eq (Item c) Source #

Internal.

Methods

(==) :: Item c -> Item c -> Bool #

(/=) :: Item c -> Item c -> Bool #

CItem c => CItem (Item c) Source #

Objects must have a name and an icon.

Methods

getName :: Item c -> IO Name Source #

getIcon :: Item c -> IO Image Source #

data Name Source #

The Name datatype.

Constructors

Name 

Fields

class Eq c => CItem c where Source #

Objects with a name and an icon.

Minimal complete definition

getName, getIcon

Methods

getName :: c -> IO Name Source #

getIcon :: c -> IO Image Source #

Instances

CItem c => CItem (Item c) Source #

Objects must have a name and an icon.

Methods

getName :: Item c -> IO Name Source #

getIcon :: Item c -> IO Image Source #

root :: CItem c => GenGUI c -> IO (Item c) Source #

GenGUI's root object.

openedFolder :: CItem c => GenGUI c -> IO (Maybe (Item c)) Source #

Gets the item that is currently open (displayed on notepad).

addItem Source #

Arguments

:: CItem c 
=> GenGUI c

the concerned gui.

-> Item c

the parent (folder) object.

-> NewItem c

the external representation of the new object.

-> IO (Item c)

the internal representation of the new object.

Adds a gengui object.

children :: CItem c => Item c -> IO [Item c] Source #

Gets the children from a folder item.

content :: CItem c => Item c -> c Source #

Returns the CItem content of an item.

data GenGUIEvent c Source #

The GenGUIEvent datatype.

bindGenGUIEv Source #

Arguments

:: CItem c 
=> GenGUI c

the concerned gui.

-> IO (Event (GenGUIEvent c), IO ())

A pair of (event, unbind action).

Binds a listener for gengui events to the gengui and returns a corresponding event and an unbind action.

type GenGUIState c = [NewItem c] Source #

The gui's state.

exportGenGUIState Source #

Arguments

:: CItem c 
=> GenGUI c

the concerned GenGUI.

-> IO (GenGUIState c)

the gui's state.

Exports the gui's state.