mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-30 14:34:56 +03:00
Add accessor documentation for list widget
This commit is contained in:
parent
40d6c52964
commit
097162fa9b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user