gi-gtk-declarative-0.6.0: Declarative GTK+ programming in Haskell

Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Declarative.Widget

Contents

Description

A Widget value can wrap any Patchable widget, hiding the underlying widget type, such that you can embed heterogeneous collections of widgets in containers.

Synopsis

Documentation

data Widget event where Source #

A Widget value wraps a Patchable and EventSource widget, providing a constrained equivalent of a Dynamic value. It is used to support heterogeneous containers of widgets, and to support equality checks on different types of widgets when calculating patches.

Constructors

Widget :: (Typeable widget, Patchable widget, Functor widget, EventSource widget) => widget event -> Widget event 
Instances
Functor Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Widget

Methods

fmap :: (a -> b) -> Widget a -> Widget b #

(<$) :: a -> Widget b -> Widget a #

Patchable Widget Source #

Widget is itself patchable, by delegating to the underlying widget instances.

Instance details

Defined in GI.Gtk.Declarative.Widget

EventSource Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Widget

Methods

subscribe :: Widget event -> SomeState -> (event -> IO ()) -> IO Subscription Source #

(Typeable parent, Typeable child, Patchable (parent child), Functor (parent child), EventSource (parent child)) => FromWidget (parent child) Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Widget

Methods

fromWidget :: parent child event -> Widget event Source #

(Typeable widget, Typeable children, Patchable (Container widget children), EventSource (Container widget children)) => FromWidget (Container widget children) Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Container

Methods

fromWidget :: Container widget children event -> Widget event Source #

Widget to Markup conversion

class FromWidget widget target where Source #

Convert a widget to a target type. This is deliberately unconstrained in it's types, and is used by smart constructors to implement return type polymorphism, so that a smart contructor can return either a Widget, or some specifically typed widget, depending on the context in which it's used.

Methods

fromWidget :: widget event -> target event Source #

Instances
FromWidget widget Widget => FromWidget widget BoxChild Source #

Any widget that can be converted to a Widget can be wrapped as a BoxChild with the default properties.

Instance details

Defined in GI.Gtk.Declarative.Widget.Conversions

Methods

fromWidget :: widget event -> BoxChild event Source #

(Typeable parent, Typeable child, Patchable (parent child), Functor (parent child), EventSource (parent child)) => FromWidget (parent child) Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Widget

Methods

fromWidget :: parent child event -> Widget event Source #

a ~ b => FromWidget (Bin a) (Bin b) Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

Methods

fromWidget :: Bin a event -> Bin b event Source #

(Typeable widget, Typeable children, Patchable (Container widget children), EventSource (Container widget children)) => FromWidget (Container widget children) Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Container

Methods

fromWidget :: Container widget children event -> Widget event Source #

a ~ b => FromWidget (Container a children) (Container b children) Source # 
Instance details

Defined in GI.Gtk.Declarative.Container

Methods

fromWidget :: Container a children event -> Container b children event Source #