Source codeContentsIndex
Selection
Description
This module provides access to a widgets selection (e.g. inside a listbox, editor or entry widget).
Synopsis
class HasIndex w i b where
getBaseIndex :: w -> i -> IO b
newtype Selection w = Selection w
class (GUIObject w) => HasSelection w where
clearSelection :: w -> IO ()
class HasSelectionIndex w i where
selection :: i -> Config w
isSelected :: w -> i -> IO Bool
class HasSelectionBaseIndex w i where
getSelection :: w -> IO (Maybe i)
class HasSelectionIndexRange w i1 i2 where
selectionRange :: i1 -> i2 -> Config w
class (HasSelectionIndex w i) => HasSelectionBaseIndexRange w i where
getSelectionStart :: w -> IO (Maybe i)
getSelectionEnd :: w -> IO (Maybe i)
getSelectionRange :: w -> IO (Maybe (i, i))
Documentation
class HasIndex w i b where
Internal.
Methods
getBaseIndex :: w -> i -> IO b
Internal.
Instances
HasIndex Editor BaseIndex BaseIndex
HasIndex Editor EndOfText BaseIndex
HasIndex Editor Pixels BaseIndex
HasIndex Editor (Distance, Distance) BaseIndex
(HasIndex Editor i BaseIndex) => HasIndex Editor (i, [IndexModifier]) BaseIndex
(HasIndex Editor i BaseIndex) => HasIndex Editor (i, IndexModifier) BaseIndex
(HasIndex Editor i BaseIndex) => HasIndex Editor i (Distance, Distance)
HasIndex Editor EmbeddedTextWin BaseIndex
HasIndex (Entry a) Int BaseIndex
HasIndex (Entry a) BaseIndex BaseIndex
HasIndex (Entry a) EndOfText BaseIndex
HasIndex (Entry a) XCoord BaseIndex
HasIndex (Entry a) (ICursor (Entry a)) BaseIndex
HasIndex (Entry a) (Selection (Entry a), First) BaseIndex
HasIndex (Entry a) (Selection (Entry a), Last) BaseIndex
(HasIndex (Entry a) i BaseIndex) => HasIndex (Entry a) i Int
HasIndex (ListBox a) Int Int
HasIndex (ListBox a) EndOfText Int
HasIndex (ListBox a) Pixels Int
(Eq a, GUIValue a) => HasIndex (ListBox [a]) (ListBoxElem a) Int
(Eq a, GUIValue a, GUIValue [a]) => HasIndex (ListBox a) Int (ListBoxElem a)
HasIndex Editor Mark BaseIndex
HasIndex Editor (Selection Editor) BaseIndex
HasIndex Editor (ICursor Editor) BaseIndex
HasIndex Editor MousePosition BaseIndex
HasIndex Editor (TextTag, First) BaseIndex
HasIndex Editor (TextTag, Last) BaseIndex
newtype Selection w
The Selection datatype.
Constructors
Selection w
Instances
HasIndex (Entry a) (Selection (Entry a), First) BaseIndex
HasIndex (Entry a) (Selection (Entry a), Last) BaseIndex
HasIndex Editor (Selection Editor) BaseIndex
(GUIObject w) => GUIObject (Selection w)
(HasSelection w, Widget w) => HasColour (Selection w)
(HasSelection w, Widget w) => HasBorder (Selection w)
class (GUIObject w) => HasSelection w where
A widget with a selectable content instantiates the class HasSelection.
Methods
clearSelection :: w -> IO ()
Clears the widgets selection.
Instances
HasSelection Editor
HasSelection (Entry a)
HasSelection (ListBox a)
class HasSelectionIndex w i where
A widget with a indexable selection instantiates the class HasSelectionIndex.
Methods
selection :: i -> Config w
Selects the entry at the specified index.
isSelected :: w -> i -> IO Bool
Queries if the entry at the given index is selected.
Instances
(HasIndex Editor i BaseIndex) => HasSelectionIndex Editor i
(HasIndex (Entry a) i BaseIndex) => HasSelectionIndex (Entry a) i
(HasIndex (ListBox a) i Int) => HasSelectionIndex (ListBox a) i
class HasSelectionBaseIndex w i where
A widget with an indexable selection base instantiates the class HasSelectionBaseIndex.
Methods
getSelection :: w -> IO (Maybe i)
Gets the selected base index (if something is selected).
Instances
HasSelectionBaseIndex Editor ((Distance, Distance), (Distance, Distance))
HasSelectionBaseIndex (Entry a) (Int, Int)
HasSelectionBaseIndex (ListBox a) [Int]
class HasSelectionIndexRange w i1 i2 where
A widget with an indexable selection range instantiates the class HasSelectionIndexRange.
Methods
selectionRange :: i1 -> i2 -> Config w
Selects the widget's entries in the specified range.
Instances
(HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) => HasSelectionIndexRange Editor i1 i2
(HasIndex (Entry a) i1 BaseIndex, HasIndex (Entry a) i2 BaseIndex) => HasSelectionIndexRange (Entry a) i1 i2
(HasIndex (ListBox a) i1 Int, HasIndex (ListBox a) i2 Int) => HasSelectionIndexRange (ListBox a) i1 i2
class (HasSelectionIndex w i) => HasSelectionBaseIndexRange w i where
A widget with an indexable selection index range instantiates the class HasSelectionBaseIndexRange.
Methods
getSelectionStart :: w -> IO (Maybe i)
Gets the selection start index.
getSelectionEnd :: w -> IO (Maybe i)
Gets the selection end index.
getSelectionRange :: w -> IO (Maybe (i, i))
Gets the selection range.
Instances
HasSelectionBaseIndexRange Editor (Distance, Distance)
HasSelectionBaseIndexRange (Entry a) Int
HasSelectionBaseIndexRange (ListBox a) Int
Produced by Haddock version 0.3