Warning: position_menu is deprecated since 4.17.2.
Function to be used as MenuPositionFunc in a call to popup.
Use popup_menu instead.
As data argument it needs an PanelPlugin.
The menu is normally positioned relative to panel_plugin. If you want the menu to be positioned relative to another widget,
you can use attach_to_widget to explicitly set a 'parent' widget.
As a convenience, position_menu calls register_menu for the menu.
<example> void myplugin_popup_menu (XfcePanelPlugin *plugin, GtkMenu *menu, GdkEventButton *ev) { gtk_menu_popup (menu, NULL, NULL, xfce_panel_plugin_position_menu, plugin, ev->button, ev->time ); } </example>
For a custom widget that will be used as a popup menu, use position_widget instead.
See also: popup.
| menu |
a Menu. |
| x |
return location for the x coordinate. |
| y |
return location for the y coordinate. |
| push_in |
keep inside the screen (see MenuPositionFunc) |
| panel_plugin |
an PanelPlugin. |