Package: gdk

Function gdk:popup-present

Lambda List

gdk:popup-present (popup width height layout)

Arguments

popup -- a gdk:popup object to show
width -- an integer with the unconstrained popup width to layout
height -- an integer with the unconstrained popup height to layout
layout -- a gdk:popup-layout object used to layout

Return Value

False if it failed to be presented, otherwise true.

Details

Present popup after having processed the gdk:popup-layout 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 "layout" signal being emitted. The resulting popup position can be queried using the gdk:popup-position-x, gdk:popup-position-y functions, and the resulting size will be sent as parameters in the layout signal. Use the gdk:popup-rect-anchor and gdk:popup-surface-anchor function 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 "layout" signal will not me emitted.
 

See also

#2023-4-10