diff options
author | Tristan Van Berkom <tvb@src.gnome.org> | 2008-11-06 17:34:30 +0000 |
---|---|---|
committer | Tristan Van Berkom <tvb@src.gnome.org> | 2008-11-06 17:34:30 +0000 |
commit | 4858ae47e212f9dc4e73bb8a6b929179e0ade0c5 (patch) | |
tree | da4fdee1aa9190f2f16c235a378b13a1f8bb4b83 /docs | |
parent | 70a5f5388e7ebd416bf1c81dbacc49cdea9365f2 (diff) | |
download | gtk+-4858ae47e212f9dc4e73bb8a6b929179e0ade0c5.tar.gz |
Made buildable and added support for adding children of type "submenu"
* gtk/gtkmenuitem.c: Made buildable and added support for adding children
of type "submenu"
* gtk/gtkwindow.c: Added support for custom tag "accel-groups" to add GtkAccelGroups
to the window.
* gtk/gtkcontainer.c: Added builder contextual warnings in buildable_add_child()
* gtk/tests/builder.c: Added tests for buildable menus (test that accelerators are
properly connected on stock items, test the menu hierarchy, test permission to
add alien/custom menuitem children).
* docs/reference/gtk/tmpl/gtkbuilder.sgml, docs/reference/gtk/tmpl/gtkwindow.sgml,
docs/reference/gtk/tmpl/gtkmenuitem.sgml: Updated docs for buildable submenus
and accel groups.
svn path=/trunk/; revision=21767
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/gtk/tmpl/gtkbuilder.sgml | 2 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtkmenuitem.sgml | 18 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtkwindow.sgml | 23 |
3 files changed, 43 insertions, 0 deletions
diff --git a/docs/reference/gtk/tmpl/gtkbuilder.sgml b/docs/reference/gtk/tmpl/gtkbuilder.sgml index 21f5073f4d..57e18735d5 100644 --- a/docs/reference/gtk/tmpl/gtkbuilder.sgml +++ b/docs/reference/gtk/tmpl/gtkbuilder.sgml @@ -212,6 +212,7 @@ These XML fragments are explained in the documentation of the respective objects, see <link linkend="GtkWidget-BUILDER-UI">GtkWidget</link>, <link linkend="GtkLabel-BUILDER-UI">GtkLabel</link>, +<link linkend="GtkWindow-BUILDER-UI">GtkWindow</link>, <link linkend="GtkContainer-BUILDER-UI">GtkContainer</link>, <link linkend="GtkDialog-BUILDER-UI">GtkDialog</link>, <link linkend="GtkCellLayout-BUILDER-UI">GtkCellLayout</link>, @@ -227,6 +228,7 @@ respective objects, see <link linkend="GtkTreeView-BUILDER-UI">GtkTreeView</link>, <link linkend="GtkUIManager-BUILDER-UI">GtkUIManager</link>, <link linkend="GtkActionGroup-BUILDER-UI">GtkActionGroup</link>. +<link linkend="GtkMenuItem-BUILDER-UI">GtkMenuItem</link>. </para> </refsect2> diff --git a/docs/reference/gtk/tmpl/gtkmenuitem.sgml b/docs/reference/gtk/tmpl/gtkmenuitem.sgml index a3e01835d3..acc28908e1 100644 --- a/docs/reference/gtk/tmpl/gtkmenuitem.sgml +++ b/docs/reference/gtk/tmpl/gtkmenuitem.sgml @@ -14,6 +14,24 @@ alignment, events and submenus. As it derives from #GtkBin it can hold any valid child widget, altough only a few are really useful. </para> +<refsect2 id="GtkMenuItem-BUILDER-UI"> +<title>GtkMenuItem as GtkBuildable</title> +<para> +The GtkMenuItem implementation of the GtkBuildable interface +supports adding a submenu by specifying "submenu" as the "type" +attribute of a <child> element. +</para> +<example> +<title>A UI definition fragment with submenus</title> +<programlisting><![CDATA[ +<object class="GtkMenuItem"> + <child type="submenu"> + <object class="GtkMenu"/> + </child> +</object> +]]></programlisting> +</example> +</refsect2> <!-- ##### SECTION See_Also ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkwindow.sgml b/docs/reference/gtk/tmpl/gtkwindow.sgml index 03f4ac15d6..377a79b3af 100644 --- a/docs/reference/gtk/tmpl/gtkwindow.sgml +++ b/docs/reference/gtk/tmpl/gtkwindow.sgml @@ -8,6 +8,29 @@ Toplevel which can contain other widgets <para> </para> +<refsect2 id="GtkWindow-BUILDER-UI"> +<title>GtkWindow as GtkBuildable</title> +<para> +The GtkWindow implementation of the GtkBuildable interface supports a +custom <accel-groups> element, which supports any number of <group> +elements representing the GtkAccelGroup objects you want to add to your +window (synonymous with gtk_window_add_accel_group(). +</para> +<example> +<title>A UI definition fragment with accel groups</title> +<programlisting><![CDATA[ +<object class="GtkWindow"> + <accel-groups> + <group name="accelgroup1"/> + </accel-groups> +</object> + +... + +<object class="GtkAccelGroup" id="accelgroup1"/> +]]></programlisting> +</example> +</refsect2> <!-- ##### SECTION See_Also ##### --> <para> |