Method
GtkMenupopup_at_widget
Declaration [src]
void
gtk_menu_popup_at_widget (
GtkMenu* menu,
GtkWidget* widget,
GdkGravity widget_anchor,
GdkGravity menu_anchor,
const GdkEvent* trigger_event
)
Description [src]
Displays menu
and makes it available for selection.
See gtk_menu_popup_at_pointer () to pop up a menu at the master pointer. gtk_menu_popup_at_rect () also allows you to position a menu at an arbitrary rectangle.
menu
will be positioned at widget
, aligning their anchor points.
widget_anchor
and menu_anchor
determine anchor points on widget
and menu
to pin together. menu
can optionally be offset by GtkMenu:rect-anchor-dx
and GtkMenu: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
GtkMenu:anchor-hints
and GtkMenu:menu-type-hint
. Connect to the
GtkMenu::popped-up
signal to find out how it was actually positioned.
Available since: | 3.22 |
Parameters
widget |
GtkWidget |
The |
|
The data is owned by the caller of the function. | |
widget_anchor |
GdkGravity |
The point on |
|
menu_anchor |
GdkGravity |
The point on |
|
trigger_event |
GdkEvent |
The |
|
The argument can be NULL . | |
The data is owned by the caller of the function. |