Bonjour List,

Thanks to Jeremy O'Donoghue's blog about events, I copied and modified
two functions; but without really understanding what's going on :

windowOnIconize :: Window a -> IO () -> IO ()
windowOnIconize win eventHandler
  = windowOnEvent win [wxEVT_ICONIZE] eventHandler (\evt -> eventHandler)

windowGetOnIconize :: Window a -> IO (IO ())
windowGetOnIconize win
  = unsafeWindowGetHandlerState win wxEVT_ICONIZE skipCurrentEvent

and then somewhere I added:

windowOnIconize win $ putStrLn "Iconize!!!!"

But I've no idea how/where to use the windowGetOnIconize function...

Now when I try the program, I get the Iconize!!!! message when I
(de-)iconize the window, which is great, but I segfault when I close
the window.

David.

2011/9/9 D.V. <dav.v...@gmail.com>:
> 2011/9/9 D.V. <dav.v...@gmail.com>:
>> Bonjour List,
>
>> I'm continuing the search, but if someone has an idea, I'm interested !
>
> Looks like it's called Iconize in wxWidget slang, but now all I've
> found with Iconize is
>
> Graphics.UI.WXCore.WxcClassTypes type IconizeEvent a = Event (CIconizeEvent a)
> Graphics.UI.WXCore.WxcClassTypes data CIconizeEvent a
> Graphics.UI.WXCore.WxcClassInfo classIconizeEvent :: ClassType (IconizeEvent 
> ())
> Graphics.UI.WXCore.WxcClassInfo downcastIconizeEvent :: IconizeEvent a
> -> IconizeEvent ()
> Graphics.UI.WXCore.WxcClassTypes type TIconizeEvent a = TEvent (CIconizeEvent 
> a)
> Graphics.UI.WXCore.WxcClassesMZ topLevelWindowIconize ::
> TopLevelWindow a -> Bool -> IO Bool
> Graphics.UI.WXCore.WxcClassesMZ topLevelWindowIsIconized ::
> TopLevelWindow a -> IO Bool
> Graphics.UI.WXCore.WxcClassesMZ wxEVT_ICONIZE :: EventId
> Graphics.UI.WXCore.WxcDefs wxICONIZE :: Int
>
> I'm not sure how to work with events in wxCore..
>
> David.
>

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to