]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtkmenu.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtkmenu.sgml
index d59a519fa3b95fa79ea3a91e8c6bfb17bf16b9fd..d0497ae5680118f690fad136175cfafc6472f385 100644 (file)
@@ -2,7 +2,7 @@
 GtkMenu
 
 <!-- ##### SECTION Short_Description ##### -->
-a drop down menu widget.
+A menu widget
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
@@ -32,8 +32,8 @@ can pop up a menu when the 3rd mouse button is pressed.
 <title>Connecting the popup signal handler.</title>
 <programlisting>
     /* connect our handler which will popup the menu */
-    g_signal_connect_swapped (GTK_OBJECT (window), "button_press_event",
-       G_CALLBACK (my_popup_handler), GTK_OBJECT (menu));
+    g_signal_connect_swapped (window, "button_press_event",
+       G_CALLBACK (my_popup_handler), menu);
 </programlisting>
 </example>
 
@@ -76,6 +76,12 @@ my_popup_handler (GtkWidget *widget, GdkEvent *event)
 
 </para>
 
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### STRUCT GtkMenu ##### -->
 <para>
 The #GtkMenu struct contains private data only, and
@@ -83,60 +89,125 @@ should be accessed using the functions below.
 </para>
 
 
-<!-- ##### FUNCTION gtk_menu_new ##### -->
+<!-- ##### SIGNAL GtkMenu::move-scroll ##### -->
 <para>
-Creates a new #GtkMenu.
+
 </para>
 
-@Returns: a new #GtkMenu.
+@menu: the object which received the signal.
+@arg1: 
 
+<!-- ##### ARG GtkMenu:accel-group ##### -->
+<para>
 
-<!-- ##### FUNCTION gtk_menu_set_screen ##### -->
+</para>
+
+<!-- ##### ARG GtkMenu:accel-path ##### -->
 <para>
 
 </para>
 
-@menu: 
-@screen: 
+<!-- ##### ARG GtkMenu:active ##### -->
+<para>
 
+</para>
 
-<!-- ##### MACRO gtk_menu_append ##### -->
+<!-- ##### ARG GtkMenu:attach-widget ##### -->
 <para>
-Adds a new #GtkMenuItem to the end of the menu's item list.
+
 </para>
 
-@menu: a #GtkMenu.
-@child: The #GtkMenuItem to add.
-<!-- # Unused Parameters # -->
-@m: 
-@c: 
+<!-- ##### ARG GtkMenu:monitor ##### -->
+<para>
 
+</para>
 
-<!-- ##### MACRO gtk_menu_prepend ##### -->
+<!-- ##### ARG GtkMenu:reserve-toggle-size ##### -->
 <para>
-Adds a new #GtkMenuItem to the beginning of the menu's item list.
+
 </para>
 
-@menu: a #GtkMenu.
-@child: The #GtkMenuItem to add.
-<!-- # Unused Parameters # -->
-@menu_child: 
-@m: 
-@c: 
+<!-- ##### ARG GtkMenu:tearoff-state ##### -->
+<para>
 
+</para>
 
-<!-- ##### MACRO gtk_menu_insert ##### -->
+<!-- ##### ARG GtkMenu:tearoff-title ##### -->
 <para>
-Adds a new #GtkMenuItem to the menu's item list at the position
-indicated by @position. 
+
 </para>
 
-@menu: a #GtkMenu.
-@child: The #GtkMenuItem to add.
-@pos: 
-<!-- # Unused Parameters # -->
-@position: The position in the item list where @child is added.
-Positions are numbered from 0 to n-1.
+<!-- ##### ARG GtkMenu:bottom-attach ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:left-attach ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:right-attach ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:top-attach ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:arrow-placement ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:arrow-scaling ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:double-arrows ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:horizontal-offset ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:horizontal-padding ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:vertical-offset ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkMenu:vertical-padding ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gtk_menu_new ##### -->
+<para>
+Creates a new #GtkMenu.
+</para>
+
+@void: 
+@Returns: a new #GtkMenu.
+
+
+<!-- ##### FUNCTION gtk_menu_set_screen ##### -->
+<para>
+
+</para>
+
+@menu: 
+@screen: 
 
 
 <!-- ##### FUNCTION gtk_menu_reorder_child ##### -->
@@ -150,6 +221,19 @@ Moves a #GtkMenuItem to a new position within the #GtkMenu.
 0 to n-1.
 
 
+<!-- ##### FUNCTION gtk_menu_attach ##### -->
+<para>
+
+</para>
+
+@menu: 
+@child: 
+@left_attach: 
+@right_attach: 
+@top_attach: 
+@bottom_attach: 
+
+
 <!-- ##### FUNCTION gtk_menu_popup ##### -->
 
 
@@ -193,6 +277,15 @@ See gtk_menu_set_accel_group().
 @accel_path: 
 
 
+<!-- ##### FUNCTION gtk_menu_get_accel_path ##### -->
+<para>
+
+</para>
+
+@menu: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_menu_set_title ##### -->
 <para>
 </para>
@@ -201,6 +294,33 @@ See gtk_menu_set_accel_group().
 @title: 
 
 
+<!-- ##### FUNCTION gtk_menu_get_title ##### -->
+<para>
+
+</para>
+
+@menu: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_menu_set_monitor ##### -->
+<para>
+
+</para>
+
+@menu: 
+@monitor_num: 
+
+
+<!-- ##### FUNCTION gtk_menu_get_monitor ##### -->
+<para>
+
+</para>
+
+@menu: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_menu_get_tearoff_state ##### -->
 <para>
 
@@ -210,7 +330,16 @@ See gtk_menu_set_accel_group().
 @Returns: 
 
 
-<!-- ##### FUNCTION gtk_menu_get_title ##### -->
+<!-- ##### FUNCTION gtk_menu_set_reserve_toggle_size ##### -->
+<para>
+
+</para>
+
+@menu: 
+@reserve_toggle_size: 
+
+
+<!-- ##### FUNCTION gtk_menu_get_reserve_toggle_size ##### -->
 <para>
 
 </para>
@@ -300,11 +429,22 @@ Returns the #GtkWidget that the menu is attached to.
 @Returns: the #GtkWidget that the menu is attached to.
 
 
+<!-- ##### FUNCTION gtk_menu_get_for_attach_widget ##### -->
+<para>
+
+</para>
+
+@widget: 
+@Returns: 
+
+
 <!-- ##### USER_FUNCTION GtkMenuPositionFunc ##### -->
 <para>
 A user function supplied when calling gtk_menu_popup() which controls the
 positioning of the menu when it is displayed.  The function sets the @x
 and @y parameters to the coordinates where the menu is to be drawn.
+To make the menu appear on a different monitor than the mouse pointer,
+gtk_menu_set_monitor() must be called.
 </para>
 
 @menu: a #GtkMenu.
@@ -312,7 +452,16 @@ and @y parameters to the coordinates where the menu is to be drawn.
 menu shall be drawn.  This is an output parameter.
 @y: address of the #gint representing the vertical position where the
 menu shall be drawn.  This is an output parameter.
-@push_in: 
+@push_in: This parameter controls how menus placed outside the monitor are handled.
+        If this is set to %TRUE and part of the menu is outside the monitor then
+        GTK+ pushes the window into the visible area, effectively modifying the
+        popup position.
+        Note that moving and possibly resizing the menu around will alter the
+        scroll position to keep the menu items "in place", i.e. at the same monitor
+        position they would have been without resizing.
+        In practice, this behavior is only useful for combobox popups or option
+        menus and cannot be used to simply confine a menu to monitor boundaries.
+        In that case, changing the scroll offset is not desirable.
 @user_data: the data supplied by the user in the gtk_menu_popup() @data
 parameter.
 
@@ -327,31 +476,3 @@ will be called when the menu is later detached from the widget.
 @menu: the #GtkMenu being detached.
 
 
-<!-- ##### SIGNAL GtkMenu::move-scroll ##### -->
-<para>
-
-</para>
-
-@menu: the object which received the signal.
-@arg1: 
-
-<!-- ##### ARG GtkMenu:tearoff-title ##### -->
-<para>
-
-</para>
-
-<!-- ##### ARG GtkMenu:horizontal-offset ##### -->
-<para>
-
-</para>
-
-<!-- ##### ARG GtkMenu:vertical-offset ##### -->
-<para>
-
-</para>
-
-<!-- ##### ARG GtkMenu:vertical-padding ##### -->
-<para>
-
-</para>
-