📄 gtknotebook.html
字号:
<td><p><span class="term"><em class="parameter"><code>menu_label</code></em> :</span></p></td><td> the widget to use as a label for the page-switch menu, if that is enabled. If <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, and <em class="parameter"><code>tab_label</code></em> is a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the menu label will be a newly created label with the same text as <em class="parameter"><code>tab_label</code></em>; If <em class="parameter"><code>tab_label</code></em> is not a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>, <em class="parameter"><code>menu_label</code></em> must be specified if the page-switch menu is to be used.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td> the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the index (starting from 0) of the insertedpage in the notebook</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4080797"></a><h3><a name="gtk-notebook-remove-page"></a>gtk_notebook_remove_page ()</h3><a class="indexterm" name="id4080810"></a><pre class="programlisting">void gtk_notebook_remove_page (<a class="link" href="GtkNotebook.html" title="GtkNotebook">GtkNotebook</a> *notebook, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> page_num);</pre><p>Removes a page from the notebook given its indexin the notebook.</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>notebook</code></em> :</span></p></td><td> a <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>page_num</code></em> :</span></p></td><td> the index of a notebook page, starting from 0. If -1, the last page will be removed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4080892"></a><h3><a name="gtk-notebook-current-page"></a>gtk_notebook_current_page</h3><a class="indexterm" name="id4080907"></a><pre class="programlisting">#define gtk_notebook_current_page gtk_notebook_get_current_page</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_notebook_current_page</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated compatibility macro. Use<a class="link" href="GtkNotebook.html#gtk-notebook-get-current-page"><code class="function">gtk_notebook_get_current_page()</code></a> instead.</p></div><hr><div class="refsect2" lang="en"><a name="id4080949"></a><h3><a name="gtk-notebook-page-num"></a>gtk_notebook_page_num ()</h3><a class="indexterm" name="id4080962"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gtk_notebook_page_num (<a class="link" href="GtkNotebook.html" title="GtkNotebook">GtkNotebook</a> *notebook, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child);</pre><p>Finds the index of the page which contains the given childwidget.</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>notebook</code></em> :</span></p></td><td> a <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the index of the page containing <em class="parameter"><code>child</code></em>, or -1 if <em class="parameter"><code>child</code></em> is not in the notebook.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4081073"></a><h3><a name="gtk-notebook-set-page"></a>gtk_notebook_set_page</h3><a class="indexterm" name="id4081088"></a><pre class="programlisting">#define gtk_notebook_set_page gtk_notebook_set_current_page</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_notebook_set_page</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated compatibility macro. Use<a class="link" href="GtkNotebook.html#gtk-notebook-set-current-page"><code class="function">gtk_notebook_set_current_page()</code></a> instead.</p></div><hr><div class="refsect2" lang="en"><a name="id4081130"></a><h3><a name="gtk-notebook-next-page"></a>gtk_notebook_next_page ()</h3><a class="indexterm" name="id4081143"></a><pre class="programlisting">void gtk_notebook_next_page (<a class="link" href="GtkNotebook.html" title="GtkNotebook">GtkNotebook</a> *notebook);</pre><p>Switches to the next page. Nothing happens if the current page isthe last page.</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>notebook</code></em> :</span></p></td><td> a <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4081202"></a><h3><a name="gtk-notebook-prev-page"></a>gtk_notebook_prev_page ()</h3><a class="indexterm" name="id4081215"></a><pre class="programlisting">void gtk_notebook_prev_page (<a class="link" href="GtkNotebook.html" title="GtkNotebook">GtkNotebook</a> *notebook);</pre><p>Switches to the previous page. Nothing happens if the current pageis the first page.</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>notebook</code></em> :</span></p></td><td> a <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4081274"></a><h3><a name="gtk-notebook-reorder-child"></a>gtk_notebook_reorder_child ()</h3><a class="indexterm" name="id4081288"></a><pre class="programlisting">void gtk_notebook_reorder_child (<a class="link" href="GtkNotebook.html" title="GtkNotebook">GtkNotebook</a> *notebook, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> position);</pre><p>Reorders the page containing <em class="parameter"><code>child</code></em>, so that it appears in position<em class="parameter"><code>position</code></em>. If <em class="parameter"><code>position</code></em> is greater than or equal to the number ofchildren in the list or negative, <em class="parameter"><code>child</code></em> will be moved to the endof the list.</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>notebook</code></em> :</span></p></td><td> a <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td><td> the child to move</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td> the new position, or -1 to move to the end</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4081416"></a><h3><a name="gtk-notebook-set-tab-pos"></a>gtk_notebook_set_tab_pos ()</h3><a class="indexterm" name="id4081429"></a><pre class="programlisting">void gtk_notebook_set_tab_pos (<a class="link" href="GtkNot
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -