Safe Haskell | None |
---|---|
Language | Haskell2010 |
The central patching type class of this library.
Documentation
A possible action to take on an existing Widget
, decided by the
patch
method when comparing declarative widgets.
Modify (IO SomeState) | An |
Replace (IO SomeState) | Replace the current |
Keep | Do nothing, i.e. keep the |
class Patchable widget where Source #
A patchable widget is one that can create an underlying GTK widget, or
calculate a Patch
to be applied to an existing GTK widget that was
previously created.
create :: widget e -> IO SomeState Source #
Given a declarative widget that is Patchable
, return an IO action that
can create a new corresponding Widget
. The created widget should be
use in corresponding patch modifications, until it is replaced.
patch :: SomeState -> widget e1 -> widget e2 -> Patch Source #
Given two declarative widgets of the same widget type (but not
necessarily of the same event types,) calculate a Patch
.
Instances
Patchable Widget Source # |
|
Patchable BoxChild Source # | |
Patchable MenuItem Source # | |
Patchable (SingleWidget widget) Source # | |
Defined in GI.Gtk.Declarative.SingleWidget create :: SingleWidget widget e -> IO SomeState Source # patch :: SomeState -> SingleWidget widget e1 -> SingleWidget widget e2 -> Patch Source # | |
(BinChild parent child, Patchable child) => Patchable (Bin parent child) Source # | |
(Patchable child, Typeable child, IsContainer container child) => Patchable (Container container (Children child)) Source # | |