PopoverProtocol
public protocol PopoverProtocol : NativeProtocol, ShortcutManagerProtocol
GtkPopover is a bubble-like context popup.

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.
-
Untyped pointer to the underlying
GtkPopoverinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
popover_ptrDefault implementationTyped pointer to the underlying
GtkPopoverinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkPopoverinstance.Declaration
Swift
var popover_ptr: UnsafeMutablePointer<GtkPopover>! { get } -
Required Initialiser for types conforming to
PopoverProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
PopoverPropertyNamesource 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 : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a Popover property
Declaration
Swift
@inlinable func get(property: PopoverPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) 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
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
PopoverSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PopoverSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe 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(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
PopoverSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PopoverSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onActivateDefault(flags:Extension methodhandler: ) Emitted whend the user activates the default widget.
This is a keybinding signal.
Note
This represents the underlyingactivate-defaultsignalDeclaration
Swift
@discardableResult @inlinable func onActivateDefault(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
activateDefaultsignal is emitted -
activateDefaultSignalExtension methodTyped
activate-defaultsignal for using theconnect(signal:)methodsDeclaration
Swift
static var activateDefaultSignal: PopoverSignalName { get } -
onClosed(flags:Extension methodhandler: ) Emitted when the popover is closed.
Note
This represents the underlyingclosedsignalDeclaration
Swift
@discardableResult @inlinable func onClosed(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
closedsignal is emitted -
closedSignalExtension methodTyped
closedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var closedSignal: PopoverSignalName { get } -
onNotifyAutohide(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::autohidesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAutohide(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAutohidesignal is emitted -
notifyAutohideSignalExtension methodTyped
notify::autohidesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAutohideSignal: PopoverSignalName { get } -
onNotifyCascadePopdown(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::cascade-popdownsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCascadePopdown(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCascadePopdownsignal is emitted -
notifyCascadePopdownSignalExtension methodTyped
notify::cascade-popdownsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCascadePopdownSignal: PopoverSignalName { get } -
onNotifyChild(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::childsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyChildsignal is emitted -
notifyChildSignalExtension methodTyped
notify::childsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyChildSignal: PopoverSignalName { get } -
onNotifyDefaultWidget(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::default-widgetsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDefaultWidget(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDefaultWidgetsignal is emitted -
notifyDefaultWidgetSignalExtension methodTyped
notify::default-widgetsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDefaultWidgetSignal: PopoverSignalName { get } -
onNotifyHasArrow(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::has-arrowsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasArrow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHasArrowsignal is emitted -
notifyHasArrowSignalExtension methodTyped
notify::has-arrowsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHasArrowSignal: PopoverSignalName { get } -
onNotifyMnemonicsVisible(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::mnemonics-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMnemonicsVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMnemonicsVisiblesignal is emitted -
notifyMnemonicsVisibleSignalExtension methodTyped
notify::mnemonics-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMnemonicsVisibleSignal: PopoverSignalName { get } -
onNotifyPointingTo(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::pointing-tosignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPointingTo(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPointingTosignal is emitted -
notifyPointingToSignalExtension methodTyped
notify::pointing-tosignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPointingToSignal: PopoverSignalName { get } -
onNotifyPosition(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::positionsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPosition(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PopoverRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPositionsignal is emitted -
notifyPositionSignalExtension methodTyped
notify::positionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPositionSignal: PopoverSignalName { get }
-
getAutohide()Extension methodReturns whether the popover is modal.
See [method
Gtk.Popover.set_autohide] for the implications of this.Declaration
Swift
@inlinable func getAutohide() -> Bool -
getCascadePopdown()Extension methodReturns whether the popover will close after a modal child is closed.
Declaration
Swift
@inlinable func getCascadePopdown() -> Bool -
getChild()Extension methodGets the child widget of
popover.Declaration
Swift
@inlinable func getChild() -> WidgetRef! -
getHasArrow()Extension methodGets whether this popover is showing an arrow pointing at the widget that it is relative to.
Declaration
Swift
@inlinable func getHasArrow() -> Bool -
getMnemonicsVisible()Extension methodGets whether mnemonics are visible.
Declaration
Swift
@inlinable func getMnemonicsVisible() -> Bool -
getOffset(xOffset:Extension methodyOffset: ) 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
trueand fill inrectwith such rectangle, otherwise it will returnfalseand fill inrectwith the parent widget coordinates.Declaration
Swift
@inlinable func getPointingTo<RectangleT>(rect: RectangleT) -> Bool where RectangleT : RectangleProtocol -
getPosition()Extension methodReturns the preferred position of
popover.Declaration
Swift
@inlinable func getPosition() -> GtkPositionType -
popdown()Extension methodPops
popoverdown.This may have the side-effect of closing a parent popover as well. See [property
Gtk.Popover:cascade-popdown].Declaration
Swift
@inlinable func popdown() -
popup()Extension methodPops
popoverup.Declaration
Swift
@inlinable func popup() -
present()Extension methodPresents the popover to the user.
Declaration
Swift
@inlinable func present() -
set(autohide:Extension method) Sets whether
popoveris 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_popdownistrue, the popover will be closed when a child modal popover is closed.If
false,popoverwill 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:Extension methodyOffset: ) Sets the offset to use when calculating the position of the popover.
These values are used when preparing the [struct
Gdk.PopupLayout] for positioning the popover.Declaration
Swift
@inlinable func setOffset(xOffset: Int, yOffset: Int) -
setPointingTo(rect:Extension method) Sets the rectangle that
popoverpoints to.This is in the coordinate space of the
popoverparent.Declaration
Swift
@inlinable func setPointingTo<RectangleT>(rect: RectangleT) where RectangleT : RectangleProtocol -
set(position:Extension method) Sets the preferred position for
popoverto appear.If the
popoveris 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
GtkPopovermay choose to appear on the opposite side.Declaration
Swift
@inlinable func set(position: GtkPositionType) -
autohideExtension methodWhether to dismiss the popover on outside clicks.
Declaration
Swift
@inlinable var autohide: Bool { get nonmutating set } -
cascadePopdownExtension methodReturns whether the popover will close after a modal child is closed.
Declaration
Swift
@inlinable var cascadePopdown: Bool { get nonmutating set } -
childExtension methodThe child widget.
Declaration
Swift
@inlinable var child: WidgetRef! { get nonmutating set } -
hasArrowExtension methodGets 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 } -
mnemonicsVisibleExtension methodGets whether mnemonics are visible.
Declaration
Swift
@inlinable var mnemonicsVisible: Bool { get nonmutating set } -
positionExtension methodHow to place the popover, relative to its parent.
Declaration
Swift
@inlinable var position: GtkPositionType { get nonmutating set } -
parentExtension methodUndocumented
Declaration
Swift
@inlinable var parent: GtkWidget { get }
View on GitHub
Install in Dash
PopoverProtocol Protocol Reference