grapefruit-ui-0.1.0.4: Declarative user interface programming

Safe HaskellNone

Graphics.UI.Grapefruit.Comp

Description

This module provides general support for user interface components.

A user interface component is either a user interface item or a user interface circuit. UI items are introduced by Graphics.UI.Grapefruit.Item and UI circuits by Graphics.UI.Grapefruit.Circuit.

Synopsis

Documentation

class UIComp uiComp whereSource

The class of all user interface components.

A user interface component is a part of a user interface which communicates with the remainder of the user interface through signals.

Methods

(|>>) :: Circuit era i tmp -> uiComp item uiBackend era tmp o -> uiComp item uiBackend era i oSource

Adds a circuit before a user interface component.

This does not add any items to the user interface but may add data manipulation and control functionality.

(>>|) :: uiComp item uiBackend era i tmp -> Circuit era tmp o -> uiComp item uiBackend era i oSource

Adds a circuit after a user interface component.

This does not add any items to the user interface but may add data manipulation and control functionality.

loop :: uiComp item uiBackend era (i, feedback) (o, feedback) -> uiComp item uiBackend era i oSource

Adds a feedback loop to a user interface component.

This method is completely analogous to the loop method of ArrowLoop. It is provided because not every instance of UIComp is an arrow.

toUICircuit :: uiComp item uiBackend era i o -> UICircuit item uiBackend era i oSource

Converts a user interface component into a user interface circuit.

fromUIItem :: UIItem item uiBackend era i o -> uiComp item uiBackend era i oSource

Converts a user interface item into a user interface component.

(<<|) :: UIComp uiComp => uiComp item uiBackend era tmp o -> Circuit era i tmp -> uiComp item uiBackend era i oSource

Puts a circuit before a user interface component.

This does not add any items to the user interface but may add data manipulation and control functionality. (<<|) is equivalent to flip (|>>).

(|<<) :: UIComp uiComp => Circuit era tmp o -> uiComp item uiBackend era i tmp -> uiComp item uiBackend era i oSource

Puts a circuit after a user interface component.

This does not add any items to the user interface but may add data manipulation and control functionality. (|<<) is equivalent to flip (>>|).