<?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="GtkTreeListRowSorter">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTreeListRowSorter.top_of_page">GtkTreeListRowSorter</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkTreeListRowSorter</refname>
<refpurpose>Sort trees by levels</refpurpose>
</refnamediv>

<refsect1 id="GtkTreeListRowSorter.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="GtkTreeListRowSorter"><returnvalue>GtkTreeListRowSorter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-sorter-new">gtk_tree_list_row_sorter_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkSorter"><returnvalue>GtkSorter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-list-row-sorter-get-sorter">gtk_tree_list_row_sorter_get_sorter</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-sorter-set-sorter">gtk_tree_list_row_sorter_set_sorter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeListRowSorter.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="GtkSorter"><type>GtkSorter</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkTreeListRowSorter--sorter">sorter</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeListRowSorter.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="GtkTreeListRowSorter-struct">GtkTreeListRowSorter</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeListRowSorter.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="GtkSorter">GtkSorter</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkTreeListRowSorter
</screen>
</refsect1>

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

<refsect1 id="GtkTreeListRowSorter.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link> is a special-purpose sorter that will apply a given
sorter to the levels in a tree, while respecting the tree structure.</para>
<para>Here is an example for setting up a column view with a tree model and
a GtkTreeListSorter:</para>
<informalexample><programlisting role="example"><![CDATA[
column_sorter = gtk_column_view_get_sorter (view);
sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
sort_model = gtk_sort_list_model_new (tree_model, sorter);
selection = gtk_single_selection_new (sort_model);
gtk_column_view_set_model (view, G_LIST_MODEL (selection));
]]></programlisting></informalexample>
<para></para>

</refsect1>
<refsect1 id="GtkTreeListRowSorter.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-tree-list-row-sorter-new" role="function">
<title>gtk_tree_list_row_sorter_new&#160;()</title>
<indexterm zone="gtk-tree-list-row-sorter-new"><primary>gtk_tree_list_row_sorter_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeListRowSorter"><returnvalue>GtkTreeListRowSorter</returnvalue></link>&#160;*
gtk_tree_list_row_sorter_new (<parameter><link linkend="GtkSorter"><type>GtkSorter</type></link> *sorter</parameter>);</programlisting>
<para>Create a special-purpose sorter that applies the sorting
of <parameter>sorter</parameter>
 to the levels of a <link linkend="GtkTreeListModel"><type>GtkTreeListModel</type></link>.</para>
<para>Note that this sorter relies on <link linkend="GtkTreeListModel--passthrough"><type>“passthrough”</type></link>
being <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> as it can only sort <link linkend="GtkTreeListRows"><type>GtkTreeListRows</type></link>.</para>
<refsect3 id="gtk-tree-list-row-sorter-new.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>sorter</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSorter"><type>GtkSorter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-sorter-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-sorter-get-sorter" role="function">
<title>gtk_tree_list_row_sorter_get_sorter&#160;()</title>
<indexterm zone="gtk-tree-list-row-sorter-get-sorter"><primary>gtk_tree_list_row_sorter_get_sorter</primary></indexterm>
<programlisting language="C"><link linkend="GtkSorter"><returnvalue>GtkSorter</returnvalue></link>&#160;*
gtk_tree_list_row_sorter_get_sorter (<parameter><link linkend="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link> *self</parameter>);</programlisting>
<para>Returns the sorter used by <parameter>self</parameter>
.</para>
<refsect3 id="gtk-tree-list-row-sorter-get-sorter.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="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-list-row-sorter-get-sorter.returns" role="returns">
<title>Returns</title>
<para>the sorter used. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-list-row-sorter-set-sorter" role="function">
<title>gtk_tree_list_row_sorter_set_sorter&#160;()</title>
<indexterm zone="gtk-tree-list-row-sorter-set-sorter"><primary>gtk_tree_list_row_sorter_set_sorter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_list_row_sorter_set_sorter (<parameter><link linkend="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link> *self</parameter>,
                                     <parameter><link linkend="GtkSorter"><type>GtkSorter</type></link> *sorter</parameter>);</programlisting>
<para>Sets the sorter to use for items with the same parent.</para>
<para>This sorter will be passed the <link linkend="GtkTreeListRow--item"><type>“item”</type></link> of the tree
list rows passed to <parameter>self</parameter>
.</para>
<refsect3 id="gtk-tree-list-row-sorter-set-sorter.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="GtkTreeListRowSorter"><type>GtkTreeListRowSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sorter</para></entry>
<entry role="parameter_description"><para>The sorter to use, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTreeListRowSorter.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkTreeListRowSorter-struct" role="struct">
<title>GtkTreeListRowSorter</title>
<indexterm zone="GtkTreeListRowSorter-struct"><primary>GtkTreeListRowSorter</primary></indexterm>
<programlisting language="C">typedef struct _GtkTreeListRowSorter GtkTreeListRowSorter;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkTreeListRowSorter.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkTreeListRowSorter--sorter" role="property"><title>The <literal>“sorter”</literal> property</title>
<indexterm zone="GtkTreeListRowSorter--sorter"><primary>GtkTreeListRowSorter:sorter</primary></indexterm>
<programlisting>  “sorter”                   <link linkend="GtkSorter"><type>GtkSorter</type></link>&#160;*</programlisting>
<para>The underlying sorter</para>
<para>Owner: GtkTreeListRowSorter</para>
<para>Flags: Read / Write</para>
</refsect2>

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

</refsect1>

</refentry>
