Copyright | Sven Bartscher 2020 |
---|---|
License | MPL-2.0 |
Maintainer | sven.bartscher@weltraumschlangen.de |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module provides miscellaneous helpers for dealing with GTK
Widget
s in reactive contexts.
Synopsis
- holdNotReadyWidget :: (MonadRunGtk m, MonadHold t m) => Event t Widget -> m (Dynamic t Widget)
- holdNotReadyDynamicWidget :: (MonadRunGtk m, MonadHold t m, Reflex t) => Event t (Dynamic t Widget) -> m (Dynamic t Widget)
- notReadyWidget :: IO Widget
Documentation
holdNotReadyWidget :: (MonadRunGtk m, MonadHold t m) => Event t Widget -> m (Dynamic t Widget) Source #
Hold an Event
firing Widget
s in a Dynamic
, automatically
using a notReadyWidget
as the initial value.
holdNotReadyDynamicWidget :: (MonadRunGtk m, MonadHold t m, Reflex t) => Event t (Dynamic t Widget) -> m (Dynamic t Widget) Source #
A variant of holdNotReadyWidget
where Widget
s aren't replaced
directly, but instead different
s are
switched in.Dynamic
t Widget
notReadyWidget :: IO Widget Source #
A widget appropriate for displaying in place of widgets that aren't available yet, e.g. as replacement for widgets that aren't available until post-build time.
The current implementation returns a Spinner
that has been
started (spinnerStart
).
Note that the widget is not widgetShow
n in this
function. If you want the Widget
to be actually shown, you should
call widgetShow
explicitly on it.