gdk.popup_mixin
Module for Popup interface mixin
Templates 2
A gdk.popup.Popup is a surface that is attached to another surface.
The gdk.popup.Popup is positioned relative to its parent surface.
gdk.popup.Popups are typically used to implement menus and similar popups. They can be modal, which is indicated by the gdk.popup.Popup.autohide property.
Get autohide property.
Returns
Get parent property.
Returns
Returns whether this popup is set to hide on outside clicks.
Returns
Returns the parent surface of a popup.
Returns
Obtains the position of the popup relative to its parent.
Returns
Obtains the position of the popup relative to its parent.
Returns
Gets the current popup rectangle anchor.
The value returned may change after calling gdk.popup.Popup.present, or after the gdk.surface.Surface.layout signal is emitted.
Returns
Gets the current popup surface anchor.
The value returned may change after calling gdk.popup.Popup.present, or after the gdk.surface.Surface.layout signal is emitted.
Returns
Present popup after having processed the gdk.popup_layout.PopupLayout rules.
If the popup was previously now showing, it will be showed, otherwise it will change position according to layout.
After calling this function, the result should be handled in response to the gdk.surface.Surface.layout signal being emitted. The resulting popup position can be queried using gdk.popup.Popup.getPositionX, gdk.popup.Popup.getPositionY, and the resulting size will be sent as parameters in the layout signal. Use gdk.popup.Popup.getRectAnchor and gdk.popup.Popup.getSurfaceAnchor to get the resulting anchors.
Presenting may fail, for example if the popup is set to autohide and is immediately hidden upon being presented. If presenting failed, the gdk.surface.Surface.layout signal will not me emitted.
Parameters
width | the unconstrained popup width to layout |
height | the unconstrained popup height to layout |
layout | the gdk.popup_layout.PopupLayout object used to layout |
Returns
Fluent builder implementation template for gdk.popup.Popup
Set autohide property.
Parameters
propval | Whether to hide on outside clicks. |
Returns
Set parent property.
Parameters
propval | The parent surface. |