<refentry id="GtkMenuBar">
<refmeta>
<refentrytitle>GtkMenuBar</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkMenuBar</refname><refpurpose>A subclass widget for <link linkend="GtkMenuShell">GtkMenuShell</link> which holds <link linkend="GtkMenuItem">GtkMenuItem</link> widgets</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkMenuBar-struct">GtkMenuBar</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-menu-bar-new">gtk_menu_bar_new</link>                (void);
#define     <link linkend="gtk-menu-bar-append">gtk_menu_bar_append</link>             (menu,child)
#define     <link linkend="gtk-menu-bar-prepend">gtk_menu_bar_prepend</link>            (menu,child)
#define     <link linkend="gtk-menu-bar-insert">gtk_menu_bar_insert</link>             (menu,child,pos)


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkContainer">GtkContainer</link>
                     +----<link linkend="GtkMenuShell">GtkMenuShell</link>
                           +----GtkMenuBar
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkMenuBar">GtkMenuBar</link> is a subclass of <link linkend="GtkMenuShell">GtkMenuShell</link> which contains one to many <link linkend="GtkMenuItem">GtkMenuItem</link>. The result is a standard menu bar which can hold many menu items. <link linkend="GtkMenuBar">GtkMenuBar</link> allows for a shadow type to be set for aesthetic purposes. The shadow types are defined in the <link linkend="gtk-menu-bar-set-shadow-type">gtk_menu_bar_set_shadow_type</link> function.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkMenuBar-struct">struct GtkMenuBar</title>
<programlisting>struct GtkMenuBar;</programlisting>
<para>
The <link linkend="GtkMenuBar">GtkMenuBar</link> struct contains the following fields. (These fields should be considered read-only.  They should never be set by an application.)
</para></refsect2>
<refsect2>
<title><anchor id="gtk-menu-bar-new">gtk_menu_bar_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_menu_bar_new                (void);</programlisting>
<para>
Creates the new <link linkend="GtkMenuBar">GtkMenuBar</link>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GtkMenuBar">GtkMenuBar</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-menu-bar-append">gtk_menu_bar_append()</title>
<programlisting>#define gtk_menu_bar_append(menu,child)	    gtk_menu_shell_append  ((GtkMenuShell *)(menu),(child))
</programlisting>
<warning>
<para>
<literal>gtk_menu_bar_append</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Adds a new <link linkend="GtkMenuItem">GtkMenuItem</link> to the end of the GtkMenuBar
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>menu</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry>the <link linkend="GtkMenuItem">GtkMenuItem</link> to add
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-menu-bar-prepend">gtk_menu_bar_prepend()</title>
<programlisting>#define gtk_menu_bar_prepend(menu,child)    gtk_menu_shell_prepend ((GtkMenuShell *)(menu),(child))
</programlisting>
<warning>
<para>
<literal>gtk_menu_bar_prepend</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Adds a new <link linkend="GtkMenuItem">GtkMenuItem</link> to the beginning of the GtkMenuBar
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>menu</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry>the <link linkend="GtkMenuItem">GtkMenuItem</link> to add
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-menu-bar-insert">gtk_menu_bar_insert()</title>
<programlisting>#define gtk_menu_bar_insert(menu,child,pos) gtk_menu_shell_insert ((GtkMenuShell *)(menu),(child),(pos))
</programlisting>
<warning>
<para>
<literal>gtk_menu_bar_insert</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Adds a new <link linkend="GtkMenuItem">GtkMenuItem</link> to the GtkMenuBar at the position defined by <parameter>position</parameter>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>menu</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry>the <link linkend="GtkMenuItem">GtkMenuItem</link> to add
</entry></row>
<row><entry align="right"><parameter>pos</parameter>&nbsp;:</entry>
<entry>
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="GtkMenuShell">GtkMenuShell</link>, <link linkend="GtkMenu">GtkMenu</link>, <link linkend="GtkMenuItem">GtkMenuItem</link>
</para>
</refsect1>

</refentry>
