title: wxHaskell Button State
body: <p>I'm writing an application using wxHaskell and I want to be able to detect the state of a button (whether or not it is pressed at any given time). I'm having a bit of trouble figuring out how to do this, however. First I thought that there might be a "button is pressed" attribute that I could use, but there didn't seem to be. Then I had the idea of maintaining an <code>IORef</code> which I update on button-up and button-down events. However, that would require that the <code>Button</code> object actually <em>have</em> button-up and button-down events, which is does not appear to. It is an instance of <code>Commanding</code>, but I assume that the <code>command</code> event is fired on button-up only, which isn't enough for that idea. Does anyone have any other suggestions?</p>