grapefruit-ui-0.1.0.7: Declarative user interface programming

Safe HaskellNone
LanguageHaskell98

Graphics.UI.Grapefruit.Backend.Basic

Contents

Description

This module declares a subclass of UIBackend with methods that every reasonable UI backend should implement.

Synopsis

Interface

class UIBackend uiBackend => BasicUIBackend uiBackend where Source #

A subclass of UIBackend which declares basic bricks and boxes.

Minimal complete definition

label, pushButton, lineEditor, box, window

Methods

label :: Brick Widget uiBackend (X :& (Req Text ::: (SSignal `Of` String))) X Source #

A widget showing one line of text.

pushButton :: Brick Widget uiBackend (X :& (Req Text ::: (SSignal `Of` String))) (X :& (Push ::: (DSignal `Of` ()))) Source #

A push button.

lineEditor :: Brick Widget uiBackend X (X :& (Content ::: (SSignal `Of` String))) Source #

An editor for a single line of text.

box :: Orientation -> Box UICircuit Widget Widget uiBackend X X Source #

A widget which aggregates and arbitrary number of other widgets.

window :: Box UIItem Widget Window uiBackend (X :& (Req Title ::: (SSignal `Of` String))) (X :& (Closure ::: (DSignal `Of` ()))) Source #

An ordinary window.

Utilities

data Orientation Source #

An orientation of widgets in a box.

Constructors

Horizontal 
Vertical 

data Caption Source #

A caption of a widget with an optional hotkey marker.

Currently, this type is not used.

Constructors

ColdCaption String

a caption without a hotkey

HotCaption String Char String

a caption consisting of a prefix string, a hotkey and a suffix string

Field names

data Closure Source #

A field name.

Typical properties:

kind
output
type
DSignal `Of` ()
meaning
a “window was closed” event

Constructors

Closure 

data Content Source #

A field name.

Typical properties:

kind
output
type
SSignal `Of` val for some type val
meaning
the content of an editor widget

Constructors

Content 

data Push Source #

A field name.

Typical properties:

kind
output
type
DSignal `Of` ()
meaning
a stream of button push events

Constructors

Push 

data Text Source #

A field name.

Typical properties:

kind
input (required)
type
SSignal `Of` String
meaning
the caption of a widget

Constructors

Text 

data Title Source #

A field name.

Typical properties:

kind
input (required)
type
SSignal `Of` String
meaning
the title of a window

Constructors

Title