popup_at_rect


Description:

[ Version ( since = "3.22" ) ]
public void popup_at_rect (Window rect_window, Rectangle rect, Gravity rect_anchor, Gravity menu_anchor, Event? trigger_event = null)

Displays this and makes it available for selection.

See gtk_menu_popup_at_widget () and gtk_menu_popup_at_pointer (), which handle more common cases for popping up menus.

this will be positioned at rect, aligning their anchor points. rect is relative to the top-left corner of rect_window. rect_anchor and menu_anchor determine anchor points on rect and this to pin together. this can optionally be offset by rect_anchor_dx and rect_anchor_dy.

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 anchor_hints and menu_type_hint. Connect to the popped_up signal to find out how it was actually positioned.

Parameters:

this

the Menu to pop up

rect_window

the Window rect is relative to

rect

the Rectangle to align this with

rect_anchor

the point on rect to align with this's anchor point

menu_anchor

the point on this to align with rect's anchor point

trigger_event

the Event that initiated this request or null if it's the current event