{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE TupleSections #-}
module Brick.Widgets.TabularList.Mixed (
MixedContents(..)
, MixedRenderers(..)
, ColSizes(..)
, CalcColSizes(..)
, MixedSizes(..)
, MixedTabularList(..)
, mixedTabularList
, renderMixedTabularList
, handleMixedListEvent
, handleMixedListEventVi
, module Brick.Widgets.TabularList.Types
) where
import Brick.Widgets.TabularList.Types
import Brick.Widgets.TabularList.Internal.Common
import Brick.Widgets.TabularList.Internal.Lens
import GHC.Generics (Generic)
import Data.Maybe (catMaybes, fromMaybe)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Optics.Core
import Data.Generics.Labels
import Data.Sequence (Seq)
import qualified Brick.Widgets.List as L
import Brick.Types
import Brick.Widgets.Core
import Brick.Widgets.Center
import Graphics.Vty.Input.Events (Event)
data MixedContents row cell rowH colH = MixedContents {
forall row cell rowH colH.
MixedContents row cell rowH colH
-> row -> ColumnIndex -> Maybe cell
cell :: row -> ColumnIndex -> Maybe cell
, forall row cell rowH colH.
MixedContents row cell rowH colH
-> Maybe (row -> ColumnIndex -> Maybe rowH)
rowHdr :: Maybe (row -> RowIndex -> Maybe rowH)
, forall row cell rowH colH.
MixedContents row cell rowH colH
-> Maybe (ColumnIndex -> Maybe colH)
colHdr :: Maybe (ColumnIndex -> Maybe colH)
} deriving (forall x.
MixedContents row cell rowH colH
-> Rep (MixedContents row cell rowH colH) x)
-> (forall x.
Rep (MixedContents row cell rowH colH) x
-> MixedContents row cell rowH colH)
-> Generic (MixedContents row cell rowH colH)
forall x.
Rep (MixedContents row cell rowH colH) x
-> MixedContents row cell rowH colH
forall x.
MixedContents row cell rowH colH
-> Rep (MixedContents row cell rowH colH) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall row cell rowH colH x.
Rep (MixedContents row cell rowH colH) x
-> MixedContents row cell rowH colH
forall row cell rowH colH x.
MixedContents row cell rowH colH
-> Rep (MixedContents row cell rowH colH) x
$cto :: forall row cell rowH colH x.
Rep (MixedContents row cell rowH colH) x
-> MixedContents row cell rowH colH
$cfrom :: forall row cell rowH colH x.
MixedContents row cell rowH colH
-> Rep (MixedContents row cell rowH colH) x
Generic
data MixedRenderers n row cell rowH colH = MixedRenderers {
forall n row cell rowH colH.
MixedRenderers n row cell rowH colH
-> ListFocused -> Position -> row -> Maybe cell -> Widget n
drawCell :: ListFocused -> Position -> row -> Maybe cell -> Widget n
, forall n row cell rowH colH.
MixedRenderers n row cell rowH colH
-> Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
drawRowHdr :: Maybe (ListFocused -> WidthDeficit -> Position -> row -> Maybe rowH -> Widget n)
, forall n row cell rowH colH.
MixedRenderers n row cell rowH colH
-> Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)
drawColHdr :: Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)
} deriving (forall x.
MixedRenderers n row cell rowH colH
-> Rep (MixedRenderers n row cell rowH colH) x)
-> (forall x.
Rep (MixedRenderers n row cell rowH colH) x
-> MixedRenderers n row cell rowH colH)
-> Generic (MixedRenderers n row cell rowH colH)
forall x.
Rep (MixedRenderers n row cell rowH colH) x
-> MixedRenderers n row cell rowH colH
forall x.
MixedRenderers n row cell rowH colH
-> Rep (MixedRenderers n row cell rowH colH) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall n row cell rowH colH x.
Rep (MixedRenderers n row cell rowH colH) x
-> MixedRenderers n row cell rowH colH
forall n row cell rowH colH x.
MixedRenderers n row cell rowH colH
-> Rep (MixedRenderers n row cell rowH colH) x
$cto :: forall n row cell rowH colH x.
Rep (MixedRenderers n row cell rowH colH) x
-> MixedRenderers n row cell rowH colH
$cfrom :: forall n row cell rowH colH x.
MixedRenderers n row cell rowH colH
-> Rep (MixedRenderers n row cell rowH colH) x
Generic
data ColSizes row = ColSizes {
forall row. ColSizes row -> row -> [ColumnIndex]
rowKind :: row -> [Width]
, forall row. ColSizes row -> Maybe ([ColumnIndex], ColumnIndex)
colHdr :: Maybe ([Width], Height)
} deriving (forall x. ColSizes row -> Rep (ColSizes row) x)
-> (forall x. Rep (ColSizes row) x -> ColSizes row)
-> Generic (ColSizes row)
forall x. Rep (ColSizes row) x -> ColSizes row
forall x. ColSizes row -> Rep (ColSizes row) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall row x. Rep (ColSizes row) x -> ColSizes row
forall row x. ColSizes row -> Rep (ColSizes row) x
$cto :: forall row x. Rep (ColSizes row) x -> ColSizes row
$cfrom :: forall row x. ColSizes row -> Rep (ColSizes row) x
Generic
data CalcColSizes row =
AvailWidth (AvailWidth -> ColSizes row)
| VisibleRows ([row] -> AvailWidth -> ColSizes row) deriving (forall x. CalcColSizes row -> Rep (CalcColSizes row) x)
-> (forall x. Rep (CalcColSizes row) x -> CalcColSizes row)
-> Generic (CalcColSizes row)
forall x. Rep (CalcColSizes row) x -> CalcColSizes row
forall x. CalcColSizes row -> Rep (CalcColSizes row) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall row x. Rep (CalcColSizes row) x -> CalcColSizes row
forall row x. CalcColSizes row -> Rep (CalcColSizes row) x
$cto :: forall row x. Rep (CalcColSizes row) x -> CalcColSizes row
$cfrom :: forall row x. CalcColSizes row -> Rep (CalcColSizes row) x
Generic
data MixedSizes row rowH = MixedSizes {
forall row rowH. MixedSizes row rowH -> Maybe (RowHeaderWidth rowH)
rowHdr :: Maybe (RowHeaderWidth rowH)
, forall row rowH. MixedSizes row rowH -> CalcColSizes row
colSizes :: CalcColSizes row
} deriving (forall x. MixedSizes row rowH -> Rep (MixedSizes row rowH) x)
-> (forall x. Rep (MixedSizes row rowH) x -> MixedSizes row rowH)
-> Generic (MixedSizes row rowH)
forall x. Rep (MixedSizes row rowH) x -> MixedSizes row rowH
forall x. MixedSizes row rowH -> Rep (MixedSizes row rowH) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall row rowH x.
Rep (MixedSizes row rowH) x -> MixedSizes row rowH
forall row rowH x.
MixedSizes row rowH -> Rep (MixedSizes row rowH) x
$cto :: forall row rowH x.
Rep (MixedSizes row rowH) x -> MixedSizes row rowH
$cfrom :: forall row rowH x.
MixedSizes row rowH -> Rep (MixedSizes row rowH) x
Generic
data MixedTabularList n row cell rowH colH = MixedTabularList {
forall n row cell rowH colH.
MixedTabularList n row cell rowH colH -> GenericList n Seq row
list :: L.GenericList n Seq row
, forall n row cell rowH colH.
MixedTabularList n row cell rowH colH -> MixedSizes row rowH
sizes :: MixedSizes row rowH
, forall n row cell rowH colH.
MixedTabularList n row cell rowH colH
-> MixedContents row cell rowH colH
contents :: MixedContents row cell rowH colH
} deriving (forall x.
MixedTabularList n row cell rowH colH
-> Rep (MixedTabularList n row cell rowH colH) x)
-> (forall x.
Rep (MixedTabularList n row cell rowH colH) x
-> MixedTabularList n row cell rowH colH)
-> Generic (MixedTabularList n row cell rowH colH)
forall x.
Rep (MixedTabularList n row cell rowH colH) x
-> MixedTabularList n row cell rowH colH
forall x.
MixedTabularList n row cell rowH colH
-> Rep (MixedTabularList n row cell rowH colH) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall n row cell rowH colH x.
Rep (MixedTabularList n row cell rowH colH) x
-> MixedTabularList n row cell rowH colH
forall n row cell rowH colH x.
MixedTabularList n row cell rowH colH
-> Rep (MixedTabularList n row cell rowH colH) x
$cto :: forall n row cell rowH colH x.
Rep (MixedTabularList n row cell rowH colH) x
-> MixedTabularList n row cell rowH colH
$cfrom :: forall n row cell rowH colH x.
MixedTabularList n row cell rowH colH
-> Rep (MixedTabularList n row cell rowH colH) x
Generic
mixedTabularList :: n
-> Seq row
-> ListItemHeight
-> MixedSizes row rowH
-> MixedContents row cell rowH colH
-> MixedTabularList n row cell rowH colH
mixedTabularList :: forall n row rowH cell colH.
n
-> Seq row
-> ColumnIndex
-> MixedSizes row rowH
-> MixedContents row cell rowH colH
-> MixedTabularList n row cell rowH colH
mixedTabularList n
n Seq row
rows ColumnIndex
h MixedSizes row rowH
sizes MixedContents row cell rowH colH
contents = MixedTabularList :: forall n row cell rowH colH.
GenericList n Seq row
-> MixedSizes row rowH
-> MixedContents row cell rowH colH
-> MixedTabularList n row cell rowH colH
MixedTabularList {
$sel:list:MixedTabularList :: GenericList n Seq row
list = n -> Seq row -> ColumnIndex -> GenericList n Seq row
forall (t :: * -> *) n e.
Foldable t =>
n -> t e -> ColumnIndex -> GenericList n t e
L.list n
n Seq row
rows ColumnIndex
h
, $sel:sizes:MixedTabularList :: MixedSizes row rowH
sizes = MixedSizes row rowH
sizes
, $sel:contents:MixedTabularList :: MixedContents row cell rowH colH
contents = MixedContents row cell rowH colH
contents
}
renderMixedTabularList :: (Show n, Ord n)
=> MixedRenderers n row cell rowH colH
-> ListFocused
-> MixedTabularList n row cell rowH colH
-> Widget n
renderMixedTabularList :: forall n row cell rowH colH.
(Show n, Ord n) =>
MixedRenderers n row cell rowH colH
-> ListFocused -> MixedTabularList n row cell rowH colH -> Widget n
renderMixedTabularList MixedRenderers n row cell rowH colH
r ListFocused
lf MixedTabularList n row cell rowH colH
l = Size -> Size -> RenderM n (Result n) -> Widget n
forall n. Size -> Size -> RenderM n (Result n) -> Widget n
Widget Size
Greedy Size
Greedy (RenderM n (Result n) -> Widget n)
-> RenderM n (Result n) -> Widget n
forall a b. (a -> b) -> a -> b
$ do
Context n
c <- RenderM n (Context n)
forall n. RenderM n (Context n)
getContext
let drawCell :: ListFocused -> Position -> row -> Maybe cell -> Widget n
drawCell = MixedRenderers n row cell rowH colH
r MixedRenderers n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(ListFocused -> Position -> row -> Maybe cell -> Widget n)
-> ListFocused
-> Position
-> row
-> Maybe cell
-> Widget n
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"drawCell"
(Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(ListFocused -> Position -> row -> Maybe cell -> Widget n))
Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(ListFocused -> Position -> row -> Maybe cell -> Widget n)
#drawCell
cell :: row -> ColumnIndex -> Maybe cell
cell = MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(row -> ColumnIndex -> Maybe cell)
-> row
-> ColumnIndex
-> Maybe cell
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"contents"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
#contents Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
-> Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(row -> ColumnIndex -> Maybe cell)
(row -> ColumnIndex -> Maybe cell)
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(row -> ColumnIndex -> Maybe cell)
forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a
b.
(JoinKinds k l m, AppendIndices is js ks) =>
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% IsLabel
"cell"
(Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(row -> ColumnIndex -> Maybe cell)
(row -> ColumnIndex -> Maybe cell))
Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(row -> ColumnIndex -> Maybe cell)
(row -> ColumnIndex -> Maybe cell)
#cell
aW :: ColumnIndex
aW = Context n
cContext n
-> Getting ColumnIndex (Context n) ColumnIndex -> ColumnIndex
forall {s} {a}. s -> Getting a s a -> a
^^.Getting ColumnIndex (Context n) ColumnIndex
forall n. Lens' (Context n) ColumnIndex
availWidthL
aH :: ColumnIndex
aH = Context n
cContext n
-> Getting ColumnIndex (Context n) ColumnIndex -> ColumnIndex
forall {s} {a}. s -> Getting a s a -> a
^^.Getting ColumnIndex (Context n) ColumnIndex
forall n. Lens' (Context n) ColumnIndex
availHeightL
iH :: ColumnIndex
iH = MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic'
A_Lens NoIx (MixedTabularList n row cell rowH colH) ColumnIndex
-> ColumnIndex
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"list"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
#list Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
-> Optic
A_Lens
NoIx
(GenericList n Seq row)
(GenericList n Seq row)
ColumnIndex
ColumnIndex
-> Optic'
A_Lens NoIx (MixedTabularList n row cell rowH colH) ColumnIndex
forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a
b.
(JoinKinds k l m, AppendIndices is js ks) =>
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% IsLabel
"listItemHeight"
(Optic
A_Lens
NoIx
(GenericList n Seq row)
(GenericList n Seq row)
ColumnIndex
ColumnIndex)
Optic
A_Lens
NoIx
(GenericList n Seq row)
(GenericList n Seq row)
ColumnIndex
ColumnIndex
#listItemHeight
wSet :: ColumnIndex -> Widget n -> Widget n
wSet = (ColumnIndex, ColumnIndex) -> Widget n -> Widget n
forall n. (ColumnIndex, ColumnIndex) -> Widget n -> Widget n
setAvailableSize ((ColumnIndex, ColumnIndex) -> Widget n -> Widget n)
-> (ColumnIndex -> (ColumnIndex, ColumnIndex))
-> ColumnIndex
-> Widget n
-> Widget n
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (, ColumnIndex
iH)
colHdrRow :: Maybe ([ColumnIndex], ColumnIndex) -> ColumnIndex -> Widget n
colHdrRow Maybe ([ColumnIndex], ColumnIndex)
sizes ColumnIndex
rhw = case (MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(Maybe (ColumnIndex -> Maybe colH))
-> Maybe (ColumnIndex -> Maybe colH)
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"contents"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
#contents Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
-> Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(Maybe (ColumnIndex -> Maybe colH))
(Maybe (ColumnIndex -> Maybe colH))
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(Maybe (ColumnIndex -> Maybe colH))
forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a
b.
(JoinKinds k l m, AppendIndices is js ks) =>
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% IsLabel
"colHdr"
(Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(Maybe (ColumnIndex -> Maybe colH))
(Maybe (ColumnIndex -> Maybe colH)))
Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(Maybe (ColumnIndex -> Maybe colH))
(Maybe (ColumnIndex -> Maybe colH))
#colHdr, Maybe ([ColumnIndex], ColumnIndex)
sizes, MixedRenderers n row cell rowH colH
r MixedRenderers n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n))
-> Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"drawColHdr"
(Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)))
Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n))
#drawColHdr) of
(Maybe (ColumnIndex -> Maybe colH)
Nothing, Maybe ([ColumnIndex], ColumnIndex)
_, Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)
_) -> Widget n
forall n. Widget n
emptyWidget
(Maybe (ColumnIndex -> Maybe colH)
_, Maybe ([ColumnIndex], ColumnIndex)
Nothing, Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)
_) -> Widget n
forall n. Widget n
emptyWidget
(Maybe (ColumnIndex -> Maybe colH)
_, Maybe ([ColumnIndex], ColumnIndex)
_, Maybe (ListFocused -> ColumnIndex -> Maybe colH -> Widget n)
Nothing) -> Widget n
forall n. Widget n
emptyWidget
(Just ColumnIndex -> Maybe colH
colH, Just ([ColumnIndex]
colWs, ColumnIndex
colHdrH), Just ListFocused -> ColumnIndex -> Maybe colH -> Widget n
dch) -> let
wSet :: ColumnIndex -> Widget n -> Widget n
wSet = (ColumnIndex, ColumnIndex) -> Widget n -> Widget n
forall n. (ColumnIndex, ColumnIndex) -> Widget n -> Widget n
setAvailableSize ((ColumnIndex, ColumnIndex) -> Widget n -> Widget n)
-> (ColumnIndex -> (ColumnIndex, ColumnIndex))
-> ColumnIndex
-> Widget n
-> Widget n
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (, ColumnIndex
colHdrH)
drawCol :: ColumnIndex -> ColumnIndex -> Widget n
drawCol ColumnIndex
ci ColumnIndex
w = ColumnIndex -> Widget n -> Widget n
forall {n}. ColumnIndex -> Widget n -> Widget n
wSet ColumnIndex
w (Widget n -> Widget n) -> Widget n -> Widget n
forall a b. (a -> b) -> a -> b
$ ListFocused -> ColumnIndex -> Maybe colH -> Widget n
dch ListFocused
lf ColumnIndex
ci (Maybe colH -> Widget n) -> Maybe colH -> Widget n
forall a b. (a -> b) -> a -> b
$ ColumnIndex -> Maybe colH
colH ColumnIndex
ci
in ColumnIndex -> Widget n -> Widget n
forall {n}. ColumnIndex -> Widget n -> Widget n
wSet ColumnIndex
rhw (Char -> Widget n
forall n. Char -> Widget n
fill Char
' ') Widget n -> Widget n -> Widget n
forall n. Widget n -> Widget n -> Widget n
<+> [Widget n] -> Widget n
forall n. [Widget n] -> Widget n
hBox ((ColumnIndex -> ColumnIndex -> Widget n)
-> [ColumnIndex] -> [ColumnIndex] -> [Widget n]
forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith ColumnIndex -> ColumnIndex -> Widget n
drawCol [ColumnIndex
0..] [ColumnIndex]
colWs)
renderRow :: (row -> [ColumnIndex])
-> ColumnIndex -> ListFocused -> row -> Widget n
renderRow row -> [ColumnIndex]
wprk ColumnIndex
i ListFocused
f row
row = let
drawColumn :: ColumnIndex -> ColumnIndex -> Widget n
drawColumn ColumnIndex
ci ColumnIndex
w = ColumnIndex -> Widget n -> Widget n
forall {n}. ColumnIndex -> Widget n -> Widget n
wSet ColumnIndex
w (Widget n -> Widget n) -> Widget n -> Widget n
forall a b. (a -> b) -> a -> b
$ ListFocused -> Position -> row -> Maybe cell -> Widget n
drawCell ListFocused
lf (ColumnIndex -> ListFocused -> Position
Position ColumnIndex
i ListFocused
f) row
row (Maybe cell -> Widget n) -> Maybe cell -> Widget n
forall a b. (a -> b) -> a -> b
$ row -> ColumnIndex -> Maybe cell
cell row
row ColumnIndex
ci
in [Widget n] -> Widget n
forall n. [Widget n] -> Widget n
hBox ([Widget n] -> Widget n) -> [Widget n] -> Widget n
forall a b. (a -> b) -> a -> b
$ (ColumnIndex -> ColumnIndex -> Widget n)
-> [ColumnIndex] -> [ColumnIndex] -> [Widget n]
forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith ColumnIndex -> ColumnIndex -> Widget n
drawColumn [ColumnIndex
0..] ([ColumnIndex] -> [Widget n]) -> [ColumnIndex] -> [Widget n]
forall a b. (a -> b) -> a -> b
$ row -> [ColumnIndex]
wprk row
row
sizesAfterRowHdr :: ColumnIndex -> Maybe [row] -> ColSizes row
sizesAfterRowHdr ColumnIndex
rhw Maybe [row]
rows = case MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(CalcColSizes row)
-> CalcColSizes row
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"sizes"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedSizes row rowH)
(MixedSizes row rowH))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedSizes row rowH)
(MixedSizes row rowH)
#sizes Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedSizes row rowH)
(MixedSizes row rowH)
-> Optic
A_Lens
NoIx
(MixedSizes row rowH)
(MixedSizes row rowH)
(CalcColSizes row)
(CalcColSizes row)
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(CalcColSizes row)
forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a
b.
(JoinKinds k l m, AppendIndices is js ks) =>
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% IsLabel
"colSizes"
(Optic
A_Lens
NoIx
(MixedSizes row rowH)
(MixedSizes row rowH)
(CalcColSizes row)
(CalcColSizes row))
Optic
A_Lens
NoIx
(MixedSizes row rowH)
(MixedSizes row rowH)
(CalcColSizes row)
(CalcColSizes row)
#colSizes of
AvailWidth ColumnIndex -> ColSizes row
wf -> ColumnIndex -> ColSizes row
wf (ColumnIndex -> ColSizes row) -> ColumnIndex -> ColSizes row
forall a b. (a -> b) -> a -> b
$ ColumnIndex
aW ColumnIndex -> ColumnIndex -> ColumnIndex
forall a. Num a => a -> a -> a
- ColumnIndex
rhw
VisibleRows [row] -> ColumnIndex -> ColSizes row
wf -> case Maybe [row]
rows of
Maybe [row]
Nothing -> [row] -> ColumnIndex -> ColSizes row
wf (GenericList n Seq row -> ColumnIndex -> [row]
forall n row. GenericList n Seq row -> ColumnIndex -> [row]
visibleRows (MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
-> GenericList n Seq row
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"list"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
#list) ColumnIndex
aH) (ColumnIndex -> ColSizes row) -> ColumnIndex -> ColSizes row
forall a b. (a -> b) -> a -> b
$ ColumnIndex
aW ColumnIndex -> ColumnIndex -> ColumnIndex
forall a. Num a => a -> a -> a
- ColumnIndex
rhw
Just [row]
rows -> [row] -> ColumnIndex -> ColSizes row
wf [row]
rows (ColumnIndex -> ColSizes row) -> ColumnIndex -> ColSizes row
forall a b. (a -> b) -> a -> b
$ ColumnIndex
aW ColumnIndex -> ColumnIndex -> ColumnIndex
forall a. Num a => a -> a -> a
- ColumnIndex
rhw
renderList :: RenderM n (Result n)
renderList = let ColSizes {Maybe ([ColumnIndex], ColumnIndex)
row -> [ColumnIndex]
colHdr :: Maybe ([ColumnIndex], ColumnIndex)
rowKind :: row -> [ColumnIndex]
$sel:colHdr:ColSizes :: forall row. ColSizes row -> Maybe ([ColumnIndex], ColumnIndex)
$sel:rowKind:ColSizes :: forall row. ColSizes row -> row -> [ColumnIndex]
..} = ColumnIndex -> Maybe [row] -> ColSizes row
sizesAfterRowHdr ColumnIndex
0 Maybe [row]
forall a. Maybe a
Nothing
in Widget n -> RenderM n (Result n)
forall n. Widget n -> RenderM n (Result n)
render (Widget n -> RenderM n (Result n))
-> Widget n -> RenderM n (Result n)
forall a b. (a -> b) -> a -> b
$ Maybe ([ColumnIndex], ColumnIndex) -> ColumnIndex -> Widget n
colHdrRow Maybe ([ColumnIndex], ColumnIndex)
colHdr ColumnIndex
0 Widget n -> Widget n -> Widget n
forall n. Widget n -> Widget n -> Widget n
<=> (ColumnIndex -> ListFocused -> row -> Widget n)
-> ListFocused -> GenericList n Seq row -> Widget n
forall (t :: * -> *) n e.
(Traversable t, Splittable t, Ord n, Show n) =>
(ColumnIndex -> ListFocused -> e -> Widget n)
-> ListFocused -> GenericList n t e -> Widget n
L.renderListWithIndex ((row -> [ColumnIndex])
-> ColumnIndex -> ListFocused -> row -> Widget n
renderRow row -> [ColumnIndex]
rowKind) ListFocused
lf (MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
-> GenericList n Seq row
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"list"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
#list)
renderHdrList :: (row -> ColumnIndex -> t)
-> ColumnIndex
-> (ListFocused -> ColumnIndex -> Position -> row -> t -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
renderHdrList row -> ColumnIndex -> t
rh ColumnIndex
rhw ListFocused -> ColumnIndex -> Position -> row -> t -> Widget n
drh Maybe [row]
rows = let
rhw' :: ColumnIndex
rhw' = ColumnIndex -> ColumnIndex -> ColumnIndex
forall a. Ord a => a -> a -> a
min ColumnIndex
rhw ColumnIndex
aW
rwhd :: ColumnIndex
rwhd = ColumnIndex -> ColumnIndex -> ColumnIndex
forall a. Ord a => a -> a -> a
max ColumnIndex
0 (ColumnIndex -> ColumnIndex) -> ColumnIndex -> ColumnIndex
forall a b. (a -> b) -> a -> b
$ ColumnIndex
rhw ColumnIndex -> ColumnIndex -> ColumnIndex
forall a. Num a => a -> a -> a
- ColumnIndex
aW
ColSizes {Maybe ([ColumnIndex], ColumnIndex)
row -> [ColumnIndex]
colHdr :: Maybe ([ColumnIndex], ColumnIndex)
rowKind :: row -> [ColumnIndex]
$sel:colHdr:ColSizes :: forall row. ColSizes row -> Maybe ([ColumnIndex], ColumnIndex)
$sel:rowKind:ColSizes :: forall row. ColSizes row -> row -> [ColumnIndex]
..} = ColumnIndex -> Maybe [row] -> ColSizes row
sizesAfterRowHdr ColumnIndex
rhw' Maybe [row]
rows
renderHdrRow :: ColumnIndex -> ListFocused -> row -> Widget n
renderHdrRow ColumnIndex
i ListFocused
f row
r = ColumnIndex -> Widget n -> Widget n
forall {n}. ColumnIndex -> Widget n -> Widget n
wSet ColumnIndex
rhw' (ListFocused -> ColumnIndex -> Position -> row -> t -> Widget n
drh ListFocused
lf ColumnIndex
rwhd (ColumnIndex -> ListFocused -> Position
Position ColumnIndex
i ListFocused
f) row
r (t -> Widget n) -> t -> Widget n
forall a b. (a -> b) -> a -> b
$ row -> ColumnIndex -> t
rh row
r ColumnIndex
i) Widget n -> Widget n -> Widget n
forall n. Widget n -> Widget n -> Widget n
<+> (row -> [ColumnIndex])
-> ColumnIndex -> ListFocused -> row -> Widget n
renderRow row -> [ColumnIndex]
rowKind ColumnIndex
i ListFocused
f row
r
in Widget n -> RenderM n (Result n)
forall n. Widget n -> RenderM n (Result n)
render (Widget n -> RenderM n (Result n))
-> Widget n -> RenderM n (Result n)
forall a b. (a -> b) -> a -> b
$ Maybe ([ColumnIndex], ColumnIndex) -> ColumnIndex -> Widget n
colHdrRow Maybe ([ColumnIndex], ColumnIndex)
colHdr ColumnIndex
rhw' Widget n -> Widget n -> Widget n
forall n. Widget n -> Widget n -> Widget n
<=> (ColumnIndex -> ListFocused -> row -> Widget n)
-> ListFocused -> GenericList n Seq row -> Widget n
forall (t :: * -> *) n e.
(Traversable t, Splittable t, Ord n, Show n) =>
(ColumnIndex -> ListFocused -> e -> Widget n)
-> ListFocused -> GenericList n t e -> Widget n
L.renderListWithIndex ColumnIndex -> ListFocused -> row -> Widget n
renderHdrRow ListFocused
lf (MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
-> GenericList n Seq row
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"list"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
#list)
case (MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(Maybe (row -> ColumnIndex -> Maybe rowH))
-> Maybe (row -> ColumnIndex -> Maybe rowH)
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"contents"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
#contents Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
-> Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(Maybe (row -> ColumnIndex -> Maybe rowH))
(Maybe (row -> ColumnIndex -> Maybe rowH))
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(Maybe (row -> ColumnIndex -> Maybe rowH))
forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a
b.
(JoinKinds k l m, AppendIndices is js ks) =>
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% IsLabel
"rowHdr"
(Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(Maybe (row -> ColumnIndex -> Maybe rowH))
(Maybe (row -> ColumnIndex -> Maybe rowH)))
Optic
A_Lens
NoIx
(MixedContents row cell rowH colH)
(MixedContents row cell rowH colH)
(Maybe (row -> ColumnIndex -> Maybe rowH))
(Maybe (row -> ColumnIndex -> Maybe rowH))
#rowHdr, MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(Maybe (RowHeaderWidth rowH))
-> Maybe (RowHeaderWidth rowH)
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"sizes"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedSizes row rowH)
(MixedSizes row rowH))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedSizes row rowH)
(MixedSizes row rowH)
#sizes Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(MixedSizes row rowH)
(MixedSizes row rowH)
-> Optic
A_Lens
NoIx
(MixedSizes row rowH)
(MixedSizes row rowH)
(Maybe (RowHeaderWidth rowH))
(Maybe (RowHeaderWidth rowH))
-> Optic'
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(Maybe (RowHeaderWidth rowH))
forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a
b.
(JoinKinds k l m, AppendIndices is js ks) =>
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% IsLabel
"rowHdr"
(Optic
A_Lens
NoIx
(MixedSizes row rowH)
(MixedSizes row rowH)
(Maybe (RowHeaderWidth rowH))
(Maybe (RowHeaderWidth rowH)))
Optic
A_Lens
NoIx
(MixedSizes row rowH)
(MixedSizes row rowH)
(Maybe (RowHeaderWidth rowH))
(Maybe (RowHeaderWidth rowH))
#rowHdr, MixedRenderers n row cell rowH colH
r MixedRenderers n row cell rowH colH
-> Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n))
-> Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"drawRowHdr"
(Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)))
Optic'
A_Lens
NoIx
(MixedRenderers n row cell rowH colH)
(Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n))
#drawRowHdr) of
(Maybe (row -> ColumnIndex -> Maybe rowH)
Nothing, Maybe (RowHeaderWidth rowH)
_, Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
_) -> RenderM n (Result n)
renderList
(Maybe (row -> ColumnIndex -> Maybe rowH)
_, Maybe (RowHeaderWidth rowH)
Nothing, Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
_) -> RenderM n (Result n)
renderList
(Maybe (row -> ColumnIndex -> Maybe rowH)
_, Maybe (RowHeaderWidth rowH)
_, Maybe
(ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
Nothing) -> RenderM n (Result n)
renderList
(Just row -> ColumnIndex -> Maybe rowH
rh, Just (FixedRowHeader ColumnIndex
w), Just ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n
drh) -> (row -> ColumnIndex -> Maybe rowH)
-> ColumnIndex
-> (ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
forall {t}.
(row -> ColumnIndex -> t)
-> ColumnIndex
-> (ListFocused -> ColumnIndex -> Position -> row -> t -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
renderHdrList row -> ColumnIndex -> Maybe rowH
rh ColumnIndex
w ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n
drh Maybe [row]
forall a. Maybe a
Nothing
(Just row -> ColumnIndex -> Maybe rowH
rh, Just (AvailRowHeader ColumnIndex -> ColumnIndex
w), Just ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n
drh) -> (row -> ColumnIndex -> Maybe rowH)
-> ColumnIndex
-> (ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
forall {t}.
(row -> ColumnIndex -> t)
-> ColumnIndex
-> (ListFocused -> ColumnIndex -> Position -> row -> t -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
renderHdrList row -> ColumnIndex -> Maybe rowH
rh (ColumnIndex -> ColumnIndex
w ColumnIndex
aW) ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n
drh Maybe [row]
forall a. Maybe a
Nothing
(Just row -> ColumnIndex -> Maybe rowH
rh, Just (VisibleRowHeaders ColumnIndex -> [rowH] -> ColumnIndex
w), Just ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n
drh) -> let ([row]
rs, [rowH]
rHs) = GenericList n Seq row
-> ColumnIndex
-> (row -> ColumnIndex -> Maybe rowH)
-> ([row], [rowH])
forall n row rowH.
GenericList n Seq row
-> ColumnIndex
-> (row -> ColumnIndex -> Maybe rowH)
-> ([row], [rowH])
visibleRowsAndRowHdrs (MixedTabularList n row cell rowH colH
l MixedTabularList n row cell rowH colH
-> Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
-> GenericList n Seq row
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. IsLabel
"list"
(Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row))
Optic
A_Lens
NoIx
(MixedTabularList n row cell rowH colH)
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
(GenericList n Seq row)
#list) ColumnIndex
aH row -> ColumnIndex -> Maybe rowH
rh
in (row -> ColumnIndex -> Maybe rowH)
-> ColumnIndex
-> (ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
forall {t}.
(row -> ColumnIndex -> t)
-> ColumnIndex
-> (ListFocused -> ColumnIndex -> Position -> row -> t -> Widget n)
-> Maybe [row]
-> RenderM n (Result n)
renderHdrList row -> ColumnIndex -> Maybe rowH
rh (ColumnIndex -> [rowH] -> ColumnIndex
w ColumnIndex
aW [rowH]
rHs) ListFocused
-> ColumnIndex -> Position -> row -> Maybe rowH -> Widget n
drh ([row] -> Maybe [row]
forall a. a -> Maybe a
Just [row]
rs)
handleMixedListEvent :: Ord n => Event -> EventM n (MixedTabularList n row cell rowH colH) ()
handleMixedListEvent :: forall n row cell rowH colH.
Ord n =>
Event -> EventM n (MixedTabularList n row cell rowH colH) ()
handleMixedListEvent Event
e = LensLike'
(Zoomed (EventM n (GenericList n Seq row)) ())
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
-> EventM n (GenericList n Seq row) ()
-> EventM n (MixedTabularList n row cell rowH colH) ()
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom IsLabel
"list"
(LensLike'
(Focusing (StateT (EventState n) IO) ())
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row))
LensLike'
(Zoomed (EventM n (GenericList n Seq row)) ())
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
#list (Event -> EventM n (GenericList n Seq row) ()
forall (t :: * -> *) n e.
(Foldable t, Splittable t, Ord n) =>
Event -> EventM n (GenericList n t e) ()
L.handleListEvent Event
e)
handleMixedListEventVi :: Ord n => Event -> EventM n (MixedTabularList n row cell rowH colH) ()
handleMixedListEventVi :: forall n row cell rowH colH.
Ord n =>
Event -> EventM n (MixedTabularList n row cell rowH colH) ()
handleMixedListEventVi Event
e = LensLike'
(Zoomed (EventM n (GenericList n Seq row)) ())
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
-> EventM n (GenericList n Seq row) ()
-> EventM n (MixedTabularList n row cell rowH colH) ()
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom IsLabel
"list"
(LensLike'
(Focusing (StateT (EventState n) IO) ())
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row))
LensLike'
(Zoomed (EventM n (GenericList n Seq row)) ())
(MixedTabularList n row cell rowH colH)
(GenericList n Seq row)
#list ((Event -> EventM n (GenericList n Seq row) ())
-> Event -> EventM n (GenericList n Seq row) ()
forall (t :: * -> *) n e.
(Foldable t, Splittable t, Ord n) =>
(Event -> EventM n (GenericList n t e) ())
-> Event -> EventM n (GenericList n t e) ()
L.handleListEventVi (\Event
_ -> () -> EventM n (GenericList n Seq row) ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()) Event
e)