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

Safe HaskellNone
LanguageHaskell98

HTk.Toolkit.Notepad

Description

A simple drag and drop field.

Synopsis

Documentation

data Notepad a Source #

The Notepad datatype.

Instances

Destroyable (Notepad a) Source #

A notepad can be destroyed.

Methods

destroy :: Notepad a -> IO () #

Synchronized (Notepad a) Source #

You can synchronize on a notepad object.

Methods

synchronize :: Notepad a -> IO b -> IO b #

GUIObject (Notepad a) Source #

Internal.

HasBorder (Notepad a) Source #

A notepad has a configureable border.

HasSize (Notepad a) Source #

A notepad has a configureable size.

HasColour (Notepad a) Source #

A notepad has a configureable background colour.

Widget (Notepad a) Source #

A notepad has standard widget properties (concerning focus, cursor).

data NotepadItem a Source #

The NotepadItem datatype.

Instances

Eq (NotepadItem a) Source #

Internal.

Destroyable (NotepadItem a) Source #

A notepad item can be destroyed.

Methods

destroy :: NotepadItem a -> IO () #

Synchronized (NotepadItem a) Source #

You can synchronize on a notepad item.

Methods

synchronize :: NotepadItem a -> IO b -> IO b #

GUIObject (NotepadItem a) Source #

Internal.

HasPosition (NotepadItem a) Source #

A notepad item has a position on the associated notepad.

newNotepad Source #

Arguments

:: (CItem c, Container par) 
=> par

the parent widget (which has to be a container widget).

-> ScrollType

the scrolltype for this notepad.

-> Size

the size of the notepad items images for this notepad.

-> Maybe (NotepadState c)

an optional previous notepad state to recover.

-> [Config (Notepad c)]

the list of configuration options for this notepad.

-> IO (Notepad c)

A notepad.

Constructs a new notepad and returns a handler.

createNotepadItem Source #

Arguments

:: CItem c 
=> c

the notepad item's value.

-> Notepad c

the concerned notepad.

-> Bool

True if the notepad's scrollregion should be updated.

-> [Config (NotepadItem c)]

the list of configuration options for this notepad item.

-> IO (NotepadItem c)

A notepad item.

Creates a new notepad item and returns a handler.

getFreeItemPosition Source #

Arguments

:: CItem c 
=> Notepad c

the concerned notepad.

-> IO Position

the free position on the notepad.

Returns a free item position on the notepad.

getItemValue :: NotepadItem a -> IO a Source #

Gets the value from a notepad item.

data ScrollType Source #

The ScrollType datatype.

Constructors

Scrolled 
NotScrolled 

setName :: CItem c => NotepadItem c -> Name -> IO () Source #

(Re-)sets the name of a notepad item.

selectAll Source #

Arguments

:: Notepad a

the concerned notepad.

-> IO ()

None.

Selects all items inside the notepad.

deselectAll Source #

Arguments

:: Notepad a

the concerned notepad.

-> IO ()

None.

Deselects all items inside the notepad.

selectItem Source #

Arguments

:: Notepad a

the concerned notepad.

-> NotepadItem a

the concerned notepad item.

-> IO ()

None.

Selects a specific notepad item.

selectAnotherItem Source #

Arguments

:: Notepad a

the concerned notepad.

-> NotepadItem a

the concerned notepad item.

-> IO ()

None.

Adds an item to the notepad's selection.

selectItemsWithin Source #

Arguments

:: Position

the upper left coordinate of the region.

-> Position

the lower right coordinate of the region.

-> Notepad a

the concerned notepad.

-> IO ()

None.

Selects all items within the specified region.

deselectItem Source #

Arguments

:: Notepad a

the concerned notepad.

-> NotepadItem a

the concerned notepad item.

-> IO ()

None.

Deselects a notepad item.

getItems Source #

Arguments

:: Notepad a

the concerned notepad.

-> IO [NotepadItem a]

A list of the contained notepad items.

Gets the items from a notepad.

getSelectedItems Source #

Arguments

:: Notepad a

the concerned notepad.

-> IO [NotepadItem a]

A list of the selected notepad items.

Gets the selected items from a notepad.

isNotepadItemSelected Source #

Arguments

:: Notepad a

the concerned notepad.

-> NotepadItem a

the concerned notepad item.

-> IO Bool

True if the given notepad item is selected, otherwise False.

True if the given notepad item is selected.

deleteItem Source #

Arguments

:: CItem c 
=> Notepad c

the concerned notepad.

-> NotepadItem c

the concerned notepad item.

-> IO ()

None.

Deletes an item from a notepad.

clearNotepad Source #

Arguments

:: Notepad a

the concerned notepad.

-> IO ()

None.

Deletes all items from a notepad.

undoLastMotion :: Notepad a -> IO () Source #

Internal (for use with GenGUI).

bindNotepadEv Source #

Arguments

:: Notepad a

the concerned notepad.

-> IO (Event (NotepadEvent a), IO ())

A pair of (event, unbind action).

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

data NotepadEvent a Source #

The NotepadEvent datatype.

Constructors

Dropped (NotepadItem a, [NotepadItem a])

Drop event.

Selected (NotepadItem a)

Selection event.

Deselected (NotepadItem a)

Deselection event.

Doubleclick (NotepadItem a)

Doubleclick event.

Rightclick [NotepadItem a]

Rightclick event.

ReleaseSelection

Buttonrelease after a selection.

ReleaseMovement EventInfo

Buttonrelease after a movement.

data CItem c => NotepadExportItem c Source #

The NotepadExportItem datatype.

Constructors

NotepadExportItem 

Fields

exportNotepadState Source #

Arguments

:: CItem c 
=> Notepad c

the concerned notepad.

-> IO (NotepadState c)

The notepad's state.

Exports a notepad's state.

importNotepadState Source #

Arguments

:: CItem c 
=> Notepad c

the concerned notepad.

-> NotepadState c 
-> IO ()

None.

Imports a notepad's state.