📄 gtktree.html
字号:
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4594840"></a><h3><a name="GTK-TREE-ROOT-TREE:CAPS"></a>GTK_TREE_ROOT_TREE()</h3><a class="indexterm" name="id4594856"></a><pre class="programlisting">#define GTK_TREE_ROOT_TREE(obj) (GTK_TREE(obj)->root_tree ? GTK_TREE(obj)->root_tree : GTK_TREE(obj))</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">GTK_TREE_ROOT_TREE</code> is deprecated and should not be used in newly-written code.</p></div><p>A macro that returns the root tree of <em class="parameter"><code>obj</code></em>.</p><p>If <em class="parameter"><code>obj</code></em> is already a root tree, <em class="parameter"><code>obj</code></em> is cast to <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a> and returned.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td><td>A pointer to the <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>. <em class="parameter"><code>obj</code></em> will accept any pointer, but if the pointer does not point to a <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>, the results are undefined.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4594958"></a><h3><a name="GTK-TREE-SELECTION-OLD:CAPS"></a>GTK_TREE_SELECTION_OLD()</h3><a class="indexterm" name="id4594974"></a><pre class="programlisting">#define GTK_TREE_SELECTION_OLD(obj) (GTK_TREE_ROOT_TREE(obj)->selection)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">GTK_TREE_SELECTION_OLD</code> is deprecated and should not be used in newly-written code.</p></div><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td><td></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4595021"></a><h3><a name="GtkTreeViewMode"></a>enum GtkTreeViewMode</h3><a class="indexterm" name="id4595037"></a><pre class="programlisting">typedef enum { GTK_TREE_VIEW_LINE, /* default view mode */ GTK_TREE_VIEW_ITEM} GtkTreeViewMode;</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">GtkTreeViewMode</code> is deprecated and should not be used in newly-written code.</p></div><p></p></div><hr><div class="refsect2" lang="en"><a name="id4595065"></a><h3><a name="gtk-tree-new"></a>gtk_tree_new ()</h3><a class="indexterm" name="id4595080"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_tree_new (void);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_tree_new</code> is deprecated and should not be used in newly-written code.</p></div><p>Creates a new <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A pointer to the newly allocated widget.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4595138"></a><h3><a name="gtk-tree-append"></a>gtk_tree_append ()</h3><a class="indexterm" name="id4595153"></a><pre class="programlisting">void gtk_tree_append (<a class="link" href="GtkTree.html" title="GtkTree">GtkTree</a> *tree, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *tree_item);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_tree_append</code> is deprecated and should not be used in newly-written code.</p></div><p>Adds the <a class="link" href="GtkTreeItem.html" title="GtkTreeItem"><span class="type">GtkTreeItem</span></a> in <em class="parameter"><code>tree_item</code></em> to the end of the items in <em class="parameter"><code>tree</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>tree</code></em> :</span></p></td><td>A pointer to a <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tree_item</code></em> :</span></p></td><td>A pointer to the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that is to be appended to the tree.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4595271"></a><h3><a name="gtk-tree-prepend"></a>gtk_tree_prepend ()</h3><a class="indexterm" name="id4595286"></a><pre class="programlisting">void gtk_tree_prepend (<a class="link" href="GtkTree.html" title="GtkTree">GtkTree</a> *tree, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *tree_item);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_tree_prepend</code> is deprecated and should not be used in newly-written code.</p></div><p>Adds the <a class="link" href="GtkTreeItem.html" title="GtkTreeItem"><span class="type">GtkTreeItem</span></a> in <em class="parameter"><code>tree_item</code></em> to the start of the items in <em class="parameter"><code>tree</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>tree</code></em> :</span></p></td><td>A pointer to a <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tree_item</code></em> :</span></p></td><td>A pointer to the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that is to be prepended to the tree.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4595403"></a><h3><a name="gtk-tree-insert"></a>gtk_tree_insert ()</h3><a class="indexterm" name="id4595419"></a><pre class="programlisting">void gtk_tree_insert (<a class="link" href="GtkTree.html" title="GtkTree">GtkTree</a> *tree, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *tree_item, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> position);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_tree_insert</code> is deprecated and should not be used in newly-written code.</p></div><p>Adds the <a class="link" href="GtkTreeItem.html" title="GtkTreeItem"><span class="type">GtkTreeItem</span></a> in <em class="parameter"><code>tree_item</code></em> to the list of items in <em class="parameter"><code>tree</code></em> at the position indicated 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>tree</code></em> :</span></p></td><td>A pointer to a <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tree_item</code></em> :</span></p></td><td>A pointer to the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that is to be added to the tree.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td>A <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> that indicates the position in the tree, that the <em class="parameter"><code>tree_item</code></em> is to be added at.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4595579"></a><h3><a name="gtk-tree-remove-items"></a>gtk_tree_remove_items ()</h3><a class="indexterm" name="id4595594"></a><pre class="programlisting">void gtk_tree_remove_items (<a class="link" href="GtkTree.html" title="GtkTree">GtkTree</a> *tree, <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a> *items);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_tree_remove_items</code> is deprecated and should not be used in newly-written code.</p></div><p>Removes a list of items from the <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a> in <em class="parameter"><code>tree</code></em>.</p><p>If only one item is to be removed from the <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>, <a class="link" href="GtkContainer.html#gtk-container-remove"><code class="function">gtk_container_remove()</code></a> can be used instead.</p><p>Removing an item from a <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a> dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> before removing it.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>tree</code></em> :</span></p></td><td>A pointer to a <a class="link" href="GtkTree.html" title="GtkTree"><span class="type">GtkTree</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>items</code></em> :</span></p></td><td>A pointer to a <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> that contains the items to be removed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4595754"></a><h3><a name="gtk-tree-clear-items"></a>gtk_tree_clear_items ()</h3><a class="indexterm" name="id4595770"></a><pre class="programlisting">void gtk_tree_clear_items (<a class="link" href="GtkTree.html" title="GtkTree">GtkTree</a> *tree, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> start,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -