uni-htk-2.2.1.2: 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)

Internal.

CItem c => Destroyable (GenGUI c)

A GenGUI object can be destroyed.

CItem c => Synchronized (GenGUI c)

You can synchronize on a gengui object.

CItem c => GUIObject (GenGUI c)

Internal.

CItem c => Window (GenGUI c)

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)

Internal.

CItem c => CItem (Item c)

Objects must have a name and an icon.

data Name Source

The Name datatype.

Constructors

Name 

Fields

short :: Int -> String
 
full :: String
 

class Eq c => CItem c where Source

Objects with a name and an icon.

Methods

getName :: c -> IO Name Source

getIcon :: c -> IO Image Source

Instances

CItem c => CItem (Item c)

Objects must have a name and an icon.

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.