PopoverProtocol

public protocol PopoverProtocol : NativeProtocol, ShortcutManagerProtocol

GtkPopover is a bubble-like context popup.

An example GtkPopover

It is primarily meant to provide context-dependent information or options. Popovers are attached to a parent widget. By default, they point to the whole widget area, although this behavior can be changed with [methodGtk.Popover.set_pointing_to].

The position of a popover relative to the widget it is attached to can also be changed with [methodGtk.Popover.set_position]

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, [methodGtk.Popover.set_autohide] may be called on it to tweak its behavior.

GtkPopover as menu replacement

GtkPopover is often used to replace menus. The best was to do this is to use the [classGtk.PopoverMenu] subclass which supports being populated from a GMenuModel with [ctorGtk.PopoverMenu.new_from_model].

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

CSS nodes

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

The contents child node always gets the .background style class and the popover itself gets the .menu style class if the popover is menu-like (i.e. GtkPopoverMenu).

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.

The PopoverProtocol protocol exposes the methods and properties of an underlying GtkPopover instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Popover. Alternatively, use PopoverRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkPopover instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • popover_ptr Default implementation

    Typed pointer to the underlying GtkPopover instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkPopover instance.

    Declaration

    Swift

    var popover_ptr: UnsafeMutablePointer<GtkPopover>! { get }
  • Required Initialiser for types conforming to PopoverProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Popover Class

  • Bind a PopoverPropertyName source property to a given target object.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: PopoverPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a Popover property

    Declaration

    Swift

    @inlinable
    func get(property: PopoverPropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    Set the value of a Popover property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

    @inlinable
    func set(property: PopoverPropertyName, value v: GLibObject.Value)

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

Popover signals

  • Connect a Swift signal handler to the given, typed PopoverSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: PopoverSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    handler

    The Swift signal handler (function or callback) to invoke on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Connect a C signal handler to the given, typed PopoverSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: PopoverSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Emitted whend the user activates the default widget.

    This is a keybinding signal.

    Note

    This represents the underlying activate-default signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onActivateDefault(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the activateDefault signal is emitted

  • activateDefaultSignal Extension method

    Typed activate-default signal for using the connect(signal:) methods

    Declaration

    Swift

    static var activateDefaultSignal: PopoverSignalName { get }
  • onClosed(flags:handler:) Extension method

    Emitted when the popover is closed.

    Note

    This represents the underlying closed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onClosed(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the closed signal is emitted

  • closedSignal Extension method

    Typed closed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var closedSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::autohide signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyAutohide(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyAutohide signal is emitted

  • notifyAutohideSignal Extension method

    Typed notify::autohide signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyAutohideSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::cascade-popdown signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyCascadePopdown(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyCascadePopdown signal is emitted

  • notifyCascadePopdownSignal Extension method

    Typed notify::cascade-popdown signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyCascadePopdownSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::child signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyChild signal is emitted

  • notifyChildSignal Extension method

    Typed notify::child signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyChildSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::default-widget signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyDefaultWidget(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyDefaultWidget signal is emitted

  • notifyDefaultWidgetSignal Extension method

    Typed notify::default-widget signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyDefaultWidgetSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::has-arrow signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyHasArrow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyHasArrow signal is emitted

  • notifyHasArrowSignal Extension method

    Typed notify::has-arrow signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHasArrowSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::mnemonics-visible signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyMnemonicsVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyMnemonicsVisible signal is emitted

  • notifyMnemonicsVisibleSignal Extension method

    Typed notify::mnemonics-visible signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyMnemonicsVisibleSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::pointing-to signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyPointingTo(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyPointingTo signal is emitted

  • notifyPointingToSignal Extension method

    Typed notify::pointing-to signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPointingToSignal: PopoverSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::position signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyPosition(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyPosition signal is emitted

  • notifyPositionSignal Extension method

    Typed notify::position signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyPositionSignal: PopoverSignalName { get }

Popover Class: PopoverProtocol extension (methods and fields)

  • getAutohide() Extension method

    Returns whether the popover is modal.

    See [methodGtk.Popover.set_autohide] for the implications of this.

    Declaration

    Swift

    @inlinable
    func getAutohide() -> Bool
  • getCascadePopdown() Extension method

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

    Declaration

    Swift

    @inlinable
    func getCascadePopdown() -> Bool
  • getChild() Extension method

    Gets the child widget of popover.

    Declaration

    Swift

    @inlinable
    func getChild() -> WidgetRef!
  • getHasArrow() Extension method

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

    Declaration

    Swift

    @inlinable
    func getHasArrow() -> Bool
  • getMnemonicsVisible() Extension method

    Gets whether mnemonics are visible.

    Declaration

    Swift

    @inlinable
    func getMnemonicsVisible() -> Bool
  • getOffset(xOffset:yOffset:) Extension method

    Gets the offset previous set with gtk_popover_set_offset().

    Declaration

    Swift

    @inlinable
    func getOffset(xOffset: UnsafeMutablePointer<gint>?, yOffset: UnsafeMutablePointer<gint>?)
  • getPointingTo(rect:) Extension method

    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.

    Declaration

    Swift

    @inlinable
    func getPointingTo<RectangleT>(rect: RectangleT) -> Bool where RectangleT : RectangleProtocol
  • getPosition() Extension method

    Returns the preferred position of popover.

    Declaration

    Swift

    @inlinable
    func getPosition() -> GtkPositionType
  • popdown() Extension method

    Pops popover down.

    This may have the side-effect of closing a parent popover as well. See [propertyGtk.Popover:cascade-popdown].

    Declaration

    Swift

    @inlinable
    func popdown()
  • popup() Extension method

    Pops popover up.

    Declaration

    Swift

    @inlinable
    func popup()
  • present() Extension method

    Presents the popover to the user.

    Declaration

    Swift

    @inlinable
    func present()
  • set(autohide:) Extension method

    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.

    Declaration

    Swift

    @inlinable
    func set(autohide: Bool)
  • set(cascadePopdown:) Extension method

    If cascade_popdown is true, the popover will be closed when a child modal popover is closed.

    If false, popover will stay visible.

    Declaration

    Swift

    @inlinable
    func set(cascadePopdown: Bool)
  • set(child:) Extension method

    Sets the child widget of popover.

    Declaration

    Swift

    @inlinable
    func set(child: WidgetRef? = nil)
  • set(child:) Extension method

    Sets the child widget of popover.

    Declaration

    Swift

    @inlinable
    func set<WidgetT>(child: WidgetT?) where WidgetT : WidgetProtocol
  • setDefault(widget:) Extension method

    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.

    Declaration

    Swift

    @inlinable
    func setDefault(widget: WidgetRef? = nil)
  • setDefault(widget:) Extension method

    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.

    Declaration

    Swift

    @inlinable
    func setDefault<WidgetT>(widget: WidgetT?) where WidgetT : WidgetProtocol
  • set(hasArrow:) Extension method

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

    Declaration

    Swift

    @inlinable
    func set(hasArrow: Bool)
  • set(mnemonicsVisible:) Extension method

    Sets whether mnemonics should be visible.

    Declaration

    Swift

    @inlinable
    func set(mnemonicsVisible: Bool)
  • setOffset(xOffset:yOffset:) Extension method

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

    These values are used when preparing the [structGdk.PopupLayout] for positioning the popover.

    Declaration

    Swift

    @inlinable
    func setOffset(xOffset: Int, yOffset: Int)
  • setPointingTo(rect:) Extension method

    Sets the rectangle that popover points to.

    This is in the coordinate space of the popover parent.

    Declaration

    Swift

    @inlinable
    func setPointingTo<RectangleT>(rect: RectangleT) where RectangleT : RectangleProtocol
  • set(position:) Extension method

    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.

    Declaration

    Swift

    @inlinable
    func set(position: GtkPositionType)
  • autohide Extension method

    Whether to dismiss the popover on outside clicks.

    Declaration

    Swift

    @inlinable
    var autohide: Bool { get nonmutating set }
  • cascadePopdown Extension method

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

    Declaration

    Swift

    @inlinable
    var cascadePopdown: Bool { get nonmutating set }
  • child Extension method

    The child widget.

    Declaration

    Swift

    @inlinable
    var child: WidgetRef! { get nonmutating set }
  • hasArrow Extension method

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

    Declaration

    Swift

    @inlinable
    var hasArrow: Bool { get nonmutating set }
  • mnemonicsVisible Extension method

    Gets whether mnemonics are visible.

    Declaration

    Swift

    @inlinable
    var mnemonicsVisible: Bool { get nonmutating set }
  • position Extension method

    How to place the popover, relative to its parent.

    Declaration

    Swift

    @inlinable
    var position: GtkPositionType { get nonmutating set }
  • parent Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parent: GtkWidget { get }