Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GtkOverlay is a container which contains a single main child, on top
of which it can place “overlay” widgets. The position of each overlay
widget is determined by its Widget
:halign
and Widget
:valign
properties. E.g. a widget with both alignments set to AlignStart
will be placed at the top left corner of the GtkOverlay container,
whereas an overlay with halign set to AlignCenter
and valign set
to AlignEnd
will be placed a the bottom edge of the GtkOverlay,
horizontally centered. The position can be adjusted by setting the margin
properties of the child to non-zero values.
More complicated placement of overlays is possible by connecting
to the Overlay
::get-child-position
signal.
GtkOverlay as GtkBuildable
The GtkOverlay implementation of the GtkBuildable interface
supports placing a child as an overlay by specifying “overlay” as
the “type” attribute of a <child>
element.
- newtype Overlay = Overlay (ManagedPtr Overlay)
- class GObject o => IsOverlay o
- toOverlay :: IsOverlay o => o -> IO Overlay
- noOverlay :: Maybe Overlay
- data OverlayAddOverlayMethodInfo
- overlayAddOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m ()
- data OverlayGetOverlayPassThroughMethodInfo
- overlayGetOverlayPassThrough :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m Bool
- overlayNew :: (HasCallStack, MonadIO m) => m Overlay
- data OverlayReorderOverlayMethodInfo
- overlayReorderOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> Int32 -> m ()
- data OverlaySetOverlayPassThroughMethodInfo
- overlaySetOverlayPassThrough :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> Bool -> m ()
Exported types
GObject Overlay Source # | |
IsImplementorIface Overlay Source # | |
IsObject Overlay Source # | |
IsWidget Overlay Source # | |
IsContainer Overlay Source # | |
IsBin Overlay Source # | |
IsBuildable Overlay Source # | |
IsOverlay Overlay Source # | |
((~) * info (ResolveOverlayMethod t Overlay), MethodInfo * info Overlay p) => IsLabel t (Overlay -> p) Source # | |
((~) * info (ResolveOverlayMethod t Overlay), MethodInfo * info Overlay p) => IsLabelProxy t (Overlay -> p) Source # | |
HasAttributeList * Overlay Source # | |
type AttributeList Overlay Source # | |
type SignalList Overlay Source # | |
Methods
addOverlay
data OverlayAddOverlayMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsOverlay a, IsWidget b) => MethodInfo * OverlayAddOverlayMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds widget
to overlay
.
The widget will be stacked on top of the main widget
added with containerAdd
.
The position at which widget
is placed is determined
from its Widget
:halign
and Widget
:valign
properties.
Since: 3.2
getOverlayPassThrough
data OverlayGetOverlayPassThroughMethodInfo Source #
((~) * signature (b -> m Bool), MonadIO m, IsOverlay a, IsWidget b) => MethodInfo * OverlayGetOverlayPassThroughMethodInfo a signature Source # | |
overlayGetOverlayPassThrough Source #
:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: whether the widget is a pass through child. |
Convenience function to get the value of the Overlay
:pass-through
child property for widget
.
Since: 3.18
new
:: (HasCallStack, MonadIO m) | |
=> m Overlay | Returns: a new |
Creates a new Overlay
.
Since: 3.2
reorderOverlay
data OverlayReorderOverlayMethodInfo Source #
((~) * signature (b -> Int32 -> m ()), MonadIO m, IsOverlay a, IsWidget b) => MethodInfo * OverlayReorderOverlayMethodInfo a signature Source # | |
overlayReorderOverlay Source #
:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
Moves child
to a new index
in the list of overlay
children.
The list contains overlays in the order that these were
added to overlay
.
A widget’s index in the overlay
children list determines which order
the children are drawn if they overlap. The first child is drawn at
the bottom. It also affects the default focus chain order.
Since: 3.18
setOverlayPassThrough
data OverlaySetOverlayPassThroughMethodInfo Source #
((~) * signature (b -> Bool -> m ()), MonadIO m, IsOverlay a, IsWidget b) => MethodInfo * OverlaySetOverlayPassThroughMethodInfo a signature Source # | |
overlaySetOverlayPassThrough Source #
:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Convenience function to set the value of the Overlay
:pass-through
child property for widget
.
Since: 3.18