packages feed

AutoForms-0.4.0: src/Graphics/UI/AF/WxForm.hs

{-# LANGUAGE FlexibleContexts #-}

-- |Import this module to use the WxHaskell instance of AutoForms (called WxForm)
module Graphics.UI.AF.WxForm
    ( module Graphics.UI.AF.General
    , module Graphics.UI.AF.WxForm.WxList
    , EC, ECCreator
    , wxParentProxy
    , SatCxt
    -- * GUI-layout of EC types
    , layoutAs, singleColumn, dualColumn, singleRow, reverseGuis
    , finalDepth
    , Parent(Parent)
    -- * Lifting
    , liftIO, WxM.io
    -- * ComIO handling
    , G.join2
    -- * From WxHaskell
    , Wx.start
    , startWx
    , WxAct, ComH, WxM, ECCreatorD
    )
where

import Graphics.UI.AF.WxForm.WxFormImplementation as AF
import Graphics.UI.AF.WxForm.WxList
import Graphics.UI.AF.WxForm.WxFilePath()
import Graphics.UI.AF.WxForm.WxMaybe()
import Graphics.UI.AF.WxForm.EditorComponent(layoutAs, singleColumn, dualColumn, singleRow)
import Graphics.UI.AF.WxForm.WxM as WxM
import qualified Graphics.UI.AF.WxForm.GenericEC as G

import Graphics.UI.AF.General
import Control.Monad.Trans

import qualified Graphics.UI.WX as Wx

-- |Tells WxForm to try to keep the GUI as small as possible. It will
--  only work from this 'EC' and it's sub-components (sub-ECs).
finalDepth :: EC a -> EC a
finalDepth ec = updateWxM (AF.withMaxDepth (const 0)) ec

startWx :: AutoForm WxAct ComH WxM SatCxt EC => String -> WxM a -> IO ()
startWx = startI