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 |
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
- 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 ()
- overlayGetOverlayPassThrough :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> m Bool
- overlayNew :: (HasCallStack, MonadIO m) => m Overlay
- overlayReorderOverlay :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> Int32 -> m ()
- overlaySetOverlayPassThrough :: (HasCallStack, MonadIO m, IsOverlay a, IsWidget b) => a -> b -> Bool -> 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 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 gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Overlay -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Overlay) | |
type ParentTypes Overlay Source # | |
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
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addOverlay, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorderOverlay, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOverlayPassThrough, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOverlayPassThrough, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
addOverlay
:: (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
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
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
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 #
:: (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