| Safe Haskell | None |
|---|
GUI.MLens.Gtk
Description
The main LGtk interface, ideally users should import only this module.
- module Control.MLens
- data I m
- data ListLayout
- = Horizontal
- | Vertical
- vcat :: [I m] -> I m
- hcat :: [I m] -> I m
- smartButton :: (Eq a, Monad m, Functor m) => Free m String -> (a -> m a) -> Ref m a -> I m
- runI :: (forall m. (Functor m, ExtRef m) => I m) -> IO ()
- unsafeRunI :: (forall i. I (Ext i IO)) -> IO ()
- toFree :: (Functor m, Monad m) => m a -> Free m a
Lenses and references
module Control.MLens
GUI combinators
Interface description parametrized by a monad
Constructors
| Label (Free m String) | label |
| Button | button |
| Checkbox (Ref m Bool) | checkbox |
| Combobox [String] (Ref m Int) | combo box |
| Entry (Ref m String) | entry field |
| List ListLayout [I m] | group interfaces into row or column |
| Notebook [(String, I m)] | tabs |
| forall a . Eq a => Cell | dynamic interface |
Fields
| |
| Action (m (I m)) | do an action before giving the interface |
data ListLayout Source
Constructors
| Horizontal | |
| Vertical |
Running GUI descriptions
unsafeRunI :: (forall i. I (Ext i IO)) -> IO ()Source
Run an interface description
Unsafe only if you do nasty things in the IO monad, like forking threads