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

Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Declarative.Container.Patch

Contents

Description

This module implements the patch algorithm for containers.

Synopsis

Documentation

class IsContainer container child | container -> child where Source #

Describes supported GTK+ containers and their specialized APIs for appending and replacing child widgets.

Minimal complete definition

appendChild, replaceChild

Methods

appendChild Source #

Arguments

:: container

Container widget

-> child event

Declarative child widget

-> Widget

GTK child widget to append

-> IO () 

Append a child widget to the container.

replaceChild Source #

Arguments

:: container

Container widget

-> child event

Declarative child widget

-> Int32

Index to replace at

-> Widget

Old GTK widget to replace

-> Widget

New GTK widget to replace with

-> IO () 

Replace the child widget at the given index in the container.

Instances
IsContainer Box BoxChild Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.Patch

Methods

appendChild :: Box -> BoxChild event -> Widget -> IO () Source #

replaceChild :: Box -> BoxChild event -> Int32 -> Widget -> Widget -> IO () Source #

IsContainer Menu MenuItem Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.MenuItem

Methods

appendChild :: Menu -> MenuItem event -> Widget -> IO () Source #

replaceChild :: Menu -> MenuItem event -> Int32 -> Widget -> Widget -> IO () Source #

IsContainer MenuBar MenuItem Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.MenuItem

Methods

appendChild :: MenuBar -> MenuItem event -> Widget -> IO () Source #

replaceChild :: MenuBar -> MenuItem event -> Int32 -> Widget -> Widget -> IO () Source #

IsContainer MenuShell MenuItem Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.MenuItem

Methods

appendChild :: MenuShell -> MenuItem event -> Widget -> IO () Source #

replaceChild :: MenuShell -> MenuItem event -> Int32 -> Widget -> Widget -> IO () 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 #

patchInContainer :: (IsWidget container, IsContainer container, Patchable child, IsContainer container child) => StateTree ContainerState container child event cs -> container -> Vector (child e1) -> Vector (child e2) -> IO (StateTree ContainerState container child event cs) Source #

Patch all children in a container. This does not feature any ID checking, as seen in React, so reordering children in a container can produce many updates.

Orphan instances

IsContainer Box BoxChild Source # 
Instance details

Methods

appendChild :: Box -> BoxChild event -> Widget -> IO () Source #

replaceChild :: Box -> BoxChild event -> Int32 -> Widget -> Widget -> IO () Source #

IsContainer ListBox (Bin ListBoxRow Widget) Source # 
Instance details

Methods

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

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