Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# treemodelsort.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002-2003 The Inti Development Team.
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  */
    00018
    00023
    00024 #ifndef INTI_GTK_TREE_MODEL_SORT_H
    00025 #define INTI_GTK_TREE_MODEL_SORT_H
    00026
    00027 #ifndef INTI_G_OBJECT_H
    00028 #include <inti/glib/object.h>
    00029 #endif
    00030
    00031 #ifndef INTI_GTK_TREE_MODEL_H
    00032 #include <inti/gtk/treemodel.h>
    00033 #endif
    00034
    00035 #ifndef INTI_GTK_TREE_SORTABLE_H
    00036 #include <inti/gtk/treesortable.h>
    00037 #endif
    00038
    00039 #ifndef __GTK_TREE_MODEL_SORT_H__
    00040 #include <gtk/gtktreemodelsort.h>
    00041 #endif
    00042
    00043 namespace Inti {
    00044
    00045 namespace Gtk {
    00046
    00047 class TreeModelSortClass;
    00048
    00053
    00054 class TreeModelSort :  public G::Object, public TreeModel, public TreeSortable
    00055 {
    00056         friend class G::Object;
    00057         friend class TreeModelSortClass;
    00058
    00059         TreeModelSort(const TreeModelSort&);
    00060         TreeModelSort& operator=(const TreeModelSort&);
    00061
    00062 protected:
    00065
    00066         explicit TreeModelSort(GtkTreeModelSort *tree_model, bool reference = true);
    00073
    00075 //  Properties
    00076
    00077         typedef G::Property<TreeModel*, G::Object*> ModelPropertyType;
    00078         typedef G::PropertyProxy<G::Object, ModelPropertyType> ModelPropertyProxy;
    00079         static const ModelPropertyType model_property;
    00080
    00081 public:
    00084
    00085         TreeModelSort(TreeModel& child_model);
    00088
    00089         virtual ~TreeModelSort();
    00091
    00095
    00096         GtkTreeModelSort* gtk_tree_model_sort() const { return (GtkTreeModelSort*)instance; }
    00098
    00099         GtkTreeModelSortClass* gtk_tree_model_sort_class() const;
    00101
    00102         operator GtkTreeModelSort* () const;
    00104
    00105         TreeModel* get_model() const;
    00108
    00109         bool iter_is_valid(const TreeIter& iter) const;
    00115
    00119
    00120         Pointer<TreePath> convert_child_path_to_path(const TreePath& child_path);
    00128
    00129         TreeIter convert_child_iter_to_iter(const TreeIter& child_iter);
    00134
    00135         Pointer<TreePath> convert_path_to_child_path(const TreePath& sorted_path);
    00143
    00144         TreeIter convert_iter_to_child_iter(const TreeIter& sorted_iter);
    00149
    00150         void reset_default_sort_func();
    00154
    00155         void clear_cache();
    00161
    00165
    00166         const ModelPropertyProxy prop_model()
    00167         {
    00168                 return ModelPropertyProxy(this, &model_property);
    00169         }
    00171
    00173 };
    00174
    00175
    00176 } // namespace Gtk
    00177
    00178 } // namespace Inti
    00179
    00180 #endif // INTI_GTK_TREE_MODEL_SORT_H
    00181

Main Page - Footer