Re: GUIs and events/callbacks
George Russell <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.gui |
|---|---|
| Message-ID | <[email protected]> |
Glynn wrote (snipped)
> Does this mechanism allow the toolkit to determine whether an event is
> being listened for? Or would it force the toolkit to always generate
> all events just in case it's being listened for? The latter is
> unacceptable on X.
Yes. You'll see I provided an IO *action*
clicked :: Clickable widget => widget -> IO (Event ())
This tells the toolkit to *generate* an event whenever a button (or
whatever "widget" is) is clicked.
I agree that the alternative, for general GUI events, would be unacceptable.