frame-0.1: A simple web framework.

Frame.GUI

Contents

Description

A subset of the GUI required to build a useful view

Synopsis

GUI

data GUI Source

A generic GUI whose various instances define how it should be output (e.g. Show outputs HTML).

Constructors

Frame String [URL] [Container]

A frame with a title, some style and a set of containers

Instances

class Composable a whereSource

Methods

(<+) :: a -> Container -> aSource

(+>) :: Container -> a -> aSource

data Container Source

Contains various 'block level' elements

Constructors

Panel [Container] [Class]

Panel matches up with a div when output as HTML

Paragraph [Element] [Class]

Paragraphs can only only contain elements

Code String

Code

Quote [Container]

Quote

Header Int [Element]

Header (int is size)

List [[Container]] [Class]

Lists contain list items

NumList [[Container]] [Class]

Lists contain list items

Form [FormElement] [Class]

A form

Error [Container]

Error pane

Line 
Empty 

type URL = StringSource

A URL

data Element Source

Constructors

Element Element'

Plain element

Link URL Element'

Element wrapped in a link

Strong [Element]

Element wrapped in a link

Emphasis [Element]

Element wrapped in a link

Break

Line break

Instances

data Element' Source

Constructors

Text String

Textual element

Image URL String

Image element

Instances

Forms

type Label = StringSource

A label

data FormElement Source

Constructors

FormGroup [FormElement] Label

For grouping elements

TextField FieldName Label FormValue (Maybe Int) (Maybe Container)

Standard text box

HiddenField FieldName FormValue

Hidden field

TextArea FieldName Label FormValue (Maybe Container)

Larger text box

Button FieldName FormValue

Submit button

ButtonLink Label URL

Special textual button

Instances

type FormValue = WrapperTypeSource

Form values are just wrapped types