<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkMenuButton">
<refmeta>
<refentrytitle role="top_of_page" id="GtkMenuButton.top_of_page">GtkMenuButton</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkMenuButton</refname>
<refpurpose>A widget that shows a popup when clicked on</refpurpose>
</refnamediv>

<refsect1 id="GtkMenuButton.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-menu-button-new">gtk_menu_button_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-popover">gtk_menu_button_set_popover</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkPopover"><returnvalue>GtkPopover</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-popover">gtk_menu_button_get_popover</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-menu-model">gtk_menu_button_set_menu_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-menu-model">gtk_menu_button_get_menu_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-direction">gtk_menu_button_set_direction</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkArrowType"><returnvalue>GtkArrowType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-direction">gtk_menu_button_get_direction</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-align-widget">gtk_menu_button_set_align_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-align-widget">gtk_menu_button_get_align_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-icon-name">gtk_menu_button_set_icon_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-icon-name">gtk_menu_button_get_icon_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-label">gtk_menu_button_set_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-label">gtk_menu_button_get_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-has-frame">gtk_menu_button_set_has_frame</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-has-frame">gtk_menu_button_get_has_frame</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-get-use-underline">gtk_menu_button_get_use_underline</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-use-underline">gtk_menu_button_set_use_underline</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-popup">gtk_menu_button_popup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-popdown">gtk_menu_button_popdown</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="GtkMenuButtonCreatePopupFunc">*GtkMenuButtonCreatePopupFunc</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-menu-button-set-create-popup-func">gtk_menu_button_set_create_popup_func</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkMenuButton.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkMenuButton--align-widget">align-widget</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkArrowType"><type>GtkArrowType</type></link></entry><entry role="property_name"><link linkend="GtkMenuButton--direction">direction</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkMenuButton--has-frame">has-frame</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkMenuButton--icon-name">icon-name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkMenuButton--label">label</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkMenuButton--menu-model">menu-model</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkPopover"><type>GtkPopover</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkMenuButton--popover">popover</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkMenuButton--use-underline">use-underline</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkMenuButton.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkMenuButton-struct">GtkMenuButton</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkArrowType">GtkArrowType</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkMenuButton.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkMenuButton
</screen>
</refsect1>
<refsect1 id="GtkMenuButton.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkMenuButton implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

<refsect1 id="GtkMenuButton.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkMenuButton.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> widget is used to display a popup when clicked on.
This popup can be provided either as a <link linkend="GtkPopover"><type>GtkPopover</type></link> or as an abstract
<link linkend="GMenuModel"><type>GMenuModel</type></link>.</para>
<para>The <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> widget can show either an icon (set with the
<link linkend="GtkMenuButton--icon-name"><type>“icon-name”</type></link> property) or a label (set with the
<link linkend="GtkMenuButton--label"><type>“label”</type></link> property). If neither is explicitly set,
a <link linkend="GtkImage"><type>GtkImage</type></link> is automatically created, using an arrow image oriented
according to <link linkend="GtkMenuButton--direction"><type>“direction”</type></link> or the generic “open-menu-symbolic”
icon if the direction is not set.</para>
<para>The positioning of the popup is determined by the <link linkend="GtkMenuButton--direction"><type>“direction”</type></link>
property of the menu button.</para>
<para>For menus, the <link linkend="GtkWidget--halign"><type>“halign”</type></link> and <link linkend="GtkWidget--valign"><type>“valign”</type></link> properties of the
menu are also taken into account. For example, when the direction is
<link linkend="GTK-ARROW-DOWN:CAPS"><literal>GTK_ARROW_DOWN</literal></link> and the horizontal alignment is <link linkend="GTK-ALIGN-START:CAPS"><literal>GTK_ALIGN_START</literal></link>, the
menu will be positioned below the button, with the starting edge
(depending on the text direction) of the menu aligned with the starting
edge of the button. If there is not enough space below the button, the
menu is popped up above the button instead. If the alignment would move
part of the menu offscreen, it is “pushed in”.</para>
<refsect3><title>Direction = Down</title><itemizedlist>
<listitem>
<para>halign = start</para>
<para><inlinemediaobject><imageobject><imagedata fileref="down-start.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>halign = center</para>
<para><inlinemediaobject><imageobject><imagedata fileref="down-center.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>halign = end</para>
<para><inlinemediaobject><imageobject><imagedata fileref="down-end.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
</itemizedlist>
</refsect3>
<refsect3><title>Direction = Up</title><itemizedlist>
<listitem>
<para>halign = start</para>
<para><inlinemediaobject><imageobject><imagedata fileref="up-start.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>halign = center</para>
<para><inlinemediaobject><imageobject><imagedata fileref="up-center.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>halign = end</para>
<para><inlinemediaobject><imageobject><imagedata fileref="up-end.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
</itemizedlist>
</refsect3>
<refsect3><title>Direction = Left</title><itemizedlist>
<listitem>
<para>valign = start</para>
<para><inlinemediaobject><imageobject><imagedata fileref="left-start.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>valign = center</para>
<para><inlinemediaobject><imageobject><imagedata fileref="left-center.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>valign = end</para>
<para><inlinemediaobject><imageobject><imagedata fileref="left-end.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
</itemizedlist>
</refsect3>
<refsect3><title>Direction = Right</title><itemizedlist>
<listitem>
<para>valign = start</para>
<para><inlinemediaobject><imageobject><imagedata fileref="right-start.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>valign = center</para>
<para><inlinemediaobject><imageobject><imagedata fileref="right-center.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
<listitem>
<para>valign = end</para>
<para><inlinemediaobject><imageobject><imagedata fileref="right-end.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
</listitem>
</itemizedlist>
</refsect3>
<refsect2><title>CSS nodes</title><para>GtkMenuButton has a single CSS node with name button. To differentiate
it from a plain <link linkend="GtkButton"><type>GtkButton</type></link>, it gets the .popup style class.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkMenuButton.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-menu-button-new" role="function">
<title>gtk_menu_button_new&#160;()</title>
<indexterm zone="gtk-menu-button-new"><primary>gtk_menu_button_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_menu_button_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> widget with downwards-pointing
arrow as the only child. You can replace the child widget
with another <link linkend="GtkWidget"><type>GtkWidget</type></link> should you wish to.</para>
<refsect3 id="gtk-menu-button-new.returns" role="returns">
<title>Returns</title>
<para> The newly created <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> widget</para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-popover" role="function">
<title>gtk_menu_button_set_popover&#160;()</title>
<indexterm zone="gtk-menu-button-set-popover"><primary>gtk_menu_button_set_popover</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_popover (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                             <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *popover</parameter>);</programlisting>
<para>Sets the <link linkend="GtkPopover"><type>GtkPopover</type></link> that will be popped up when the <parameter>menu_button</parameter>
 is clicked,
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to dissociate any existing popover and disable the button.</para>
<para>If <link linkend="GtkMenuButton--menu-model"><type>“menu-model”</type></link> is set, the menu model is dissociated from the
<parameter>menu_button</parameter>
, and the property is set to <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<refsect3 id="gtk-menu-button-set-popover.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset and disable the button. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-popover" role="function">
<title>gtk_menu_button_get_popover&#160;()</title>
<indexterm zone="gtk-menu-button-get-popover"><primary>gtk_menu_button_get_popover</primary></indexterm>
<programlisting language="C"><link linkend="GtkPopover"><returnvalue>GtkPopover</returnvalue></link>&#160;*
gtk_menu_button_get_popover (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Returns the <link linkend="GtkPopover"><type>GtkPopover</type></link> that pops out of the button.
If the button is not using a <link linkend="GtkPopover"><type>GtkPopover</type></link>, this function
returns <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<refsect3 id="gtk-menu-button-get-popover.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-popover.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GtkPopover"><type>GtkPopover</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-menu-model" role="function">
<title>gtk_menu_button_set_menu_model&#160;()</title>
<indexterm zone="gtk-menu-button-set-menu-model"><primary>gtk_menu_button_set_menu_model</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_menu_model (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                                <parameter><link linkend="GMenuModel"><type>GMenuModel</type></link> *menu_model</parameter>);</programlisting>
<para>Sets the <link linkend="GMenuModel"><type>GMenuModel</type></link> from which the popup will be constructed,
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to dissociate any existing menu model and disable the button.</para>
<para>A <link linkend="GtkPopover"><type>GtkPopover</type></link> will be created from the menu model with <link linkend="gtk-popover-menu-new-from-model"><function>gtk_popover_menu_new_from_model()</function></link>.
Actions will be connected as documented for this function.</para>
<para>If <link linkend="GtkMenuButton--popover"><type>“popover”</type></link> is already set, it will be dissociated from the <parameter>menu_button</parameter>
,
and the property is set to <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<refsect3 id="gtk-menu-button-set-menu-model.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>menu_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GMenuModel"><type>GMenuModel</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset and disable the
button. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-menu-model" role="function">
<title>gtk_menu_button_get_menu_model&#160;()</title>
<indexterm zone="gtk-menu-button-get-menu-model"><primary>gtk_menu_button_get_menu_model</primary></indexterm>
<programlisting language="C"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
gtk_menu_button_get_menu_model (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Returns the <link linkend="GMenuModel"><type>GMenuModel</type></link> used to generate the popup.</para>
<refsect3 id="gtk-menu-button-get-menu-model.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-menu-model.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GMenuModel"><type>GMenuModel</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-direction" role="function">
<title>gtk_menu_button_set_direction&#160;()</title>
<indexterm zone="gtk-menu-button-set-direction"><primary>gtk_menu_button_set_direction</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_direction (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                               <parameter><link linkend="GtkArrowType"><type>GtkArrowType</type></link> direction</parameter>);</programlisting>
<para>Sets the direction in which the popup will be popped up, as
well as changing the arrow’s direction. The child will not
be changed to an arrow if it was customized.</para>
<para>If the does not fit in the available space in the given direction,
GTK+ will its best to keep it inside the screen and fully visible.</para>
<para>If you pass <link linkend="GTK-ARROW-NONE:CAPS"><literal>GTK_ARROW_NONE</literal></link> for a <parameter>direction</parameter>
, the popup will behave
as if you passed <link linkend="GTK-ARROW-DOWN:CAPS"><literal>GTK_ARROW_DOWN</literal></link> (although you won’t see any arrows).</para>
<refsect3 id="gtk-menu-button-set-direction.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>direction</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkArrowType"><type>GtkArrowType</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-direction" role="function">
<title>gtk_menu_button_get_direction&#160;()</title>
<indexterm zone="gtk-menu-button-get-direction"><primary>gtk_menu_button_get_direction</primary></indexterm>
<programlisting language="C"><link linkend="GtkArrowType"><returnvalue>GtkArrowType</returnvalue></link>
gtk_menu_button_get_direction (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Returns the direction the popup will be pointing at when popped up.</para>
<refsect3 id="gtk-menu-button-get-direction.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-direction.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GtkArrowType"><type>GtkArrowType</type></link> value</para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-align-widget" role="function">
<title>gtk_menu_button_set_align_widget&#160;()</title>
<indexterm zone="gtk-menu-button-set-align-widget"><primary>gtk_menu_button_set_align_widget</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_align_widget (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                                  <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *align_widget</parameter>);</programlisting>
<para>Sets the <link linkend="GtkWidget"><type>GtkWidget</type></link> to use to line the menu with when popped up.
Note that the <parameter>align_widget</parameter>
 must contain the <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> itself.</para>
<para>Setting it to <link linkend="NULL:CAPS"><literal>NULL</literal></link> means that the menu will be aligned with the
button itself.</para>
<para>Note that this property is only used with menus currently,
and not for popovers.</para>
<refsect3 id="gtk-menu-button-set-align-widget.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>align_widget</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkWidget"><type>GtkWidget</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-align-widget" role="function">
<title>gtk_menu_button_get_align_widget&#160;()</title>
<indexterm zone="gtk-menu-button-get-align-widget"><primary>gtk_menu_button_get_align_widget</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_menu_button_get_align_widget (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Returns the parent <link linkend="GtkWidget"><type>GtkWidget</type></link> to use to line up with menu.</para>
<refsect3 id="gtk-menu-button-get-align-widget.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-align-widget.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GtkWidget"><type>GtkWidget</type></link> value or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-icon-name" role="function">
<title>gtk_menu_button_set_icon_name&#160;()</title>
<indexterm zone="gtk-menu-button-set-icon-name"><primary>gtk_menu_button_set_icon_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_icon_name (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                               <parameter>const <link linkend="char"><type>char</type></link> *icon_name</parameter>);</programlisting>
<para>Sets the name of an icon to show inside the menu button.</para>
<refsect3 id="gtk-menu-button-set-icon-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>icon_name</para></entry>
<entry role="parameter_description"><para>the icon name</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-icon-name" role="function">
<title>gtk_menu_button_get_icon_name&#160;()</title>
<indexterm zone="gtk-menu-button-get-icon-name"><primary>gtk_menu_button_get_icon_name</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_menu_button_get_icon_name (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Gets the name of the icon shown in the button.</para>
<refsect3 id="gtk-menu-button-get-icon-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-icon-name.returns" role="returns">
<title>Returns</title>
<para> the name of the icon shown in the button</para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-label" role="function">
<title>gtk_menu_button_set_label&#160;()</title>
<indexterm zone="gtk-menu-button-set-label"><primary>gtk_menu_button_set_label</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_label (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                           <parameter>const <link linkend="char"><type>char</type></link> *label</parameter>);</programlisting>
<para>Sets the label to show inside the menu button.</para>
<refsect3 id="gtk-menu-button-set-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>label</para></entry>
<entry role="parameter_description"><para>the label</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-label" role="function">
<title>gtk_menu_button_get_label&#160;()</title>
<indexterm zone="gtk-menu-button-get-label"><primary>gtk_menu_button_get_label</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_menu_button_get_label (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Gets the label shown in the button</para>
<refsect3 id="gtk-menu-button-get-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-label.returns" role="returns">
<title>Returns</title>
<para> the label shown in the button</para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-has-frame" role="function">
<title>gtk_menu_button_set_has_frame&#160;()</title>
<indexterm zone="gtk-menu-button-set-has-frame"><primary>gtk_menu_button_set_has_frame</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_has_frame (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                               <parameter><link linkend="gboolean"><type>gboolean</type></link> has_frame</parameter>);</programlisting>
<para>Sets the style of the button.</para>
<refsect3 id="gtk-menu-button-set-has-frame.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>has_frame</para></entry>
<entry role="parameter_description"><para>whether the button should have a visible frame</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-has-frame" role="function">
<title>gtk_menu_button_get_has_frame&#160;()</title>
<indexterm zone="gtk-menu-button-get-has-frame"><primary>gtk_menu_button_get_has_frame</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_menu_button_get_has_frame (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Returns whether the button has a frame.</para>
<refsect3 id="gtk-menu-button-get-has-frame.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-has-frame.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the button has a frame</para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-get-use-underline" role="function">
<title>gtk_menu_button_get_use_underline&#160;()</title>
<indexterm zone="gtk-menu-button-get-use-underline"><primary>gtk_menu_button_get_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_menu_button_get_use_underline (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Returns whether an embedded underline in the text indicates a
mnemonic. See <link linkend="gtk-menu-button-set-use-underline"><function>gtk_menu_button_set_use_underline()</function></link>.</para>
<refsect3 id="gtk-menu-button-get-use-underline.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-menu-button-get-use-underline.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> whether an embedded underline in the text indicates
the mnemonic accelerator keys.</para>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-use-underline" role="function">
<title>gtk_menu_button_set_use_underline&#160;()</title>
<indexterm zone="gtk-menu-button-set-use-underline"><primary>gtk_menu_button_set_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_use_underline (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                                   <parameter><link linkend="gboolean"><type>gboolean</type></link> use_underline</parameter>);</programlisting>
<para>If true, an underline in the text indicates the next character should be
used for the mnemonic accelerator key.</para>
<refsect3 id="gtk-menu-button-set-use-underline.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>use_underline</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if underlines in the text indicate mnemonics</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-popup" role="function">
<title>gtk_menu_button_popup&#160;()</title>
<indexterm zone="gtk-menu-button-popup"><primary>gtk_menu_button_popup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_popup (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Pop up the menu.</para>
<refsect3 id="gtk-menu-button-popup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-popdown" role="function">
<title>gtk_menu_button_popdown&#160;()</title>
<indexterm zone="gtk-menu-button-popdown"><primary>gtk_menu_button_popdown</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_popdown (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>);</programlisting>
<para>Dismiss the menu.</para>
<refsect3 id="gtk-menu-button-popdown.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkMenuButtonCreatePopupFunc" role="function">
<title>GtkMenuButtonCreatePopupFunc&#160;()</title>
<indexterm zone="GtkMenuButtonCreatePopupFunc"><primary>GtkMenuButtonCreatePopupFunc</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GtkMenuButtonCreatePopupFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                                 <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>User-provided callback function to create a popup for <parameter>menu_button</parameter>
 on demand.
This function is called when the popup of <parameter>menu_button</parameter>
 is shown, but none has
been provided via <link linkend="gtk-menu-button-set-popover"><function>gtk_menu_button_set_popover()</function></link> or <link linkend="gtk-menu-button-set-menu-model"><function>gtk_menu_button_set_menu_model()</function></link>.</para>
<refsect3 id="GtkMenuButtonCreatePopupFunc.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-menu-button-set-create-popup-func" role="function">
<title>gtk_menu_button_set_create_popup_func&#160;()</title>
<indexterm zone="gtk-menu-button-set-create-popup-func"><primary>gtk_menu_button_set_create_popup_func</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_menu_button_set_create_popup_func (<parameter><link linkend="GtkMenuButton"><type>GtkMenuButton</type></link> *menu_button</parameter>,
                                       <parameter><link linkend="GtkMenuButtonCreatePopupFunc"><type>GtkMenuButtonCreatePopupFunc</type></link> func</parameter>,
                                       <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>,
                                       <parameter><link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> destroy_notify</parameter>);</programlisting>
<para>Sets <parameter>func</parameter>
 to be called when a popup is about to be shown.
<parameter>func</parameter>
 should use one of</para>
<itemizedlist>
<listitem><para>gtk_menu_button_set_popover()</para></listitem>
<listitem>
<para>gtk_menu_button_set_menu_model()</para>
</listitem>
</itemizedlist>
<para>to set a popup for <parameter>menu_button</parameter>
.
If <parameter>func</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, <parameter>menu_button</parameter>
 will always be sensitive.</para>
<para>Using this function will not reset the menu widget attached to <parameter>menu_button</parameter>
.
Instead, this can be done manually in <parameter>func</parameter>
.</para>
<refsect3 id="gtk-menu-button-set-create-popup-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>menu_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>func</para></entry>
<entry role="parameter_description"><para>function to call when a popuop is about to
be shown, but none has been provided via other means, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
to reset to default behavior. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>user data to pass to <parameter>func</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>destroy_notify</para></entry>
<entry role="parameter_description"><para>destroy notify for <parameter>user_data</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkMenuButton.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkMenuButton-struct" role="struct">
<title>GtkMenuButton</title>
<indexterm zone="GtkMenuButton-struct"><primary>GtkMenuButton</primary></indexterm>
<programlisting language="C">typedef struct _GtkMenuButton GtkMenuButton;</programlisting>
</refsect2>
<refsect2 id="GtkArrowType" role="enum">
<title>enum GtkArrowType</title>
<indexterm zone="GtkArrowType"><primary>GtkArrowType</primary></indexterm>
<para>Used to indicate the direction in which an arrow should point.</para>
<refsect3 id="GtkArrowType.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-ARROW-UP:CAPS">GTK_ARROW_UP</para></entry>
<entry role="enum_member_description"><para>Represents an upward pointing arrow.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-ARROW-DOWN:CAPS">GTK_ARROW_DOWN</para></entry>
<entry role="enum_member_description"><para>Represents a downward pointing arrow.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-ARROW-LEFT:CAPS">GTK_ARROW_LEFT</para></entry>
<entry role="enum_member_description"><para>Represents a left pointing arrow.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-ARROW-RIGHT:CAPS">GTK_ARROW_RIGHT</para></entry>
<entry role="enum_member_description"><para>Represents a right pointing arrow.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-ARROW-NONE:CAPS">GTK_ARROW_NONE</para></entry>
<entry role="enum_member_description"><para>No arrow.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkMenuButton.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkMenuButton--align-widget" role="property"><title>The <literal>“align-widget”</literal> property</title>
<indexterm zone="GtkMenuButton--align-widget"><primary>GtkMenuButton:align-widget</primary></indexterm>
<programlisting>  “align-widget”             <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The <link linkend="GtkWidget"><type>GtkWidget</type></link> to use to align the menu with.</para>
<para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkMenuButton--direction" role="property"><title>The <literal>“direction”</literal> property</title>
<indexterm zone="GtkMenuButton--direction"><primary>GtkMenuButton:direction</primary></indexterm>
<programlisting>  “direction”                <link linkend="GtkArrowType"><type>GtkArrowType</type></link></programlisting>
<para>The <link linkend="GtkArrowType"><type>GtkArrowType</type></link> representing the direction in which the
menu or popover will be popped out.</para>
<para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_ARROW_DOWN</para>
</refsect2>
<refsect2 id="GtkMenuButton--has-frame" role="property"><title>The <literal>“has-frame”</literal> property</title>
<indexterm zone="GtkMenuButton--has-frame"><primary>GtkMenuButton:has-frame</primary></indexterm>
<programlisting>  “has-frame”                <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the button has a frame.</para><para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkMenuButton--icon-name" role="property"><title>The <literal>“icon-name”</literal> property</title>
<indexterm zone="GtkMenuButton--icon-name"><primary>GtkMenuButton:icon-name</primary></indexterm>
<programlisting>  “icon-name”                <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The name of the icon used to automatically populate the button.</para><para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkMenuButton--label" role="property"><title>The <literal>“label”</literal> property</title>
<indexterm zone="GtkMenuButton--label"><primary>GtkMenuButton:label</primary></indexterm>
<programlisting>  “label”                    <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The label for the button.</para><para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkMenuButton--menu-model" role="property"><title>The <literal>“menu-model”</literal> property</title>
<indexterm zone="GtkMenuButton--menu-model"><primary>GtkMenuButton:menu-model</primary></indexterm>
<programlisting>  “menu-model”               <link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</programlisting>
<para>The <link linkend="GMenuModel"><type>GMenuModel</type></link> from which the popup will be created.</para>
<para>See <link linkend="gtk-menu-button-set-menu-model"><function>gtk_menu_button_set_menu_model()</function></link> for the interaction with the
<link linkend="GtkMenuButton--popup"><type>“popup”</type></link> property.</para>
<para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkMenuButton--popover" role="property"><title>The <literal>“popover”</literal> property</title>
<indexterm zone="GtkMenuButton--popover"><primary>GtkMenuButton:popover</primary></indexterm>
<programlisting>  “popover”                  <link linkend="GtkPopover"><type>GtkPopover</type></link>&#160;*</programlisting>
<para>The <link linkend="GtkPopover"><type>GtkPopover</type></link> that will be popped up when the button is clicked.</para>
<para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkMenuButton--use-underline" role="property"><title>The <literal>“use-underline”</literal> property</title>
<indexterm zone="GtkMenuButton--use-underline"><primary>GtkMenuButton:use-underline</primary></indexterm>
<programlisting>  “use-underline”            <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</para><para>Owner: GtkMenuButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>

</refentry>
