grapefruit-ui-0.1.0.7: Declarative user interface programming

Safe HaskellNone
LanguageHaskell98

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 where Source #

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.

Minimal complete definition

(|>>), (>>|), loop, toUICircuit, fromUIItem

Methods

(|>>) :: Circuit era i tmp -> uiComp item uiBackend era tmp o -> uiComp item uiBackend era i o infixr 1 Source #

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 o infixr 1 Source #

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 o Source #

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 o Source #

Converts a user interface component into a user interface circuit.

fromUIItem :: UIItem item uiBackend era i o -> uiComp item uiBackend era i o Source #

Converts a user interface item into a user interface component.

Instances

UIComp UICircuit Source # 

Methods

(|>>) :: Circuit era i tmp -> UICircuit item uiBackend era tmp o -> UICircuit item uiBackend era i o Source #

(>>|) :: UICircuit item uiBackend era i tmp -> Circuit era tmp o -> UICircuit item uiBackend era i o Source #

loop :: UICircuit item uiBackend era (i, feedback) (o, feedback) -> UICircuit item uiBackend era i o Source #

toUICircuit :: UICircuit item uiBackend era i o -> UICircuit item uiBackend era i o Source #

fromUIItem :: UIItem item uiBackend era i o -> UICircuit item uiBackend era i o Source #

UIComp UIItem Source # 

Methods

(|>>) :: Circuit era i tmp -> UIItem item uiBackend era tmp o -> UIItem item uiBackend era i o Source #

(>>|) :: UIItem item uiBackend era i tmp -> Circuit era tmp o -> UIItem item uiBackend era i o Source #

loop :: UIItem item uiBackend era (i, feedback) (o, feedback) -> UIItem item uiBackend era i o Source #

toUICircuit :: UIItem item uiBackend era i o -> UICircuit item uiBackend era i o Source #

fromUIItem :: UIItem item uiBackend era i o -> UIItem item uiBackend era i o Source #

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

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 o Source #

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 (>>|).