keera-hails-reactive-gtk-0.1: Haskell on Gtk rails - Reactive Fields for Gtk widgets

Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.Reactive.Property

Contents

Description

Publishes the main elements of a scale as reactive fields

Synopsis

Attributes as reactive values

Signal-based reactimation functions.

reactiveProperty :: Eq b => self -> Signal self (IO ()) -> Attr self b -> ReactiveFieldReadWrite IO b Source

Create an RV based on a widget's attribute and signal. Before setting, the value is checked against the current one. If they are the same, the value is *not* set.

reactivePropertyNE :: self -> Signal self (IO ()) -> Attr self b -> ReactiveFieldReadWrite IO b Source

Create an RV based on a widget's attribute and signal. Before setting, the value is *not* checked against the current one. The value is thus set even if they are the same.

Handler-based reactimation functions

reactivePropertyH :: Eq b => self -> (self -> IO () -> IO (ConnectId self)) -> Attr self b -> ReactiveFieldReadWrite IO b Source

Create an RV based on a widget's attribute and a handler. Before setting, the value is checked against the current one. If they are the same, the value is *not* set.

Passive properties

passiveProperty :: Eq b => self -> Attr self b -> ReactiveFieldReadWrite IO b Source

A passive reactive value is one that does not report when it changes.

This function returns a RW RV that encloses the given property, without firing change events. The value of the attribute is *not* set if it is the same as the current one.

To set without diffing, see passivePropertyNE.

passivePropertyNE :: self -> Attr self b -> ReactiveFieldReadWrite IO b Source

Return a RW RV that encloses the given property, without firing change events.

When writing to this RV, the value is *not* diffed against the previous one. The underlying widget can thus still fire signals based on that change.