Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Widget event where
- class FromWidget widget target where
- fromWidget :: (Typeable widget, Typeable event) => widget event -> target event
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.
Widget :: (Typeable widget, Patchable widget, Functor widget, EventSource widget) => widget event -> Widget event |
Instances
Functor Widget Source # | |
Patchable Widget Source # |
|
EventSource Widget Source # | |
Defined in GI.Gtk.Declarative.Widget | |
(Patchable (parent child), Functor (parent child), EventSource (parent child)) => FromWidget (parent child) Widget Source # | |
Defined in GI.Gtk.Declarative.Widget | |
(Typeable widget, Typeable children, Patchable (Container widget children), EventSource (Container widget children), Functor (Container widget children)) => FromWidget (Container widget children) Widget Source # | |
Defined in GI.Gtk.Declarative.Container |
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.
fromWidget :: (Typeable widget, Typeable event) => widget event -> target event Source #
Instances
FromWidget widget Widget => FromWidget widget BoxChild Source # | Any widget that can be converted to a |
Defined in GI.Gtk.Declarative.Widget.Conversions | |
(Patchable (parent child), Functor (parent child), EventSource (parent child)) => FromWidget (parent child) Widget Source # | |
Defined in GI.Gtk.Declarative.Widget | |
a ~ b => FromWidget (Bin a) (Bin b) Source # | |
Defined in GI.Gtk.Declarative.Bin | |
(Typeable widget, Typeable children, Patchable (Container widget children), EventSource (Container widget children), Functor (Container widget children)) => FromWidget (Container widget children) Widget Source # | |
Defined in GI.Gtk.Declarative.Container | |
a ~ b => FromWidget (Container a children) (Container b children) Source # | |
Defined in GI.Gtk.Declarative.Container |