Source codeContentsIndex
ListBox
Description
HTk's listbox widget . A scrollable widget that displays a set of text lines with selection functionality.
Synopsis
module Selection
module Index
data ListBox a
newListBox :: (Container par, GUIValue a) => par -> [Config (ListBox a)] -> IO (ListBox a)
data SelectMode
= Single
| Browse
| Multiple
| Extended
selectMode :: (GUIValue a) => SelectMode -> ListBox a -> IO (ListBox a)
getSelectMode :: (GUIValue a) => ListBox a -> IO SelectMode
activateElem :: (HasIndex (ListBox a) i Int) => ListBox a -> i -> IO ()
selectionAnchor :: (HasIndex (ListBox a) i Int) => ListBox a -> i -> IO ()
data ListBoxElem a = ListBoxElem a
elemNotFound :: IOError
Documentation
module Selection
module Index
data ListBox a
The ListBox datatype - parametrised over the type of the list elements.
newListBox
:: (Container par, GUIValue a)
=> par the parent widget, which has to be a container widget (an instance of class Container).
-> [Config (ListBox a)] the list of configuration options for this listbox widget.
-> IO (ListBox a) A listbox widget.
Constructs a new listbox widget and returns a handler.
data SelectMode
Constructors
Single
Browse
Multiple
Extended
Instances
GUIValue SelectMode
Read SelectMode
Show SelectMode
selectMode :: (GUIValue a) => SelectMode -> ListBox a -> IO (ListBox a)
getSelectMode
:: (GUIValue a)
=> ListBox a the concerned listbox.
-> IO SelectMode The current select mode.
Gets the set select mode from a listbox.
activateElem :: (HasIndex (ListBox a) i Int) => ListBox a -> i -> IO ()
selectionAnchor
:: (HasIndex (ListBox a) i Int)
=> ListBox a the concerned listbox.
-> i the index of the line to anchor the selection at.
-> IO () Nothing.
Anchors the selection at the specified line.
data ListBoxElem a
Constructors
ListBoxElem a
Instances
(Eq a, GUIValue a) => HasIndex (ListBox [a]) (ListBoxElem a) Int
(Eq a, GUIValue a, GUIValue [a]) => HasIndex (ListBox a) Int (ListBoxElem a)
elemNotFound :: IOError
Produced by Haddock version 0.3