| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
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
- newtype Overlay = Overlay (ManagedPtr Overlay)
- class (GObject o, IsDescendantOf Overlay o) => IsOverlay o
- toOverlay :: (MonadIO m, IsOverlay o) => o -> m Overlay
- overlayAddOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m ()
- overlayGetChild :: (HasCallStack, MonadIO m, IsOverlay a) => a -> m (Maybe Widget)
- overlayGetClipOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m Bool
- overlayGetMeasureOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m Bool
- overlayNew :: (HasCallStack, MonadIO m) => m Overlay
- overlayRemoveOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m ()
- overlaySetChild :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> Maybe b -> m ()
- overlaySetClipOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> Bool -> m ()
- overlaySetMeasureOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> Bool -> m ()
- clearOverlayChild :: (MonadIO m, IsOverlay o) => o -> m ()
- constructOverlayChild :: (IsOverlay o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getOverlayChild :: (MonadIO m, IsOverlay o) => o -> m (Maybe Widget)
- setOverlayChild :: (MonadIO m, IsOverlay o, IsWidget a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Overlay Source # | |
| GObject Overlay Source # | |
| Defined in GI.Gtk.Objects.Overlay | |
| ManagedPtrNewtype Overlay Source # | |
| Defined in GI.Gtk.Objects.Overlay Methods toManagedPtr :: Overlay -> ManagedPtr Overlay | |
| TypedObject Overlay Source # | |
| Defined in GI.Gtk.Objects.Overlay | |
| HasParentTypes Overlay Source # | |
| Defined in GI.Gtk.Objects.Overlay | |
| IsGValue (Maybe Overlay) Source # | Convert  | 
| 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 # | |
| Defined in GI.Gtk.Objects.Overlay | |
class (GObject o, IsDescendantOf Overlay o) => IsOverlay o Source #
Instances
| (GObject o, IsDescendantOf Overlay o) => IsOverlay o Source # | |
| Defined in GI.Gtk.Objects.Overlay | |
Methods
Click to display all available methods, including inherited ones
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
Arguments
| :: (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 overlaySetChild.
The position at which widget is placed is determined
 from its Widget:halign and Widget:valign properties.
getChild
Arguments
| :: (HasCallStack, MonadIO m, IsOverlay a) | |
| => a | 
 | 
| -> m (Maybe Widget) | Returns: the child widget of  | 
Gets the child widget of overlay.
getClipOverlay
overlayGetClipOverlay Source #
Arguments
| :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
| => a | 
 | 
| -> b | 
 | 
| -> 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 | 
 | 
| -> b | 
 | 
| -> m Bool | Returns: whether the widget is measured | 
Gets whether widget's size is included in the measurement of
 overlay.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Overlay | Returns: a new  | 
Creates a new Overlay.
removeOverlay
Arguments
| :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
| => a | 
 | 
| -> b | 
 | 
| -> m () | 
Removes an overlay that was added with overlayAddOverlay.
setChild
Arguments
| :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
| => a | 
 | 
| -> Maybe b | 
 | 
| -> m () | 
Sets the child widget of overlay.
setClipOverlay
overlaySetClipOverlay Source #
Arguments
| :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
| => a | 
 | 
| -> b | 
 | 
| -> Bool | 
 | 
| -> m () | 
Sets whether widget should be clipped within the parent.
setMeasureOverlay
overlaySetMeasureOverlay Source #
Arguments
| :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) | |
| => a | 
 | 
| -> b | 
 | 
| -> Bool | 
 | 
| -> 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
setoverlay [ #child:=value ]