Add accessor documentation for list widget

This commit is contained in:
liam 2018-04-07 09:52:57 +01:00
parent 40d6c52964
commit 097162fa9b

View File

@ -9,7 +9,7 @@
-- | This module provides a scrollable list type and functions for
-- manipulating and rendering it.
module Brick.Widgets.List
( List(listElements, listSelected, listName, listItemHeight)
( List
-- * Constructing a list
, list
@ -27,6 +27,13 @@ module Brick.Widgets.List
, listNameL
, listItemHeightL
-- * Accessors
, listElements
, listName
, listSelectedElement
, listSelected
, listItemHeight
-- * Manipulating a list
, listMoveBy
, listMoveTo
@ -38,7 +45,6 @@ module Brick.Widgets.List
, listInsert
, listRemove
, listReplace
, listSelectedElement
, listClear
, listReverse
, listModify
@ -78,9 +84,13 @@ import Brick.AttrMap
-- list
data List n e =
List { listElements :: !(V.Vector e)
-- ^ Return the list's vector of elements.
, listSelected :: !(Maybe Int)
-- ^ Return the list's selected element index, if any.
, listName :: n
-- ^ Return the list's name.
, listItemHeight :: Int
-- ^ Return the height of the list items.
} deriving (Functor, Foldable, Traversable, Show)
suffixLenses ''List