position_menu


Description:

[ Version ( deprecated = true , deprecated_since = "4.17.2" ) ]
public static void position_menu (Menu menu, out int x, out int y, bool push_in, void* panel_plugin)

Warning: position_menu is deprecated since 4.17.2.

Function to be used as MenuPositionFunc in a call to popup.

Note:

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.

Parameters:

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.