Package: gtk

Function gtk:menu-popup-at-widget

Lambda List

gtk:menu-popup-at-widget (menu widget widget-anchor menu-anchor event)

Arguments

menu -- a gtk:menu widget to pop up
widget -- a gtk:widget widget to align menu with
widget-anchor -- a gdk:gravity value with the point on widget to align with the menu's anchor point
menu-anchor -- a gdk:gravity value with the point on menu to align with widget's anchor point
event -- a gdk:event instance that initiated this request or nil if it is the current event

Details

Displays the menu and makes it available for selection. See the gtk:menu-popup-at-pointer function to pop up a menu at the master pointer. The gtk:menu-popup-at-rect function also allows you to position a menu at an arbitrary rectangle.

The menu will be positioned at widget, aligning their anchor points. The widget-anchor and menu-anchor arguments determine anchor points on widget and menu to pin together. The menu can optionally be offset by the rect-anchor-dx and rect-anchor-dy properties.

Anchors should be specified under the assumption that the text direction is left-to-right. They will be flipped horizontally automatically if the text direction is right-to-left.

Other properties that influence the behaviour of this function are the anchor-hints and menu-type-hint properties. Connect to the "popped-up" signal to find out how it was actually positioned.
 

See also

#2023-3-21