<?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="GtkTreeListRow">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTreeListRow.top_of_page">GtkTreeListRow</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkTreeListRow</refname>
<refpurpose>A  row in a GtkTreeListModel</refpurpose>
</refnamediv>

<refsect1 id="GtkTreeListRow.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="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-get-item">gtk_tree_list_row_get_item</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-tree-list-row-set-expanded">gtk_tree_list_row_set_expanded</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-tree-list-row-get-expanded">gtk_tree_list_row_get_expanded</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-tree-list-row-is-expandable">gtk_tree_list_row_is_expandable</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-get-position">gtk_tree_list_row_get_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-get-depth">gtk_tree_list_row_get_depth</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-get-children">gtk_tree_list_row_get_children</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeListRow"><returnvalue>GtkTreeListRow</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-get-parent">gtk_tree_list_row_get_parent</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeListRow"><returnvalue>GtkTreeListRow</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-get-child-row">gtk_tree_list_row_get_child_row</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>

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

<refsect1 id="GtkTreeListRow.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> is the object used by <link linkend="GtkTreeListModel"><type>GtkTreeListModel</type></link> to
represent items. It allows navigating the model as a tree and
modify the state of rows.</para>
<para><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> instances are created by a <link linkend="GtkTreeListModel"><type>GtkTreeListModel</type></link> only
when the <link linkend="GtkTreeListModel--passthrough"><type>“passthrough”</type></link> property is not set.</para>
<para>There are various support objects that can make use of <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link>
objects, such as the <link linkend="GtkTreeExpander"><type>GtkTreeExpander</type></link> widget that allows displaying
an icon to expand or collapse a row or <link linkend="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link> that makes
it possible to sort trees properly.</para>

</refsect1>
<refsect1 id="GtkTreeListRow.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-tree-list-row-get-item" role="function">
<title>gtk_tree_list_row_get_item&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-item"><primary>gtk_tree_list_row_get_item</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gtk_tree_list_row_get_item (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>Gets the item corresponding to this row,</para>
<para>The value returned by this function never changes until the
row is destroyed.</para>
<refsect3 id="gtk-tree-list-row-get-item.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-item.returns" role="returns">
<title>Returns</title>
<para>The item of this row
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> when the row was destroyed. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>type</acronym> GObject][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-set-expanded" role="function">
<title>gtk_tree_list_row_set_expanded&#160;()</title>
<indexterm zone="gtk-tree-list-row-set-expanded"><primary>gtk_tree_list_row_set_expanded</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_list_row_set_expanded (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> expanded</parameter>);</programlisting>
<para>Expands or collapses a row.</para>
<para>If a row is expanded, the model of calling the 
<link linkend="GtkTreeListModelCreateModelFunc"><type>GtkTreeListModelCreateModelFunc</type></link> for the row's item will
be inserted after this row. If a row is collapsed, those
items will be removed from the model.</para>
<para>If the row is not expandable, this function does nothing.</para>
<refsect3 id="gtk-tree-list-row-set-expanded.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>expanded</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the row should be expanded</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-get-expanded" role="function">
<title>gtk_tree_list_row_get_expanded&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-expanded"><primary>gtk_tree_list_row_get_expanded</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_list_row_get_expanded (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>Gets if a row is currently expanded.</para>
<refsect3 id="gtk-tree-list-row-get-expanded.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-expanded.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the row is expanded</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-is-expandable" role="function">
<title>gtk_tree_list_row_is_expandable&#160;()</title>
<indexterm zone="gtk-tree-list-row-is-expandable"><primary>gtk_tree_list_row_is_expandable</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_list_row_is_expandable (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>Checks if a row can be expanded. This does not mean that the
row is actually expanded, this can be checked with
<link linkend="gtk-tree-list-row-get-expanded"><function>gtk_tree_list_row_get_expanded()</function></link></para>
<para>If a row is expandable never changes until the row is destroyed.</para>
<refsect3 id="gtk-tree-list-row-is-expandable.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-is-expandable.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the row is expandable</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-get-position" role="function">
<title>gtk_tree_list_row_get_position&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-position"><primary>gtk_tree_list_row_get_position</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_tree_list_row_get_position (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>Returns the position in the <link linkend="GtkTreeListModel"><type>GtkTreeListModel</type></link> that <parameter>self</parameter>
 occupies
at the moment.</para>
<refsect3 id="gtk-tree-list-row-get-position.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-position.returns" role="returns">
<title>Returns</title>
<para> The position in the model</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-get-depth" role="function">
<title>gtk_tree_list_row_get_depth&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-depth"><primary>gtk_tree_list_row_get_depth</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_tree_list_row_get_depth (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>Gets the depth of this row. Rows that correspond to items in
the root model have a depth of zero, rows corresponding to items
of models of direct children of the root model have a depth of
1 and so on.</para>
<para>The depth of a row never changes until the row is destroyed.</para>
<refsect3 id="gtk-tree-list-row-get-depth.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-depth.returns" role="returns">
<title>Returns</title>
<para> The depth of this row</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-get-children" role="function">
<title>gtk_tree_list_row_get_children&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-children"><primary>gtk_tree_list_row_get_children</primary></indexterm>
<programlisting language="C"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
gtk_tree_list_row_get_children (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>If the row is expanded, gets the model holding the children of <parameter>self</parameter>
.</para>
<para>This model is the model created by the <link linkend="GtkTreeListModelCreateModelFunc"><type>GtkTreeListModelCreateModelFunc</type></link>
and contains the original items, no matter what value
<link linkend="GtkTreeListModel--passthrough"><type>“passthrough”</type></link> is set to.</para>
<refsect3 id="gtk-tree-list-row-get-children.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-children.returns" role="returns">
<title>Returns</title>
<para>The model containing the children. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-get-parent" role="function">
<title>gtk_tree_list_row_get_parent&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-parent"><primary>gtk_tree_list_row_get_parent</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeListRow"><returnvalue>GtkTreeListRow</returnvalue></link>&#160;*
gtk_tree_list_row_get_parent (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>);</programlisting>
<para>Gets the row representing the parent for <parameter>self</parameter>
. That is the row that would
need to be collapsed to make this row disappear.</para>
<para>If <parameter>self</parameter>
 is a row corresponding to the root model, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.</para>
<para>The value returned by this function never changes until the
row is destroyed.</para>
<refsect3 id="gtk-tree-list-row-get-parent.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-parent.returns" role="returns">
<title>Returns</title>
<para>The parent of <parameter>self</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-get-child-row" role="function">
<title>gtk_tree_list_row_get_child_row&#160;()</title>
<indexterm zone="gtk-tree-list-row-get-child-row"><primary>gtk_tree_list_row_get_child_row</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeListRow"><returnvalue>GtkTreeListRow</returnvalue></link>&#160;*
gtk_tree_list_row_get_child_row (<parameter><link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link> *self</parameter>,
                                 <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>If <parameter>self</parameter>
 is not expanded or <parameter>position</parameter>
 is greater than the number of
children, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.</para>
<refsect3 id="gtk-tree-list-row-get-child-row.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeListRow"><type>GtkTreeListRow</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position of the child to get</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-get-child-row.returns" role="returns">
<title>Returns</title>
<para>the child in <parameter>position</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTreeListRow.see-also">
<title>See Also</title>
<para><link linkend="GtkTreeListModel"><type>GtkTreeListModel</type></link></para>

</refsect1>

</refentry>
