_button :: Bool -> IO Gtk.Button -> Widget (React.Event ())
_button isDefault constr = Widget {
    widgetRealize = do
        btn <- liftIO $ do 
            btn <- constr
            Gtk.set btn [ Gtk.widgetCanDefault Gtk.:= isDefault ]
            return btn
        React.liftIOLater $ Gtk.set btn [ Gtk.widgetHasDefault Gtk.:= isDefault ]
        let add handler = do
            cid <- btn `Gtk.on` Gtk.buttonActivated $ handler ()
            return (Gtk.signalDisconnect cid)
        result <- React.fromAddHandler add
        return (Gtk.toWidget btn, result)
}
_button :: Bool -> IO Gtk.Button -> Widget (React.Event ())
_button isDefault constr = Widget {
    widgetRealize = do
        btn <- liftIO $ do 
            btn <- constr
            Gtk.set btn [ Gtk.widgetCanDefault Gtk.:= isDefault ]
            return btn
        React.liftIOLater $ Gtk.set btn [ Gtk.widgetHasDefault Gtk.:= isDefault ]
        let add handler = do
            cid <- btn `Gtk.on` Gtk.buttonActivated $ handler ()
            return (Gtk.signalDisconnect cid)
        result <- React.fromAddHandler add
        return (Gtk.toWidget btn, result)
}
_button isDefault constr = Widget {
    widgetRealize = do
        btn <- liftIO $ do 
            btn <- constr
            Gtk.set btn [ Gtk.widgetCanDefault Gtk.:= isDefault ]
            return btn
        React.liftIOLater $ Gtk.set btn [ Gtk.widgetHasDefault Gtk.:= isDefault ]
        let add handler = do
            cid <- btn `Gtk.on` Gtk.buttonActivated $ handler ()
            return (Gtk.signalDisconnect cid)
        result <- React.fromAddHandler add
        return (Gtk.toWidget btn, result)
}