]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtkmenu.sgml
=== Released 2.1.5 ===
[~andy/gtk] / docs / reference / gtk / tmpl / gtkmenu.sgml
index 7411912cbcd68e64870565c3cafc958acc8cef4d..4d1eb2a2b246cf5aacba32a4ed3fe9f0a7c8be47 100644 (file)
@@ -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 */
-    gtk_signal_connect_object(GTK_OBJECT(window), "button_press_event",
-       GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT(menu));
+    g_signal_connect_swapped (GTK_OBJECT (window), "button_press_event",
+       G_CALLBACK (my_popup_handler), GTK_OBJECT (menu));
 </programlisting>
 </example>
 
@@ -41,7 +41,7 @@ can pop up a menu when the 3rd mouse button is pressed.
 <title>Signal handler which displays a popup menu.</title>
 <programlisting>
 static gint
-my_popup_handler(GtkWidget *widget, GdkEvent *event)
+my_popup_handler (GtkWidget *widget, GdkEvent *event)
 {
   GtkMenu *menu;
   GdkEventButton *event_button;
@@ -51,7 +51,7 @@ my_popup_handler(GtkWidget *widget, GdkEvent *event)
   g_return_val_if_fail (event != NULL, FALSE);
 
   /* The "widget" is the menu that was supplied when 
-   * gtk_signal_connect_object was called.
+   * g_signal_connect_swapped() was called.
    */
   menu = GTK_MENU (widget);
 
@@ -78,19 +78,10 @@ my_popup_handler(GtkWidget *widget, GdkEvent *event)
 
 <!-- ##### STRUCT GtkMenu ##### -->
 <para>
-The #GtkMenu-struct struct contains private data only, and
+The #GtkMenu struct contains private data only, and
 should be accessed using the functions below.
 </para>
 
-@menu_shell: 
-@parent_menu_item: 
-@old_active_menu_item: 
-@accel_group: 
-@position_func: 
-@position_func_data: 
-@toplevel: 
-@tearoff_window: 
-@torn_off: 
 
 <!-- ##### FUNCTION gtk_menu_new ##### -->
 <para>
@@ -100,25 +91,41 @@ Creates a new #GtkMenu.
 @Returns: a new #GtkMenu.
 
 
-<!-- ##### FUNCTION gtk_menu_append ##### -->
+<!-- ##### FUNCTION gtk_menu_set_screen ##### -->
+<para>
+
+</para>
+
+@menu: 
+@screen: 
+
+
+<!-- ##### MACRO gtk_menu_append ##### -->
 <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: 
 
 
-<!-- ##### FUNCTION gtk_menu_prepend ##### -->
+<!-- ##### MACRO gtk_menu_prepend ##### -->
 <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: 
 
 
-<!-- ##### FUNCTION gtk_menu_insert ##### -->
+<!-- ##### MACRO gtk_menu_insert ##### -->
 <para>
 Adds a new #GtkMenuItem to the menu's item list at the position
 indicated by @position. 
@@ -126,6 +133,8 @@ indicated by @position.
 
 @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.
 
@@ -142,40 +151,72 @@ Moves a #GtkMenuItem to a new position within the #GtkMenu.
 
 
 <!-- ##### FUNCTION gtk_menu_popup ##### -->
-<para>
-Displays a menu and makes it available for selection.  Applications can use
-this function to display context-sensitive menus, and will typically supply
-NULL for the @parent_menu_shell, @parent_menu_item, @func and @data 
-parameters.  The default menu positioning function will position the menu
-at the current pointer position.
-</para>
 
-@menu: a #GtkMenu.
-@parent_menu_shell: the menu shell containing the triggering menu item.
-@parent_menu_item: the menu item whose activation triggered the popup.
-@func: a user supplied function used to position the menu.
-@data: user supplied data to be passed to @func.
-@button: the button which was pressed to initiate the event.
-@activate_time: the time at which the activation event occurred.
+
+@menu: 
+@parent_menu_shell: 
+@parent_menu_item: 
+@func: 
+@data: 
+@button: 
+@activate_time: 
 
 
 <!-- ##### FUNCTION gtk_menu_set_accel_group ##### -->
 <para>
 Set the #GtkAccelGroup which holds global accelerators for the menu.
+This accelerator group needs to also be added to all windows that
+this menu is being used in with gtk_window_add_accel_group(), in order
+for those windows to support all the accelerators contained in this group.
 </para>
 
 @menu: a #GtkMenu.
 @accel_group: the #GtkAccelGroup to be associated with the menu.
 
 
-<!-- ##### FUNCTION gtk_menu_set_title ##### -->
+<!-- ##### FUNCTION gtk_menu_get_accel_group ##### -->
 <para>
-Sets the title string for the menu.  The title is displayed when the menu
-is shown as a tearoff menu.
+Gets the #GtkAccelGroup which holds global accelerators for the menu.
+See gtk_menu_set_accel_group().
 </para>
 
 @menu: a #GtkMenu.
-@title: a string containing the title for the menu.
+@Returns: the #GtkAccelGroup associated with the menu.
+
+
+<!-- ##### FUNCTION gtk_menu_set_accel_path ##### -->
+<para>
+
+</para>
+
+@menu: 
+@accel_path: 
+
+
+<!-- ##### FUNCTION gtk_menu_set_title ##### -->
+<para>
+</para>
+
+@menu: 
+@title: 
+
+
+<!-- ##### FUNCTION gtk_menu_get_tearoff_state ##### -->
+<para>
+
+</para>
+
+@menu: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_menu_get_title ##### -->
+<para>
+
+</para>
+
+@menu: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gtk_menu_popdown ##### -->
@@ -208,11 +249,11 @@ selection has not yet been made, the first menu item is selected.
 <!-- ##### FUNCTION gtk_menu_set_active ##### -->
 <para>
 Selects the specified menu item within the menu.  This is used by the
-#GtkOptionMenu.
+#GtkOptionMenu and should not be used by anyone else.
 </para>
 
 @menu: a #GtkMenu.
-@index: the index of the menu item to select.  Index values are from
+@index_: the index of the menu item to select.  Index values are from
 0 to n-1.
 
 
@@ -225,7 +266,7 @@ or reattached.
 </para>
 
 @menu: a #GtkMenu.
-@torn_off: If TRUE, menu is displayed as a tearoff menu.
+@torn_off: If %TRUE, menu is displayed as a tearoff menu.
 
 
 <!-- ##### FUNCTION gtk_menu_attach_to_widget ##### -->
@@ -271,6 +312,7 @@ 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: 
 @user_data: the data supplied by the user in the gtk_menu_popup() @data
 parameter.
 
@@ -285,3 +327,16 @@ 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>
+