TreeViewColumn sorting capabilities
- From: Matthias Kaeppler <nospam digitalraid com>
- To: gtkmm-list gnome org
- Subject: TreeViewColumn sorting capabilities
- Date: Mon, 21 Feb 2005 00:34:45 +0100
Hello,
I need to sort a view on a directory in several different ways, but I
want to assure that
1. Files and directories always appear separated
2. The sorting should be stable
As of now, I use std::partition to sort a vector holding
boost::filesystem::pathS such that all directories come first,
everything else after. I keep an iterator to the position of the first file.
Then, I use std::stable_sort to sort both ranges, the one with the
directories and the one with the files.
However, I don't actually need the sort order on this level, it would be
sufficient to only have a sorted view on it. Since I am using ListStore
to display the directory contents, I was wondering if the sorting
capabilities of this class are sufficient. (I have already experimented
a little, but the sorting mixed up directories and files).
I also don't really understand what all the functions are doing
(documentation is somewhat lacking). What do e.g.
1. set_sort_column
2. set_sort_column_id
do?
A short code example how to use these functions would be appreciated.
Thanks in advance.
--
Matthias Kaeppler
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]