threepenny-editors-0.5.6: Composable algebraic editors

Safe HaskellNone
LanguageHaskell2010

Graphics.UI.Threepenny.Editors.Layout

Contents

Description

A custom layout engine and combinators.

Synopsis

Renderableable widgets

class Renderable w where #

Closely related to Widget, this class represents types that can be rendered to an Element, either directly or via Layout.

Minimal complete definition

render | getLayout

Methods

render :: w -> UI Element #

getLayout :: w -> Layout #

Layout engine

data Layout #

A rathe limited, grid layout builder, probably not fit for general purpose use yet.

Constructors

Grid (Seq (Seq Layout))

A non empty list of rows, where all the rows are assumed to have the same length

Bundled Patterns

pattern Single :: UI Element -> Layout 

Layout monoids

Flat

newtype Vertical #

A monoidal layout builder that places everything in a single column

Constructors

Vertical 

Fields

newtype Horizontal #

A monoidal layout builder that places everything in a single row

Constructors

Horizontal 

Columns

data Columns #

A monoidal layout builder that lays elements in columns

Constructors

Next Layout

Continue in the same column

Break Layout

Continue in the next column

Type level layouts

data a |*| b #

Type level Horizontal layouts

Constructors

a :|*| b 

Instances

Bifoldable (|*|) # 

Methods

bifold :: Monoid m => (m |*| m) -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (a |*| b) -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (a |*| b) -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (a |*| b) -> c #

Bifunctor (|*|) # 

Methods

bimap :: (a -> b) -> (c -> d) -> (a |*| c) -> b |*| d #

first :: (a -> b) -> (a |*| c) -> b |*| c #

second :: (b -> c) -> (a |*| b) -> a |*| c #

Biapplicative (|*|) # 

Methods

bipure :: a -> b -> a |*| b #

(<<*>>) :: ((a -> b) |*| (c -> d)) -> (a |*| c) -> b |*| d #

(*>>) :: (a |*| b) -> (c |*| d) -> c |*| d #

(<<*) :: (a |*| b) -> (c |*| d) -> a |*| b #

Generic ((|*|) a b) # 

Associated Types

type Code (a |*| b) :: [[*]] #

Methods

from :: (a |*| b) -> Rep (a |*| b) #

to :: Rep (a |*| b) -> a |*| b #

HasDatatypeInfo ((|*|) a b) # 

Associated Types

type DatatypeInfoOf (a |*| b) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a |*| b) -> DatatypeInfo (Code (a |*| b)) #

(HasEmpty a, HasEmpty b) => HasEmpty ((|*|) a b) # 

Methods

emptyValue :: a |*| b #

(Renderable a, Renderable b) => Renderable ((|*|) a b) # 

Methods

render :: (a |*| b) -> UI Element #

getLayout :: (a |*| b) -> Layout #

(Editable a, Editable b) => Editable ((|*|) a b) # 

Associated Types

type EditorWidget (a |*| b) :: * #

type ListEditorWidget (a |*| b) :: * #

Methods

editor :: Editor (a |*| b) (EditorWidget (a |*| b)) (a |*| b) #

listEditor :: Editor [a |*| b] (ListEditorWidget (a |*| b)) [a |*| b] #

type Code ((|*|) a b) # 
type Code ((|*|) a b) = (:) [*] ((:) * a ((:) * b ([] *))) ([] [*])
type DatatypeInfoOf ((|*|) a b) # 
type DatatypeInfoOf ((|*|) a b) = ADT "Graphics.UI.Threepenny.Editors.Layout" "|*|" ((:) ConstructorInfo (Infix ":|*|" LeftAssociative 9) ([] ConstructorInfo))
type EditorWidget ((|*|) a b) # 
type ListEditorWidget ((|*|) a b) # 

data a -*- b #

Type level Vertical layouts

Constructors

a :-*- b 

Instances

Bifoldable (-*-) # 

Methods

bifold :: Monoid m => (m -*- m) -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (a -*- b) -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (a -*- b) -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (a -*- b) -> c #

Bifunctor (-*-) # 

Methods

bimap :: (a -> b) -> (c -> d) -> (a -*- c) -> b -*- d #

first :: (a -> b) -> (a -*- c) -> b -*- c #

second :: (b -> c) -> (a -*- b) -> a -*- c #

Biapplicative (-*-) # 

Methods

bipure :: a -> b -> a -*- b #

(<<*>>) :: ((a -> b) -*- (c -> d)) -> (a -*- c) -> b -*- d #

(*>>) :: (a -*- b) -> (c -*- d) -> c -*- d #

(<<*) :: (a -*- b) -> (c -*- d) -> a -*- b #

Generic ((-*-) a b) # 

Associated Types

type Code (a -*- b) :: [[*]] #

Methods

from :: (a -*- b) -> Rep (a -*- b) #

to :: Rep (a -*- b) -> a -*- b #

HasDatatypeInfo ((-*-) a b) # 

Associated Types

type DatatypeInfoOf (a -*- b) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a -*- b) -> DatatypeInfo (Code (a -*- b)) #

(HasEmpty a, HasEmpty b) => HasEmpty ((-*-) a b) # 

Methods

emptyValue :: a -*- b #

(Renderable a, Renderable b) => Renderable ((-*-) a b) # 

Methods

render :: (a -*- b) -> UI Element #

getLayout :: (a -*- b) -> Layout #

(Editable a, Editable b) => Editable ((-*-) a b) # 

Associated Types

type EditorWidget (a -*- b) :: * #

type ListEditorWidget (a -*- b) :: * #

Methods

editor :: Editor (a -*- b) (EditorWidget (a -*- b)) (a -*- b) #

listEditor :: Editor [a -*- b] (ListEditorWidget (a -*- b)) [a -*- b] #

type Code ((-*-) a b) # 
type Code ((-*-) a b) = (:) [*] ((:) * a ((:) * b ([] *))) ([] [*])
type DatatypeInfoOf ((-*-) a b) # 
type DatatypeInfoOf ((-*-) a b) = ADT "Graphics.UI.Threepenny.Editors.Layout" "-*-" ((:) ConstructorInfo (Infix ":-*-" LeftAssociative 9) ([] ConstructorInfo))
type EditorWidget ((-*-) a b) # 
type ListEditorWidget ((-*-) a b) #