📄 gtkmenubar.html
字号:
<td>the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3894094"></a><h3><a name="gtk-menu-bar-insert"></a>gtk_menu_bar_insert()</h3><a class="indexterm" name="id3894111"></a><pre class="programlisting">#define gtk_menu_bar_insert(menu,child,pos) gtk_menu_shell_insert ((GtkMenuShell *)(menu),(child),(pos))</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_menu_bar_insert</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkMenuShell.html#gtk-menu-shell-insert"><code class="function">gtk_menu_shell_insert()</code></a> instead.</p></div><p>Adds a new <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the GtkMenuBar at the position defined by <em class="parameter"><code>position</code></em></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td><td>a <a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td><td>the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add</td></tr><tr><td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td><td>the position in the item list where the <em class="parameter"><code>child</code></em> is added.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3894232"></a><h3><a name="GtkPackDirection"></a>enum GtkPackDirection</h3><a class="indexterm" name="id3894246"></a><pre class="programlisting">typedef enum{ GTK_PACK_DIRECTION_LTR, GTK_PACK_DIRECTION_RTL, GTK_PACK_DIRECTION_TTB, GTK_PACK_DIRECTION_BTT} GtkPackDirection;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3894263"></a><h3><a name="gtk-menu-bar-set-pack-direction"></a>gtk_menu_bar_set_pack_direction ()</h3><a class="indexterm" name="id3894279"></a><pre class="programlisting">void gtk_menu_bar_set_pack_direction (<a class="link" href="GtkMenuBar.html" title="GtkMenuBar">GtkMenuBar</a> *menubar, <a class="link" href="GtkMenuBar.html#GtkPackDirection">GtkPackDirection</a> pack_dir);</pre><p>Sets how items should be packed inside a menubar.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>menubar</code></em> :</span></p></td><td> a <a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>pack_dir</code></em> :</span></p></td><td> a new <a class="link" href="GtkMenuBar.html#GtkPackDirection"><span class="type">GtkPackDirection</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.8</p></div><hr><div class="refsect2" lang="en"><a name="id3894374"></a><h3><a name="gtk-menu-bar-get-pack-direction"></a>gtk_menu_bar_get_pack_direction ()</h3><a class="indexterm" name="id3894390"></a><pre class="programlisting"><a class="link" href="GtkMenuBar.html#GtkPackDirection">GtkPackDirection</a> gtk_menu_bar_get_pack_direction (<a class="link" href="GtkMenuBar.html" title="GtkMenuBar">GtkMenuBar</a> *menubar);</pre><p>Retrieves the current pack direction of the menubar. See<a class="link" href="GtkMenuBar.html#gtk-menu-bar-set-pack-direction"><code class="function">gtk_menu_bar_set_pack_direction()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>menubar</code></em> :</span></p></td><td> a <a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the pack direction</td></tr></tbody></table></div><p class="since">Since 2.8</p></div><hr><div class="refsect2" lang="en"><a name="id3894477"></a><h3><a name="gtk-menu-bar-set-child-pack-direction"></a>gtk_menu_bar_set_child_pack_direction ()</h3><a class="indexterm" name="id3894493"></a><pre class="programlisting">void gtk_menu_bar_set_child_pack_direction (<a class="link" href="GtkMenuBar.html" title="GtkMenuBar">GtkMenuBar</a> *menubar, <a class="link" href="GtkMenuBar.html#GtkPackDirection">GtkPackDirection</a> child_pack_dir);</pre><p>Sets how widgets should be packed inside the children of a menubar.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>menubar</code></em> :</span></p></td><td> a <a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>child_pack_dir</code></em> :</span></p></td><td> a new <a class="link" href="GtkMenuBar.html#GtkPackDirection"><span class="type">GtkPackDirection</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.8</p></div><hr><div class="refsect2" lang="en"><a name="id3894590"></a><h3><a name="gtk-menu-bar-get-child-pack-direction"></a>gtk_menu_bar_get_child_pack_direction ()</h3><a class="indexterm" name="id3894606"></a><pre class="programlisting"><a class="link" href="GtkMenuBar.html#GtkPackDirection">GtkPackDirection</a> gtk_menu_bar_get_child_pack_direction (<a class="link" href="GtkMenuBar.html" title="GtkMenuBar">GtkMenuBar</a> *menubar);</pre><p>Retrieves the current child pack direction of the menubar. See<a class="link" href="GtkMenuBar.html#gtk-menu-bar-set-child-pack-direction"><code class="function">gtk_menu_bar_set_child_pack_direction()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>menubar</code></em> :</span></p></td><td> a <a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the child pack direction</td></tr></tbody></table></div><p class="since">Since 2.8</p></div></div><div class="refsect1" lang="en"><a name="id3894696"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3894706"></a><h3><a name="GtkMenuBar--child-pack-direction"></a>The <code class="literal">"child-pack-direction"</code> property</h3><a class="indexterm" name="id3894724"></a><pre class="programlisting"> "child-pack-direction" <a class="link" href="GtkMenuBar.html#GtkPackDirection">GtkPackDirection</a> : Read / Write</pre><p>The pack direction of the menubar. It determines howthe widgets contained in child menuitems are arranged.</p><p></p><p>Default value: GTK_PACK_DIRECTION_LTR</p><p>Since 2.8</p></div><hr><div class="refsect2" lang="en"><a name="id3894761"></a><h3><a name="GtkMenuBar--pack-direction"></a>The <code class="literal">"pack-direction"</code> property</h3><a class="indexterm" name="id3894778"></a><pre class="programlisting"> "pack-direction" <a class="link" href="GtkMenuBar.html#GtkPackDirection">GtkPackDirection</a> : Read / Write</pre><p>The pack direction of the menubar. It determines howmenuitems are arranged in the menubar.</p><p></p><p>Default value: GTK_PACK_DIRECTION_LTR</p><p>Since 2.8</p></div></div><div class="refsect1" lang="en"><a name="id3894816"></a><h2>Style Property Details</h2><div class="refsect2" lang="en"><a name="id3894827"></a><h3><a name="GtkMenuBar--internal-padding"></a>The <code class="literal">"internal-padding"</code> style property</h3><a class="indexterm" name="id3894844"></a><pre class="programlisting"> "internal-padding" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> : Read</pre><p>Amount of border space between the menubar shadow and the menu items.</p><p>Allowed values: >= 0</p><p>Default value: 1</p></div><hr><div class="refsect2" lang="en"><a name="id3894876"></a><h3><a name="GtkMenuBar--shadow-type"></a>The <code class="literal">"shadow-type"</code> style property</h3><a class="indexterm" name="id3894892"></a><pre class="programlisting"> "shadow-type" <a class="link" href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> : Read</pre><p>Style of bevel around the menubar.</p><p>Default value: GTK_SHADOW_OUT</p></div></div><div class="refsect1" lang="en"><a name="id3894920"></a><h2>See Also</h2><p><a class="link" href="GtkMenuShell.html" title="GtkMenuShell"><span class="type">GtkMenuShell</span></a>, <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>, <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a></p></div><div class="refsect1" lang="en"><a name="id3894953"></a><div class="refsect2" lang="en"><a name="id3894954"></a></div><hr><div class="refsect2" lang="en"><a name="id3894955"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -