gi-gtk-3.0.32: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Overlay

Description

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.

An overlay’s minimum and natural sizes are those of its main child. The sizes of overlay children are not considered when measuring these preferred sizes.

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.

CSS nodes

GtkOverlay has a single CSS node with the name “overlay”. Overlay children whose alignments cause them to be positioned at an edge get the style classes “.left”, “.right”, “.top”, and/or “.bottom” according to their position.

Synopsis

Exported types

newtype Overlay Source #

Memory-managed wrapper type.

Constructors

Overlay (ManagedPtr Overlay) 

Instances

Instances details
Eq Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

Methods

(==) :: Overlay -> Overlay -> Bool #

(/=) :: Overlay -> Overlay -> Bool #

IsGValue Overlay Source #

Convert Overlay to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Overlay

GObject Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

Methods

gobjectType :: IO GType #

HasParentTypes Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

type ParentTypes Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

class (GObject o, IsDescendantOf Overlay o) => IsOverlay o Source #

Type class for types which can be safely cast to Overlay, for instance with toOverlay.

Instances

Instances details
(GObject o, IsDescendantOf Overlay o) => IsOverlay o Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

toOverlay :: (MonadIO m, IsOverlay o) => o -> m Overlay Source #

Cast to Overlay, for types for which this is known to be safe. For general casts, use castTo.

noOverlay :: Maybe Overlay Source #

A convenience alias for Nothing :: Maybe Overlay.

Methods

Overloaded methods

addOverlay

overlayAddOverlay Source #

Arguments

:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) 
=> a

overlay: a Overlay

-> b

widget: a Widget to be added to the container

-> 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

overlayGetOverlayPassThrough Source #

Arguments

:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) 
=> a

overlay: a Overlay

-> b

widget: an overlay child of Overlay

-> 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

overlayNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Overlay

Returns: a new Overlay object.

Creates a new Overlay.

Since: 3.2

reorderOverlay

overlayReorderOverlay Source #

Arguments

:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) 
=> a

overlay: a Overlay

-> b

child: the overlaid Widget to move

-> Int32

index_: the new index for child in the list of overlay children of overlay, starting from 0. If negative, indicates the end of the list

-> 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 by default. See also Overlay:index.

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

overlaySetOverlayPassThrough Source #

Arguments

:: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) 
=> a

overlay: a Overlay

-> b

widget: an overlay child of Overlay

-> Bool

passThrough: whether the child should pass the input through

-> m () 

Convenience function to set the value of the Overlay:pass-through child property for widget.

Since: 3.18