_layoutInButtonBox :: Gtk.ButtonBoxClass bb => IO bb -> Gtk.ButtonBoxStyle -> WidgetNetwork a -> WidgetNetwork b -> Widget (a, b)
_layoutInButtonBox boxNew style (WidgetNetwork primPack) (WidgetNetwork secPack) = Widget {
    widgetRealize = do
        btnBox <- liftIO $ do
            btnBox <- boxNew
            Gtk.buttonBoxSetLayout btnBox style
            Gtk.boxSetSpacing btnBox 6
            return btnBox
        result <- liftA2 (,)
            (primPack (_addToBox Gtk.PackGrow btnBox))
            (secPack (_addToBoxSec btnBox))
        return (Gtk.toWidget btnBox, result)
} where
    _addToBoxSec btnBox child = do
        _addToBox Gtk.PackGrow btnBox child
        Gtk.buttonBoxSetChildSecondary btnBox child True
_layoutInButtonBox :: Gtk.ButtonBoxClass bb => IO bb -> Gtk.ButtonBoxStyle -> WidgetNetwork a -> WidgetNetwork b -> Widget (a, b)
_layoutInButtonBox boxNew style (WidgetNetwork primPack) (WidgetNetwork secPack) = Widget {
    widgetRealize = do
        btnBox <- liftIO $ do
            btnBox <- boxNew
            Gtk.buttonBoxSetLayout btnBox style
            Gtk.boxSetSpacing btnBox 6
            return btnBox
        result <- liftA2 (,)
            (primPack (_addToBox Gtk.PackGrow btnBox))
            (secPack (_addToBoxSec btnBox))
        return (Gtk.toWidget btnBox, result)
} where
    _addToBoxSec btnBox child = do
        _addToBox Gtk.PackGrow btnBox child
        Gtk.buttonBoxSetChildSecondary btnBox child True
_layoutInButtonBox boxNew style (WidgetNetwork primPack) (WidgetNetwork secPack) = Widget {
    widgetRealize = do
        btnBox <- liftIO $ do
            btnBox <- boxNew
            Gtk.buttonBoxSetLayout btnBox style
            Gtk.boxSetSpacing btnBox 6
            return btnBox
        result <- liftA2 (,)
            (primPack (_addToBox Gtk.PackGrow btnBox))
            (secPack (_addToBoxSec btnBox))
        return (Gtk.toWidget btnBox, result)
} where
    _addToBoxSec btnBox child = do
        _addToBox Gtk.PackGrow btnBox child
        Gtk.buttonBoxSetChildSecondary btnBox child True