[643:7] extends: object
Generated low-level callback wrapper for GIR callback closed.
PopoverClosedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[573:7] extends: object
Generated low-level callback wrapper for GIR callback activate-default.
PopoverActivatedefaultCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[713:14] static extends: object
Generated metadata helpers for Popover class surfaces.
properties ()
Returns property metadata for
Popover.
A list.signals ()
Returns signal metadata for
Popover.
A list.[65:7] extends: object
Presents a bubble-like popup.
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, [method@Gtk.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 way to do this is to
use the [class@Gtk.PopoverMenu] subclass which supports being populated from
a GMenuModel with [ctor@Gtk.PopoverMenu.new_from_model]. xml <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: - Escape closes the popover. - Alt makes the
mnemonics visible. The following signals have default keybindings: -
[signal@Gtk.Popover::activate-default] # 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 [class@Gtk.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.
Popover ()
Creates a new
GtkPopover.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.asNative ()
Wraps this handle as
Native.
A Native object.asShortcutManager ()
Wraps this handle as
ShortcutManager.
A ShortcutManager object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnActivatedefault (callback Fn, UserData = null)
Emitted whend the user activates the default widget. This is a keybinding signal. The default binding for this signal is Enter.
Fn is the Aussom callback.Fn is called with (Popover Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnClosed (callback Fn, UserData = null)
Emitted when the popover is closed.
Fn is the Aussom callback.Fn is called with (Popover Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAutohide (bool Value)
Whether to dismiss the popover on outside clicks.
Value is the new property value.None.setCascadepopdown (bool Value)
Whether the popover pops down after a child popover. This is used to implement the expected behavior of submenus.
Value is the new property value.None.setChild (object Value)
The child widget.
Value is the new property value.None.setDefaultwidget (object Value)
The default widget inside the popover.
Value is the new property value.None.setHasarrow (bool Value)
Whether to draw an arrow.
Value is the new property value.None.setMnemonicsvisible (bool Value)
Whether mnemonics are currently visible in this popover.
Value is the new property value.None.setPosition (string Value)
How to place the popover, relative to its parent.
Value is the new property value.None.get_autohide ()
Returns whether the popover is modal. See [method@Gtk.Popover.set_autohide] for the implications of this.
get_cascade_popdown ()
Returns whether the popover will close after a modal child is closed.
get_child ()
Gets the child widget of @popover.
get_has_arrow ()
Gets whether this popover is showing an arrow pointing at the widget that it is relative to.
get_mnemonics_visible ()
Gets whether mnemonics are visible.
get_position ()
Returns the preferred position of @popover.
popdown ()
Pops @popover down. This may have the side-effect of closing a parent popover as well. See [property@Gtk.Popover:cascade-popdown].
None.popup ()
Pops @popover up.
None.present ()
Allocate a size for the
GtkPopover. This function needs to be called in size-allocate by widgets who have aGtkPopoveras child. When using a layout manager, this is happening automatically. To make a popover appear on screen, use [method@Gtk.Popover.popup].
None.set_autohide (bool autohide)
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.
autohide is %TRUE to dismiss the popover on outside clicks.None.set_cascade_popdown (bool cascade_popdown)
If @cascade_popdown is %TRUE, the popover will be closed when a child modal popover is closed. If %FALSE, @popover will stay visible.
cascade_popdown is %TRUE if the popover should follow a child closing.None.set_child (object child)
Sets the child widget of @popover.
child is the child widget.None.set_default_widget (object widget)
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 aGtkPopover.
widget is a child widget of @popover to set as the default, or %NULL to unset the default widget for the popover.None.set_has_arrow (bool has_arrow)
Sets whether this popover should draw an arrow pointing at the widget it is relative to.
has_arrow is %TRUE to draw an arrow.None.set_mnemonics_visible (bool mnemonics_visible)
Sets whether mnemonics should be visible.
mnemonics_visible is the new value.None.set_offset (int x_offset, int y_offset)
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.
x_offset is the x offset to adjust the position by.y_offset is the y offset to adjust the position by.None.set_pointing_to (rect)
Sets the rectangle that @popover points to. This is in the coordinate space of the @popover parent.
rect is rectangle to point to.None.set_position (string position)
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
GtkPopovermay choose to appear on the opposite side.
position is preferred popover position.None.