Safe Haskell | None |
---|---|
Language | Haskell2010 |
A custom layout engine and combinators.
Synopsis
- class Renderable w where
- data Layout where
- 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
.
Instances
Renderable String Source # | |
Renderable TextEntry Source # | |
Renderable Element Source # | |
Renderable Columns Source # | |
Renderable Horizontal Source # | |
Defined in Graphics.UI.Threepenny.Editors.Layout | |
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 w => Renderable (EditorCollection k w) Source # | |
Defined in Graphics.UI.Threepenny.Editors.Types | |
Renderable el => Renderable (GenericWidget el a) Source # | |
Defined in Graphics.UI.Threepenny.Editors.Types |
Layout engine
A rathe limited, grid layout builder, probably not fit for general purpose use yet.
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
Instances
Semigroup Horizontal Source # | |
Defined in Graphics.UI.Threepenny.Editors.Layout (<>) :: Horizontal -> Horizontal -> Horizontal # sconcat :: NonEmpty Horizontal -> Horizontal # stimes :: Integral b => b -> Horizontal -> Horizontal # | |
Monoid Horizontal Source # | |
Defined in Graphics.UI.Threepenny.Editors.Layout mempty :: Horizontal # mappend :: Horizontal -> Horizontal -> Horizontal # mconcat :: [Horizontal] -> Horizontal # | |
Renderable Horizontal Source # | |
Defined in Graphics.UI.Threepenny.Editors.Layout |
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 |
Instances
Type level Vertical layouts
a :-*- b |