gi-gtk-declarative-0.3.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 #

BinChild ApplicationWindow Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

BinChild Dialog Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

BinChild ListBoxRow Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

BinChild MenuItem Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

BinChild ScrolledWindow Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

BinChild Window Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

ToChildren ListBox [] (Bin ListBoxRow Widget) Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.ListBox

Methods

toChildren :: (ManagedPtr ListBox -> ListBox) -> [Bin ListBoxRow Widget event] -> Children (Bin ListBoxRow Widget) event Source #

IsContainer ListBox (Bin ListBoxRow Widget) Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.Patch

Methods

appendChild :: ListBox -> Bin ListBoxRow Widget event -> Widget0 -> IO () Source #

replaceChild :: ListBox -> Bin ListBoxRow Widget event -> Int32 -> Widget0 -> Widget0 -> IO () Source #

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

Defined in GI.Gtk.Declarative.Widget

Methods

fromWidget :: (Typeable (parent child), Typeable event) => parent child event -> Widget event Source #

(BinChild widget child, Patchable child, EventSource child) => FromWidget (Bin widget child) Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

Methods

fromWidget :: (Typeable (Bin widget child), Typeable event) => Bin widget child event -> Widget event Source #

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

Defined in GI.Gtk.Declarative.Container

Methods

fromWidget :: (Typeable (Container widget children), Typeable event) => 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.

Minimal complete definition

fromWidget

Methods

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 Widget can be wrapped as a BoxChild with the default properties.

Instance details

Defined in GI.Gtk.Declarative.Widget.Conversions

Methods

fromWidget :: (Typeable widget, Typeable event) => widget event -> BoxChild event Source #

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

Defined in GI.Gtk.Declarative.Widget

Methods

fromWidget :: (Typeable (parent child), Typeable event) => parent child event -> Widget event Source #

(BinChild widget child, Patchable child, EventSource child) => FromWidget (Bin widget child) Widget Source # 
Instance details

Defined in GI.Gtk.Declarative.Bin

Methods

fromWidget :: (Typeable (Bin widget child), Typeable event) => Bin widget child event -> Widget event Source #

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

Defined in GI.Gtk.Declarative.Container

Methods

fromWidget :: (Typeable (Container widget children), Typeable event) => Container widget children event -> Widget event Source #

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

Defined in GI.Gtk.Declarative.Bin

Methods

fromWidget :: (Typeable (Bin a c), Typeable event) => Bin a c event -> Bin b d event Source #

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

Defined in GI.Gtk.Declarative.Container

Methods

fromWidget :: (Typeable (Container a children), Typeable event) => Container a children event -> Container b children event Source #