diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2003-09-01 00:34:41 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-09-01 00:34:41 +0000 |
commit | 38ee74b053f63c3884a0dfbb558aa851607f9cf4 (patch) | |
tree | 0b09c3a9324e176dd9f91f2541994760860e59d2 /docs | |
parent | 7cddc693b0df6761f8e1b2c52b69130baab5f341 (diff) | |
download | gdk-pixbuf-38ee74b053f63c3884a0dfbb558aa851607f9cf4.tar.gz |
Add an example UI description.
* gtk/tmpl/gtkuimanager.sgml: Add an example UI description.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/ChangeLog | 2 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtkuimanager.sgml | 106 |
2 files changed, 83 insertions, 25 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 2267b68ec..17d36893d 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,7 @@ 2003-09-01 Matthias Clasen <maclas@gmx.de> + * gtk/tmpl/gtkuimanager.sgml: Add an example UI description. + * gtk/gtk-sections.txt: Add gtk_ui_manager_ensure_update. 2003-08-31 Matthias Clasen <maclas@gmx.de> diff --git a/docs/reference/gtk/tmpl/gtkuimanager.sgml b/docs/reference/gtk/tmpl/gtkuimanager.sgml index 3bf4e5f9c..dbcf7fb56 100644 --- a/docs/reference/gtk/tmpl/gtkuimanager.sgml +++ b/docs/reference/gtk/tmpl/gtkuimanager.sgml @@ -12,8 +12,8 @@ action groups. </para> <refsect2 id="XML-UI"><title>UI Definitions</title> <para> -The UI definitions are specified in an XML format which is described -by the following DTD. +The UI definitions are specified in a #GMarkup format which can be +roughly described by the following XML DTD. <programlisting> <!ELEMENT ui (menubar|toolbar|popup)* > <!ELEMENT menubar (menuitem|separator|placeholder|menu)* > @@ -38,29 +38,77 @@ by the following DTD. action #REQUIRED pos (top|bot) #IMPLIED > </programlisting> -There are some additional restrictions beyond those specified in the DTD, e.g. -every toolitem must have a toolbar in its anchestry and every menuitem must have -a menubar or popup in its anchestry. If a name is not specified, it defaults to -the action. If an action is not specified either, the element name is used. -</para> -<para> -The constructed widget hierarchy is very similar to the element -tree of the XML, with the exception that placeholders are merged into their -parents. The correspondence of XML elements to widgets should be almost obvious: -<itemizedlist> -<listitem><para>menubar: a #GtkMenuBar</para></listitem> -<listitem><para>toolbar: a #GtkToolBar</para></listitem> -<listitem><para>popup: a toplevel #GtkMenu</para></listitem> -<listitem><para>menu: a #GtkMenu attached to a menuitem</para></listitem> -<listitem><para>menuitem: a #GtkMenuItem subclass, the exact type depends on the action</para></listitem> -<listitem><para>toolitem: a #GtkToolItem subclass, the exact type depends on the action</para></listitem> -<listitem><para>separator: a #GtkSeparatorMenuItem or #GtkSeparatorToolItem</para></listitem> -</itemizedlist> -</para> -<para> -The pos attribute determines where a constructed widget is positioned wrt. to its -siblings in the partially constructed tree. If it is "top", the widget is prepended, -otherwise it is appended. +There are some additional restrictions beyond those specified in the +DTD, e.g. every toolitem must have a toolbar in its anchestry and +every menuitem must have a menubar or popup in its anchestry. If a name +is not specified, it defaults to the action. If an action is not specified +either, the element name is used. +</para> +<example> +<title>A UI definition</title> +<programlisting> +<ui> + <menubar> + <menu name="FileMenu" action="FileMenuAction"> + <menuitem name="New" action="New2Action" /> + <placeholder name="FileMenuAdditions" /> + </menu> + <menu name="JustifyMenu" action="JustifyMenuAction"> + <menuitem name="Left" action="justify-left"/> + <menuitem name="Centre" action="justify-center"/> + <menuitem name="Right" action="justify-right"/> + <menuitem name="Fill" action="justify-fill"/> + </menu> + </menubar> + <toolbar action="toolbar1"> + <placeholder name="JustifyToolItems"> + <separator/> + <toolitem name="Left" action="justify-left"/> + <toolitem name="Centre" action="justify-center"/> + <toolitem name="Right" action="justify-right"/> + <toolitem name="Fill" action="justify-fill"/> + <separator/> + </placeholder> + </toolbar> +</ui> +</programlisting> +</example> +<para> +The constructed widget hierarchy is very similar to the element tree +of the XML, with the exception that placeholders are merged into their +parents. The correspondence of XML elements to widgets should be +almost obvious: +<variablelist> +<varlistentry><term>menubar</term> +<listitem><para>a #GtkMenuBar</para></listitem> +</varlistentry> +<varlistentry><term>toolbar</term> +<listitem><para>a #GtkToolbar</para></listitem> +</varlistentry> +<varlistentry><term>popup</term> +<listitem><para>a toplevel #GtkMenu</para></listitem> +</varlistentry> +<varlistentry><term>menu</term> +<listitem><para>a #GtkMenu attached to a menuitem</para></listitem> +</varlistentry> +<varlistentry><term>menuitem</term> +<listitem><para>a #GtkMenuItem subclass, the exact type depends on the +action</para></listitem> +</varlistentry> +<varlistentry><term>toolitem</term> +<listitem><para>a #GtkToolItem subclass, the exact type depends on the +action</para></listitem> +</varlistentry> +<varlistentry><term>separator</term> +<listitem><para>a #GtkSeparatorMenuItem or +#GtkSeparatorToolItem</para></listitem> +</varlistentry> +</variablelist> +</para> +<para> +The pos attribute determines where a constructed widget is positioned +wrt. to its siblings in the partially constructed tree. If it is +"top", the widget is prepended, otherwise it is appended. </para> </refsect2> @@ -199,6 +247,14 @@ otherwise it is appended. @Returns: +<!-- ##### FUNCTION gtk_ui_manager_ensure_update ##### --> +<para> + +</para> + +@self: + + <!-- ##### SIGNAL GtkUIManager::add-widget ##### --> <para> |