GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

treemodelfilter.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2004 The GFC 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 GFC_GTK_TREE_MODEL_FILTER_HH 00025 #define GFC_GTK_TREE_MODEL_FILTER_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_GTK_TREE_MODEL_HH 00032 #include <gfc/gtk/treemodel.hh> 00033 #endif 00034 00035 #ifndef GFC_GTK_TREE_DND_HH 00036 #include <gfc/gtk/treednd.hh> 00037 #endif 00038 00039 #ifndef __GTK_TREE_MODEL_FILTER_H__ 00040 #include <gtk/gtktreemodelfilter.h> 00041 #endif 00042 00043 namespace GFC { 00044 00045 namespace G { 00046 class Value; 00047 } 00048 00049 namespace Gtk { 00050 00051 class TreeIter; 00052 class TreeModel; 00053 class TreePath; 00054 00068 00069 class TreeModelFilter : public G::Object, public TreeModel, public TreeDragSource 00070 { 00071 friend class G::Object; 00072 00073 TreeModelFilter(const TreeModelFilter&); 00074 TreeModelFilter& operator=(const TreeModelFilter&); 00075 00076 protected: 00079 00080 explicit TreeModelFilter(GtkTreeModelFilter *filter, bool owns_reference = true); 00087 00089 00090 public: 00091 typedef sigc::slot<bool, const TreeModel&, const TreeIter&> VisibleSlot; 00100 00101 typedef sigc::slot<void, const TreeModel&, const TreeIter&, G::Value&, int> ModifySlot; 00115 00118 00119 TreeModelFilter(TreeModel& child_model, const TreePath *root = 0); 00124 00125 virtual ~TreeModelFilter(); 00127 00131 00132 GtkTreeModelFilter* gtk_tree_model_filter() const; 00134 00135 operator GtkTreeModelFilter* () const; 00137 00138 TreeModel* get_model() const; 00141 00145 00146 void set_visible_func(const VisibleSlot& slot); 00152 00153 void set_modify_func(int n_columns, const GType types[], const ModifySlot& slot); 00163 00164 void set_visible_column(int column); 00171 00172 TreeIter convert_child_iter_to_iter(const TreeIter& child_iter); 00177 00178 TreeIter convert_iter_to_child_iter(const TreeIter& filter_iter); 00183 00184 Pointer<TreePath> convert_child_path_to_path(const TreePath& child_path); 00191 00192 Pointer<TreePath> convert_path_to_child_path(const TreePath& filter_path); 00199 00200 void refilter(); 00203 00204 void clear_cache(); 00209 00211 }; 00212 00213 } // namespace Gtk 00214 00215 } // namespace GFC 00216 00217 #include <gfc/gtk/inline/treemodelfilter.inl> 00218 00219 #endif // GFC_GTK_TREE_MODEL_FILTER_HH 00220

Generated on Tue Aug 24 00:34:32 2004 for GFC-UI by doxygen 1.3.8