file-system-model.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _HILDON_FMMM_FILE_SYSTEM_MODEL_H
00004 #define _HILDON_FMMM_FILE_SYSTEM_MODEL_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* $Id: date-editor.hg,v 1.10 2005/02/15 10:52:44 murrayc Exp $ */
00010 
00011 /* grid.h
00012  *
00013  * Copyright (C) 1998-2005 The gtkmm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gtkmm/treeiter.h>
00031 #include <gtkmm/treemodel.h>
00032 #include <glibmm/object.h>
00033 // We couldn't include it in treemodel.h, but doing it here makes it easier for people.
00034 #include <gtkmm/treepath.h>
00035 
00036 #include <hildon-widgets/hildon-file-system-common.h>
00037 //#include <gtk/gtkfilesystem.h> //TODO: Avoid including this, particularly as it is semi-private.
00038 
00039 #include <hildon-widgets/hildon-file-system-model.h> //TODO: Remove this when bug #182 is fixed.
00040 
00041 
00042 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00043 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00044 
00045 
00046 namespace Hildon
00047 { class FileSystemModel_Class; } // namespace Hildon
00048 namespace Hildon
00049 {
00050 
00056 class FileSystemModel 
00057 : public Glib::Object,
00058   public Gtk::TreeModel
00059 {
00060   
00061 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00062 
00063 public:
00064   typedef FileSystemModel CppObjectType;
00065   typedef FileSystemModel_Class CppClassType;
00066   typedef HildonFileSystemModel BaseObjectType;
00067   typedef HildonFileSystemModelClass BaseClassType;
00068 
00069 private:  friend class FileSystemModel_Class;
00070   static CppClassType filesystemmodel_class_;
00071 
00072 private:
00073   // noncopyable
00074   FileSystemModel(const FileSystemModel&);
00075   FileSystemModel& operator=(const FileSystemModel&);
00076 
00077 protected:
00078   explicit FileSystemModel(const Glib::ConstructParams& construct_params);
00079   explicit FileSystemModel(HildonFileSystemModel* castitem);
00080 
00081 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00082 
00083 public:
00084   virtual ~FileSystemModel();
00085 
00086 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00087   static GType get_type()      G_GNUC_CONST;
00088   static GType get_base_type() G_GNUC_CONST;
00089 #endif
00090 
00092   HildonFileSystemModel*       gobj()       { return reinterpret_cast<HildonFileSystemModel*>(gobject_); }
00093 
00095   const HildonFileSystemModel* gobj() const { return reinterpret_cast<HildonFileSystemModel*>(gobject_); }
00096 
00098   HildonFileSystemModel* gobj_copy();
00099 
00100 private:
00101 
00102   
00103 public:
00104   FileSystemModel();
00105    //TODO: Remove this when bug #182 is fixed.
00106 
00107   Gtk::TreeModel::iterator search_local_path(const Glib::ustring& path, bool recursive = true) const;
00108   Gtk::TreeModel::iterator search_local_path(const Glib::ustring& path, const Gtk::TreeModel::iterator& start_iter, bool recursive = true) const; ;
00109 
00110   Gtk::TreeModel::iterator search_uri(const Glib::ustring& uri, bool recursive = true) const;
00111   Gtk::TreeModel::iterator search_uri(const Glib::ustring& uri, const Gtk::TreeModel::iterator& start_iter, bool recursive = true) const;
00112   
00113 
00114   Gtk::TreeModel::iterator search_path(const GtkFilePath* path, bool recursive = true) const;
00115   Gtk::TreeModel::iterator search_path(const GtkFilePath* path, const Gtk::TreeModel::iterator& start_iter, bool recursive = true) const;
00116   
00117 
00118   Gtk::TreeModel::iterator load_local_path(const Glib::ustring& path);
00119   
00120 
00121   Gtk::TreeModel::iterator load_uri(const Glib::ustring& uri);
00122   
00123 
00124   Gtk::TreeModel::iterator load_path(const GtkFilePath* path);
00125   
00126 
00138   Glib::ustring new_item(const Gtk::TreeModel::iterator& parent, const Glib::ustring& stub_name, const Glib::ustring& extension);
00139 
00140   
00151 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00152   Glib::ustring autoname_uri(const Glib::ustring& uri);
00153 #else
00154   Glib::ustring autoname_uri(const Glib::ustring& uri, std::auto_ptr<Glib::Error>& error);
00155 #endif //GLIBMM_EXCEPTIONS_ENABLED
00156 
00157 
00158 //TODO: output?
00159   
00167   void iter_available(const Gtk::TreeModel::iterator& iter, bool available);
00168 
00169   
00173   void reset_available();
00174 
00175 
00176 public:
00177 
00178 public:
00179   //C++ methods used to invoke GTK+ virtual functions:
00180 #ifdef GLIBMM_VFUNCS_ENABLED
00181 #endif //GLIBMM_VFUNCS_ENABLED
00182 
00183 protected:
00184   //GTK+ Virtual Functions (override these to change behaviour):
00185 #ifdef GLIBMM_VFUNCS_ENABLED
00186 #endif //GLIBMM_VFUNCS_ENABLED
00187 
00188   //Default Signal Handlers::
00189 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00190 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00191 
00192 
00193 };
00194 
00195 } // namespace Hildon
00196 
00197 
00198 namespace Glib
00199 {
00205   Glib::RefPtr<Hildon::FileSystemModel> wrap(HildonFileSystemModel* object, bool take_copy = false);
00206 }
00207 
00208 
00209 #endif /* _HILDON_FMMM_FILE_SYSTEM_MODEL_H */
00210 

Generated on Wed Nov 8 17:18:56 2006 for hildon-fmmm by  doxygen 1.4.6