grapefruit-ui-0.0.0.0: Declarative user interface programmingSource codeContentsIndex
Graphics.UI.Grapefruit.Backend.Std
Contents
Interface
Utilities
Field names
Description
This module declares a subclass of UIBackend with methods that every reasonable UI backend should implement.
Synopsis
class UIBackend uiBackend => StdUIBackend uiBackend where
label :: Brick Widget uiBackend (X :& (Req Text ::: (SSignal `Of` String))) X
pushButton :: Brick Widget uiBackend (X :& (Req Text ::: (SSignal `Of` String))) (X :& (Push ::: (DSignal `Of` ())))
box :: Orientation -> Box UICircuit Widget Widget uiBackend X X
window :: Box UIItem Widget Window uiBackend (X :& (Req Title ::: (SSignal `Of` String))) (X :& (Closure ::: (DSignal `Of` ())))
data Orientation
= Horizontal
| Vertical
data Caption
= ColdCaption String
| HotCaption String Char String
data Closure = Closure
data Push = Push
data Text = Text
data Title = Title
Interface
class UIBackend uiBackend => StdUIBackend uiBackend whereSource
A subclass of UIBackend which declares standard bricks and boxes.
Methods
label :: Brick Widget uiBackend (X :& (Req Text ::: (SSignal `Of` String))) XSource
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.
box :: Orientation -> Box UICircuit Widget Widget uiBackend X XSource
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 Stringa caption without a hotkey
HotCaption String Char Stringa 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 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
Produced by Haddock version 2.4.2