gi-gtk-4.0.4: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
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 getChildPosition 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 #

GObject Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

ManagedPtrNewtype Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

Methods

toManagedPtr :: Overlay -> ManagedPtr Overlay

TypedObject Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

Methods

glibType :: IO GType

HasParentTypes Overlay Source # 
Instance details

Defined in GI.Gtk.Objects.Overlay

IsGValue (Maybe Overlay) Source #

Convert Overlay to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Overlay

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Overlay -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe 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.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addOverlay, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeOverlay, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipOverlay, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMeasureOverlay, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setCanFocus, setCanTarget, setChild, setChildVisible, setClipOverlay, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMeasureOverlay, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

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

The position at which widget is placed is determined from its Widget:halign and Widget:valign properties.

getChild

overlayGetChild Source #

Arguments

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

overlay: a Overlay

-> m (Maybe Widget)

Returns: the child widget of overlay

Gets the child widget of overlay.

getClipOverlay

overlayGetClipOverlay 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 clipped within the parent.

Gets whether widget should be clipped within the parent.

getMeasureOverlay

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

Gets whether widget's size is included in the measurement of overlay.

new

overlayNew Source #

Arguments

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

Returns: a new Overlay object.

Creates a new Overlay.

removeOverlay

overlayRemoveOverlay Source #

Arguments

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

overlay: a Overlay

-> b

widget: a Widget to be removed

-> m () 

Removes an overlay that was added with overlayAddOverlay.

setChild

overlaySetChild Source #

Arguments

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

overlay: a Overlay

-> Maybe b

child: the child widget

-> m () 

Sets the child widget of overlay.

setClipOverlay

overlaySetClipOverlay Source #

Arguments

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

overlay: a Overlay

-> b

widget: an overlay child of Overlay

-> Bool

clipOverlay: whether the child should be clipped

-> m () 

Sets whether widget should be clipped within the parent.

setMeasureOverlay

overlaySetMeasureOverlay Source #

Arguments

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

overlay: a Overlay

-> b

widget: an overlay child of Overlay

-> Bool

measure: whether the child should be measured

-> m () 

Sets whether widget is included in the measured size of overlay.

The overlay will request the size of the largest child that has this property set to True. Children who are not included may be drawn outside of overlay's allocation if they are too large.

Properties

child

No description available in the introspection data.

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

Set the value of the “child” property to Nothing. When overloading is enabled, this is equivalent to

clear #child

constructOverlayChild :: (IsOverlay o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “child” property. This is rarely needed directly, but it is used by new.

getOverlayChild :: (MonadIO m, IsOverlay o) => o -> m (Maybe Widget) Source #

Get the value of the “child” property. When overloading is enabled, this is equivalent to

get overlay #child

setOverlayChild :: (MonadIO m, IsOverlay o, IsWidget a) => o -> a -> m () Source #

Set the value of the “child” property. When overloading is enabled, this is equivalent to

set overlay [ #child := value ]

Signals

getChildPosition