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
GtkPopover
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
popover_ptr
Default implementationTyped 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)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) 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 transformationtransform_to
ValueTransformer
to use for backwards transformationReturn 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:
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
property
the 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
PopoverSignalName
signalDeclaration
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 byuserData
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(signal:
Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
PopoverSignalName
signalDeclaration
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 byuserData
signalHandler
The 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-default
signalDeclaration
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 methodTyped
activate-default
signal 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 underlyingclosed
signalDeclaration
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 methodTyped
closed
signal 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 innotify
being 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::autohide
signalDeclaration
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 methodTyped
notify::autohide
signal 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 innotify
being 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-popdown
signalDeclaration
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 methodTyped
notify::cascade-popdown
signal 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 innotify
being 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::child
signalDeclaration
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 methodTyped
notify::child
signal 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 innotify
being 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-widget
signalDeclaration
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 methodTyped
notify::default-widget
signal 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 innotify
being 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-arrow
signalDeclaration
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 methodTyped
notify::has-arrow
signal 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 innotify
being 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-visible
signalDeclaration
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 methodTyped
notify::mnemonics-visible
signal 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 innotify
being 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-to
signalDeclaration
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 methodTyped
notify::pointing-to
signal 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 innotify
being 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::position
signalDeclaration
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 methodTyped
notify::position
signal 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
true
and fill inrect
with such rectangle, otherwise it will returnfalse
and fill inrect
with 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
popover
down.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
popover
up.Declaration
Swift
@inlinable func popup()
-
present()
Extension methodPresents 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
istrue
, 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:
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
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 methodWhether to dismiss the popover on outside clicks.
Declaration
Swift
@inlinable var autohide: Bool { get nonmutating set }
-
cascadePopdown
Extension methodReturns whether the popover will close after a modal child is closed.
Declaration
Swift
@inlinable var cascadePopdown: Bool { get nonmutating set }
-
child
Extension methodThe child widget.
Declaration
Swift
@inlinable var child: WidgetRef! { get nonmutating set }
-
hasArrow
Extension 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 }
-
mnemonicsVisible
Extension methodGets whether mnemonics are visible.
Declaration
Swift
@inlinable var mnemonicsVisible: Bool { get nonmutating set }
-
position
Extension methodHow to place the popover, relative to its parent.
Declaration
Swift
@inlinable var position: GtkPositionType { get nonmutating set }
-
parent
Extension methodUndocumented
Declaration
Swift
@inlinable var parent: GtkWidget { get }