grapefruit-ui-0.0.0.0: Declarative user interface programmingSource codeContentsIndex
Graphics.UI.Grapefruit.Interfacing
Contents
Interfacing
Inner components
Description
This module is about creating interfaces of UI items.
Synopsis
data Interfacing nativeItem era i o
basic :: (Subrecord extIShape iShape, Subrecord extOShape oShape) => ContextConsumerRecord nativeItem iShape -> ContextProducerRecord nativeItem oShape -> Interfacing nativeItem era (SignalRecord era extIShape) (SignalRecord era extOShape)
with :: UIComp uiComp => (nativeItem -> Placement innerItem uiBackend) -> uiComp innerItem uiBackend era innerI innerO -> Interfacing nativeItem era baseI baseO -> Interfacing nativeItem era (baseI `With` innerI) (baseO `With` innerO)
data With base inner = base With inner
Interfacing
data Interfacing nativeItem era i o Source

Describes communication of an item with its environment.

An interfacing is a mapping from native items to circuits. These circuits handle input consumption and output production.

basic :: (Subrecord extIShape iShape, Subrecord extOShape oShape) => ContextConsumerRecord nativeItem iShape -> ContextProducerRecord nativeItem oShape -> Interfacing nativeItem era (SignalRecord era extIShape) (SignalRecord era extOShape)Source

Creates an interfacing based on signal connectors (consumers and producers).

The input and output are signal records. The only restriction to these records is that their fields must have corresponding fields in the connector records. The order of fields in the signal records may differ from the order of connector fields and there may be connector fields without a corresponding signal field. Connectors, for which no signal field exists, are not performed.

withSource
:: UIComp uiComp
=> nativeItem -> Placement innerItem uiBackendconversion from a native item into the placement for its inner items
-> uiComp innerItem uiBackend era innerI innerOan inner user interface component
-> Interfacing nativeItem era baseI baseOan interfacing to which the inner component interfacing shall be added
-> Interfacing nativeItem era (baseI `With` innerI) (baseO `With` innerO)
Extends an interfacing so that the resulting interfacing also adds an inner component to the UI item in question and extends the input and output to contain the input and output of the inner component.
Inner components
data With base inner Source
An input or output, extended with the input or output of an inner component.
Constructors
base With inner
Produced by Haddock version 2.4.2