{-# LANGUAGE ExistentialQuantification #-} module Graphics.Tools.WX where import Graphics.UI.WXCore.Image import Graphics.UI.WXCore.WxcTypes import Graphics.UI.WXCore.WxcDefs import Graphics.UI.WXCore.WxcClasses import Graphics.UI.WXCore.Types import Graphics.UI.WXCore.Defines class WxPaintable p where doPaint :: DC a -> Point -> p -> IO () paintSize :: p -> Size paintSize x = sz 0 0 data PaintableBox = forall a . WxPaintable a => PB a instance WxPaintable PaintableBox where doPaint dc p (PB b) = doPaint dc p b paintSize (PB b) = paintSize b class WxColor c where toColor :: c -> Color class WxImage i where toSize :: i -> IO (Size) toImage :: i -> IO (Image ())