Package: gtk

Function gtk:menu-popup-at-rect

Lambda List

gtk:menu-popup-at-rect (menu window rect rect-anchor menu-anchor event)

Arguments

menu -- a gtk:menu widget to pop up
window -- a gdk:window object rect is relative to
rect -- a gdk:rectangle instance to align menu with
rect-anchor -- a gdk:gravity value with the point on rect to align with the menu's anchor point
menu-anchor -- a gdk:gravity value with the point on menu to align with rect'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-widget and gtk:menu-popup-at-pointer functions, which handle more common cases for popping up menus.

The menu will be positioned at rect, aligning their anchor points. The rect argument is relative to the top-left corner of window. The rect-anchor and menu-anchor arguments determine anchor points on rect 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