Safe Haskell | None |
---|---|
Language | Haskell2010 |
A custom layout engine and combinators.
- class Renderable w where
- data Layout = Grid (Seq (Seq Layout))
- beside :: Layout -> Layout -> Layout
- above :: Layout -> Layout -> Layout
- newtype Vertical = Vertical {}
- vertical :: Renderable w => w -> Vertical
- newtype Horizontal = Horizontal {}
- horizontal :: Renderable w => w -> Horizontal
- data Columns
- data a |*| b = a :|*| b
- data a -*- b = a :-*- b
Renderableable widgets
class Renderable w where Source #
Closely related to Widget
, this class represents types that can be rendered to an Element
, either directly or via Layout
.
Renderable String Source # | |
Renderable TextEntry Source # | |
Renderable Element Source # | |
Renderable Columns Source # | |
Renderable Horizontal Source # | |
Renderable Vertical Source # | |
Renderable Layout Source # | |
Renderable (ListBox a) Source # | |
Renderable a => Renderable (UI a) Source # | |
(Renderable a, Renderable b) => Renderable ((-*-) a b) Source # | |
(Renderable a, Renderable b) => Renderable ((|*|) a b) Source # | |
Renderable el => Renderable (GenericWidget el a) Source # | |
Layout engine
Layout monoids
Flat
A monoidal layout builder that places everything in a single column
vertical :: Renderable w => w -> Vertical Source #
newtype Horizontal Source #
A monoidal layout builder that places everything in a single row
horizontal :: Renderable w => w -> Horizontal Source #
Columns
A monoidal layout builder that lays elements in columns
Type level layouts
Type level Horizontal layouts
a :|*| b |
Bifunctor (|*|) Source # | |
Biapplicative (|*|) Source # | |
Bifoldable (|*|) Source # | |
(Renderable a, Renderable b) => Renderable ((|*|) a b) Source # | |
(Editable a, Editable b) => Editable ((|*|) a b) Source # | |
type EditorWidget ((|*|) a b) Source # | |