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

Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Declarative.Container.Class

Description

Shared interfaces 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 Paned Pane Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.Paned

Methods

appendChild :: Paned -> Pane event -> Widget -> IO () Source #

replaceChild :: Paned -> Pane 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 #

newtype Children child event Source #

Common collection type for child widgets, used when patching containers.

Constructors

Children 

Fields

Instances
Functor child => Functor (Children child) Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.Class

Methods

fmap :: (a -> b) -> Children child a -> Children child b #

(<$) :: a -> Children child b -> Children child a #

(Patchable child, Typeable child, IsContainer container child) => Patchable (Container container (Children child)) Source # 
Instance details

Defined in GI.Gtk.Declarative.Container

Methods

create :: Container container (Children child) e -> IO SomeState Source #

patch :: SomeState -> Container container (Children child) e1 -> Container container (Children child) e2 -> Patch Source #

(Typeable child, EventSource child) => EventSource (Container widget (Children child)) Source # 
Instance details

Defined in GI.Gtk.Declarative.Container

Methods

subscribe :: Container widget (Children child) event -> SomeState -> (event -> IO ()) -> IO Subscription Source #

class ToChildren widget parent child | widget -> parent, widget -> child where Source #

Converts a specific collection type to Children.

Methods

toChildren :: (ManagedPtr widget -> widget) -> parent (child event) -> Children child event Source #

toChildren :: parent ~ [] => (ManagedPtr widget -> widget) -> parent (child event) -> Children child event Source #

Instances
ToChildren Box [] BoxChild Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.Box

Methods

toChildren :: (ManagedPtr Box -> Box) -> [BoxChild event] -> Children BoxChild event Source #

ToChildren Menu [] MenuItem Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.MenuItem

Methods

toChildren :: (ManagedPtr Menu -> Menu) -> [MenuItem event] -> Children MenuItem event Source #

ToChildren MenuBar [] MenuItem Source # 
Instance details

Defined in GI.Gtk.Declarative.Container.MenuItem

Methods

toChildren :: (ManagedPtr MenuBar -> MenuBar) -> [MenuItem event] -> Children MenuItem event Source #

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 #