gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.Popover

Contents

- Exported types
- Methods
  - getAutohide
  - getCascadePopdown
  - getChild
  - getHasArrow
  - getMnemonicsVisible
  - getOffset
  - getPointingTo
  - getPosition
  - new
  - popdown
  - popup
  - present
  - setAutohide
  - setCascadePopdown
  - setChild
  - setDefaultWidget
  - setHasArrow
  - setMnemonicsVisible
  - setOffset
  - setPointingTo
  - setPosition
- Properties
  - autohide
  - cascadePopdown
  - child
  - defaultWidget
  - hasArrow
  - mnemonicsVisible
  - pointingTo
  - position
- Signals
  - activateDefault
  - closed

Description

Presents a bubble-like popup.

<picture> <source srcset="popover-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkPopover" src="popover.png"> </picture>

It is primarily meant to provide context-dependent information or options. Popovers are attached to a parent widget. The parent widget must support popover children, as `MenuButton` and `PopoverMenuBar` do. If you want to make a custom widget that has an attached popover, you need to call `popoverPresent` in your `Widget`.`size_allocate`() vfunc, in order to update the positioning of the popover.

The position of a popover relative to the widget it is attached to can also be changed with `popoverSetPosition`. By default, it points to the whole widget area, but it can be made to point to a specific area using `popoverSetPointingTo`.

By default, `GtkPopover` performs a grab, in order to ensure input events get redirected to it while it is shown, and also so the popover is dismissed in the expected situations (clicks outside the popover, or the Escape key being pressed). If no such modal behavior is desired on a popover, `popoverSetAutohide` may be called on it to tweak its behavior.

## GtkPopover as menu replacement

`GtkPopover` is often used to replace menus. The best way to do this is to use the `PopoverMenu` subclass which supports being populated from a `GMenuModel` with `popoverMenuNewFromModel`.

### xml code

    <section>
      <attribute name="display-hint">horizontal-buttons</attribute>
      <item>
        <attribute name="label">Cut</attribute>
        <attribute name="action">app.cut</attribute>
        <attribute name="verb-icon">edit-cut-symbolic</attribute>
      </item>
      <item>
        <attribute name="label">Copy</attribute>
        <attribute name="action">app.copy</attribute>
        <attribute name="verb-icon">edit-copy-symbolic</attribute>
      </item>
      <item>
        <attribute name="label">Paste</attribute>
        <attribute name="action">app.paste</attribute>
        <attribute name="verb-icon">edit-paste-symbolic</attribute>
      </item>
    </section>

# Shortcuts and Gestures

`GtkPopover` supports the following keyboard shortcuts:

- <kbd>Escape</kbd> closes the popover.
- <kbd>Alt</kbd> makes the mnemonics visible.

The following signals have default keybindings:

- Popover::activateDefault

# CSS nodes

    popover.background[.menu]
    ├── arrow
    ╰── contents
        ╰── <child>

`GtkPopover` has a main node with name `popover`, an arrow with name `arrow`, and another node for the content named `contents`. The `popover` node always gets the `.background` style class. It also gets the `.menu` style class if the popover is menu-like, e.g. is a `PopoverMenu`.

Particular uses of `GtkPopover`, such as touch selection popups or magnifiers in `GtkEntry` or `GtkTextView` get style classes like `.touch-selection` or `.magnifier` to differentiate from plain popovers.

When styling a popover directly, the `popover` node should usually not have any background. The visible part of the popover can have a shadow. To specify it in CSS, set the box-shadow of the `contents` node.

Note that, in order to accomplish appropriate arrow visuals, `GtkPopover` uses custom drawing for the `arrow` node. This makes it possible for the arrow to change its shape dynamically, but it also limits the possibilities of styling it using CSS. In particular, the `arrow` gets drawn over the `content` node's border and shadow, so they look like one shape, which means that the border width of the `content` node and the `arrow` node should be the same. The arrow also does not support any border shape other than solid, no border-radius, only one border width (border-bottom-width is used) and no box-shadow.

Synopsis

- newtype Popover = Popover (ManagedPtr Popover)
- class (GObject o, IsDescendantOf Popover o) => IsPopover o
- toPopover :: (MonadIO m, IsPopover o) => o -> m Popover
- popoverGetAutohide :: (HasCallStack, MonadIO m, IsPopover a) => a -> m Bool
- popoverGetCascadePopdown :: (HasCallStack, MonadIO m, IsPopover a) => a -> m Bool
- popoverGetChild :: (HasCallStack, MonadIO m, IsPopover a) => a -> m (Maybe Widget)
- popoverGetHasArrow :: (HasCallStack, MonadIO m, IsPopover a) => a -> m Bool
- popoverGetMnemonicsVisible :: (HasCallStack, MonadIO m, IsPopover a) => a -> m Bool
- popoverGetOffset :: (HasCallStack, MonadIO m, IsPopover a) => a -> m (Int32, Int32)
- popoverGetPointingTo :: (HasCallStack, MonadIO m, IsPopover a) => a -> m (Bool, Rectangle)
- popoverGetPosition :: (HasCallStack, MonadIO m, IsPopover a) => a -> m PositionType
- popoverNew :: (HasCallStack, MonadIO m) => m Popover
- popoverPopdown :: (HasCallStack, MonadIO m, IsPopover a) => a -> m ()
- popoverPopup :: (HasCallStack, MonadIO m, IsPopover a) => a -> m ()
- popoverPresent :: (HasCallStack, MonadIO m, IsPopover a) => a -> m ()
- popoverSetAutohide :: (HasCallStack, MonadIO m, IsPopover a) => a -> Bool -> m ()
- popoverSetCascadePopdown :: (HasCallStack, MonadIO m, IsPopover a) => a -> Bool -> m ()
- popoverSetChild :: (HasCallStack, MonadIO m, IsPopover a, IsWidget b) => a -> Maybe b -> m ()
- popoverSetDefaultWidget :: (HasCallStack, MonadIO m, IsPopover a, IsWidget b) => a -> Maybe b -> m ()
- popoverSetHasArrow :: (HasCallStack, MonadIO m, IsPopover a) => a -> Bool -> m ()
- popoverSetMnemonicsVisible :: (HasCallStack, MonadIO m, IsPopover a) => a -> Bool -> m ()
- popoverSetOffset :: (HasCallStack, MonadIO m, IsPopover a) => a -> Int32 -> Int32 -> m ()
- popoverSetPointingTo :: (HasCallStack, MonadIO m, IsPopover a) => a -> Maybe Rectangle -> m ()
- popoverSetPosition :: (HasCallStack, MonadIO m, IsPopover a) => a -> PositionType -> m ()
- constructPopoverAutohide :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPopoverAutohide :: (MonadIO m, IsPopover o) => o -> m Bool
- setPopoverAutohide :: (MonadIO m, IsPopover o) => o -> Bool -> m ()
- constructPopoverCascadePopdown :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPopoverCascadePopdown :: (MonadIO m, IsPopover o) => o -> m Bool
- setPopoverCascadePopdown :: (MonadIO m, IsPopover o) => o -> Bool -> m ()
- clearPopoverChild :: (MonadIO m, IsPopover o) => o -> m ()
- constructPopoverChild :: (IsPopover o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getPopoverChild :: (MonadIO m, IsPopover o) => o -> m (Maybe Widget)
- setPopoverChild :: (MonadIO m, IsPopover o, IsWidget a) => o -> a -> m ()
- clearPopoverDefaultWidget :: (MonadIO m, IsPopover o) => o -> m ()
- constructPopoverDefaultWidget :: (IsPopover o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getPopoverDefaultWidget :: (MonadIO m, IsPopover o) => o -> m (Maybe Widget)
- setPopoverDefaultWidget :: (MonadIO m, IsPopover o, IsWidget a) => o -> a -> m ()
- constructPopoverHasArrow :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPopoverHasArrow :: (MonadIO m, IsPopover o) => o -> m Bool
- setPopoverHasArrow :: (MonadIO m, IsPopover o) => o -> Bool -> m ()
- constructPopoverMnemonicsVisible :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPopoverMnemonicsVisible :: (MonadIO m, IsPopover o) => o -> m Bool
- setPopoverMnemonicsVisible :: (MonadIO m, IsPopover o) => o -> Bool -> m ()
- clearPopoverPointingTo :: (MonadIO m, IsPopover o) => o -> m ()
- constructPopoverPointingTo :: (IsPopover o, MonadIO m) => Rectangle -> m (GValueConstruct o)
- getPopoverPointingTo :: (MonadIO m, IsPopover o) => o -> m (Maybe Rectangle)
- setPopoverPointingTo :: (MonadIO m, IsPopover o) => o -> Rectangle -> m ()
- constructPopoverPosition :: (IsPopover o, MonadIO m) => PositionType -> m (GValueConstruct o)
- getPopoverPosition :: (MonadIO m, IsPopover o) => o -> m PositionType
- setPopoverPosition :: (MonadIO m, IsPopover o) => o -> PositionType -> m ()
- type PopoverActivateDefaultCallback = IO ()
- afterPopoverActivateDefault :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverActivateDefaultCallback) -> m SignalHandlerId
- onPopoverActivateDefault :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverActivateDefaultCallback) -> m SignalHandlerId
- type PopoverClosedCallback = IO ()
- afterPopoverClosed :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverClosedCallback) -> m SignalHandlerId
- onPopoverClosed :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverClosedCallback) -> m SignalHandlerId

# Exported types

newtype Popover Source #

Memory-managed wrapper type.

Constructors

Popover (ManagedPtr Popover) |

#### Instances

Instances details

Eq Popover Source # |
Instance details Defined in GI.Gtk.Objects.Popover Methods (==) :: Popover -> Popover -> Bool Source # (/=) :: Popover -> Popover -> Bool Source #
GObject Popover Source # |
Instance details Defined in GI.Gtk.Objects.Popover
ManagedPtrNewtype Popover Source # |
Instance details Defined in GI.Gtk.Objects.Popover Methods toManagedPtr :: Popover -> ManagedPtr Popover Source #
TypedObject Popover Source # |
Instance details Defined in GI.Gtk.Objects.Popover Methods glibType :: IO GType Source #
HasParentTypes Popover Source # |
Instance details Defined in GI.Gtk.Objects.Popover
IsGValue (Maybe Popover) Source # | Convert `Popover` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.Popover Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Popover -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Popover) Source #
type ParentTypes Popover Source # |
Instance details Defined in GI.Gtk.Objects.Popover type ParentTypes Popover = '[Widget, Object, Accessible, Buildable, ConstraintTarget, Native, ShortcutManager]

class (GObject o, IsDescendantOf Popover o) => IsPopover o Source #

Type class for types which can be safely cast to `Popover`, for instance with `toPopover`.

#### Instances

Instances details

(GObject o, IsDescendantOf Popover o) => IsPopover o Source # |
Instance details Defined in GI.Gtk.Objects.Popover

toPopover :: (MonadIO m, IsPopover o) => o -> m Popover Source #

Cast to `Popover`, 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, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, 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, popdown, popup, present, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getAutohide, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getCascadePopdown, getChild, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasArrow, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMnemonicsVisible, getName, getNative, getNextAccessibleSibling, getNextSibling, getOffset, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPointingTo, getPosition, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRenderer, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSurface, getSurfaceTransform, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setAutohide, setCanFocus, setCanTarget, setCascadePopdown, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDefaultWidget, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasArrow, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMnemonicsVisible, setName, setOffset, setOpacity, setOverflow, setParent, setPointingTo, setPosition, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## getAutohide

popoverGetAutohide Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m Bool | Returns: `True` if `popover` is modal

Returns whether the popover is modal.

See `popoverSetAutohide` for the implications of this.

## getCascadePopdown

popoverGetCascadePopdown Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m Bool | Returns: `True` if `popover` will close after a modal child.

Returns whether the popover will close after a modal child is closed.

## getChild

popoverGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m (Maybe Widget) | Returns: the child widget of `popover`

Gets the child widget of `popover`.

## getHasArrow

popoverGetHasArrow Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m Bool | Returns: whether the popover has an arrow

Gets whether this popover is showing an arrow pointing at the widget that it is relative to.

## getMnemonicsVisible

popoverGetMnemonicsVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m Bool | Returns: `True` if mnemonics are supposed to be visible in this popover

Gets whether mnemonics are visible.

## getOffset

popoverGetOffset Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m (Int32, Int32) |

Gets the offset previous set with `popoverSetOffset`.

## getPointingTo

popoverGetPointingTo Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m (Bool, Rectangle) | Returns: `True` if a rectangle to point to was set.

Gets the rectangle that the popover points to.

If a rectangle to point to has been set, this function will return `True` and fill in `rect` with such rectangle, otherwise it will return `False` and fill in `rect` with the parent widget coordinates.

## getPosition

popoverGetPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m PositionType | Returns: The preferred position.

Returns the preferred position of `popover`.

## new

popoverNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Popover | Returns: the new `GtkPopover`

Creates a new `GtkPopover`.

## popdown

popoverPopdown Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m () |

Pops `popover` down.

This may have the side-effect of closing a parent popover as well. See Popover:cascadePopdown.

## popup

popoverPopup Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m () |

Pops `popover` up.

## present

popoverPresent Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> m () |

Allocate a size for the `GtkPopover`.

This function needs to be called in size-allocate by widgets who have a `GtkPopover` as child. When using a layout manager, this is happening automatically.

To make a popover appear on screen, use `popoverPopup`.

## setAutohide

popoverSetAutohide Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> Bool | `autohide`: `True` to dismiss the popover on outside clicks
-> m () |

Sets whether `popover` is modal.

A modal popover will grab the keyboard focus on it when being displayed. Focus will wrap around within the popover. Clicking outside the popover area or pressing Esc will dismiss the popover.

Called this function on an already showing popup with a new autohide value different from the current one, will cause the popup to be hidden.

## setCascadePopdown

popoverSetCascadePopdown Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: A `GtkPopover`
-> Bool | `cascadePopdown`: `True` if the popover should follow a child closing
-> m () |

If `cascadePopdown` is `True`, the popover will be closed when a child modal popover is closed.

If `False`, `popover` will stay visible.

## setChild

popoverSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a, IsWidget b) |
=> a | `popover`: a `GtkPopover`
-> Maybe b | `child`: the child widget
-> m () |

Sets the child widget of `popover`.

## setDefaultWidget

popoverSetDefaultWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a, IsWidget b) |
=> a | `popover`: a `GtkPopover`
-> Maybe b | `widget`: a child widget of `popover` to set as the default, or `Nothing` to unset the default widget for the popover
-> m () |

Sets the default widget of a `GtkPopover`.

The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a `GtkPopover`.

## setHasArrow

popoverSetHasArrow Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> Bool | `hasArrow`: `True` to draw an arrow
-> m () |

Sets whether this popover should draw an arrow pointing at the widget it is relative to.

## setMnemonicsVisible

popoverSetMnemonicsVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> Bool | `mnemonicsVisible`: the new value
-> m () |

Sets whether mnemonics should be visible.

## setOffset

popoverSetOffset Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> Int32 | `xOffset`: the x offset to adjust the position by
-> Int32 | `yOffset`: the y offset to adjust the position by
-> m () |

Sets the offset to use when calculating the position of the popover.

These values are used when preparing the `PopupLayout` for positioning the popover.

## setPointingTo

popoverSetPointingTo Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> Maybe Rectangle | `rect`: rectangle to point to
-> m () |

Sets the rectangle that `popover` points to.

This is in the coordinate space of the `popover` parent.

## setPosition

popoverSetPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopover a) |
=> a | `popover`: a `GtkPopover`
-> PositionType | `position`: preferred popover position
-> m () |

Sets the preferred position for `popover` to appear.

If the `popover` is currently visible, it will be immediately updated.

This preference will be respected where possible, although on lack of space (eg. if close to the window edges), the `GtkPopover` may choose to appear on the opposite side.

# Properties

## autohide

Whether to dismiss the popover on outside clicks.

constructPopoverAutohide :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getPopoverAutohide :: (MonadIO m, IsPopover o) => o -> m Bool Source #

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

    get popover #autohide

setPopoverAutohide :: (MonadIO m, IsPopover o) => o -> Bool -> m () Source #

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

    set popover [ #autohide := value ]

## cascadePopdown

Whether the popover pops down after a child popover.

This is used to implement the expected behavior of submenus.

constructPopoverCascadePopdown :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getPopoverCascadePopdown :: (MonadIO m, IsPopover o) => o -> m Bool Source #

Get the value of the “`cascade-popdown`” property. When overloading is enabled, this is equivalent to

    get popover #cascadePopdown

setPopoverCascadePopdown :: (MonadIO m, IsPopover o) => o -> Bool -> m () Source #

Set the value of the “`cascade-popdown`” property. When overloading is enabled, this is equivalent to

    set popover [ #cascadePopdown := value ]

## child

The child widget.

clearPopoverChild :: (MonadIO m, IsPopover o) => o -> m () Source #

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

    clear #child

constructPopoverChild :: (IsPopover 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`.

getPopoverChild :: (MonadIO m, IsPopover o) => o -> m (Maybe Widget) Source #

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

    get popover #child

setPopoverChild :: (MonadIO m, IsPopover o, IsWidget a) => o -> a -> m () Source #

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

    set popover [ #child := value ]

## defaultWidget

The default widget inside the popover.

clearPopoverDefaultWidget :: (MonadIO m, IsPopover o) => o -> m () Source #

Set the value of the “`default-widget`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #defaultWidget

constructPopoverDefaultWidget :: (IsPopover o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

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

getPopoverDefaultWidget :: (MonadIO m, IsPopover o) => o -> m (Maybe Widget) Source #

Get the value of the “`default-widget`” property. When overloading is enabled, this is equivalent to

    get popover #defaultWidget

setPopoverDefaultWidget :: (MonadIO m, IsPopover o, IsWidget a) => o -> a -> m () Source #

Set the value of the “`default-widget`” property. When overloading is enabled, this is equivalent to

    set popover [ #defaultWidget := value ]

## hasArrow

Whether to draw an arrow.

constructPopoverHasArrow :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getPopoverHasArrow :: (MonadIO m, IsPopover o) => o -> m Bool Source #

Get the value of the “`has-arrow`” property. When overloading is enabled, this is equivalent to

    get popover #hasArrow

setPopoverHasArrow :: (MonadIO m, IsPopover o) => o -> Bool -> m () Source #

Set the value of the “`has-arrow`” property. When overloading is enabled, this is equivalent to

    set popover [ #hasArrow := value ]

## mnemonicsVisible

Whether mnemonics are currently visible in this popover.

constructPopoverMnemonicsVisible :: (IsPopover o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getPopoverMnemonicsVisible :: (MonadIO m, IsPopover o) => o -> m Bool Source #

Get the value of the “`mnemonics-visible`” property. When overloading is enabled, this is equivalent to

    get popover #mnemonicsVisible

setPopoverMnemonicsVisible :: (MonadIO m, IsPopover o) => o -> Bool -> m () Source #

Set the value of the “`mnemonics-visible`” property. When overloading is enabled, this is equivalent to

    set popover [ #mnemonicsVisible := value ]

## pointingTo

Rectangle in the parent widget that the popover points to.

clearPopoverPointingTo :: (MonadIO m, IsPopover o) => o -> m () Source #

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

    clear #pointingTo

constructPopoverPointingTo :: (IsPopover o, MonadIO m) => Rectangle -> m (GValueConstruct o) Source #

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

getPopoverPointingTo :: (MonadIO m, IsPopover o) => o -> m (Maybe Rectangle) Source #

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

    get popover #pointingTo

setPopoverPointingTo :: (MonadIO m, IsPopover o) => o -> Rectangle -> m () Source #

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

    set popover [ #pointingTo := value ]

## position

How to place the popover, relative to its parent.

constructPopoverPosition :: (IsPopover o, MonadIO m) => PositionType -> m (GValueConstruct o) Source #

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

getPopoverPosition :: (MonadIO m, IsPopover o) => o -> m PositionType Source #

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

    get popover #position

setPopoverPosition :: (MonadIO m, IsPopover o) => o -> PositionType -> m () Source #

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

    set popover [ #position := value ]

# Signals

## activateDefault

type PopoverActivateDefaultCallback = IO () Source #

Emitted whend the user activates the default widget.

This is a keybinding signal.

The default binding for this signal is <kbd>Enter</kbd>.

afterPopoverActivateDefault :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverActivateDefaultCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activateDefault signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after popover #activateDefault callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onPopoverActivateDefault :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverActivateDefaultCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activateDefault signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on popover #activateDefault callback

## closed

type PopoverClosedCallback = IO () Source #

Emitted when the popover is closed.

afterPopoverClosed :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverClosedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the closed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after popover #closed callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onPopoverClosed :: (IsPopover a, MonadIO m) => a -> ((?self :: a) => PopoverClosedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the closed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on popover #closed callback