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

gnomefiletypes.h

Go to the documentation of this file.
00001 
00002 // Name:        gnomefiletypes.h
00003 // Author:      Joe Yates
00004 // Purpose:     Gnome file type information interface
00005 // Created:     2004-11-25
00006 // Copyright:   (c) Joe Yates
00007 // License:     BSD license (see the file 'LICENSE.txt')
00009 
00010 #ifndef __gnomefiletypes_h__
00011 #define __gnomefiletypes_h__
00012 
00013 #include "wx/defs.h"
00014 #include "wx/string.h"
00015 #include "wx/filetypes.h"
00016 #include <wx/filename.h>
00017 #include <wx/gtk/gnome/gnomevfs.h>
00018 #include <wx/gtk/gtk.h>
00019 
00020 class wxGnomeFileTypes : public wxFileTypesImpl
00021   {
00022   public:
00023     wxGnomeFileTypes();
00024     virtual ~wxGnomeFileTypes();
00025 
00026     bool              IsLoaded() const;
00027     wxString          GetFileType(const wxString& sFileURL) const;
00028     wxFileType2       LoadFileType(const wxString& sFileType) const;
00029     bool              SaveFileType(const wxFileType2& fti) const;
00030   
00031     wxArrayString     GetApplications(const wxString& sFileURL) const;
00032     bool              AddApplication(const wxString& sFileURL, const wxString& sNewApplication) const;
00033     bool              RemoveApplication(const wxString& sFileURL, const wxString& sApplication) const;
00034     wxString          GetCommand(const wxString& sApplicationId) const;
00035     bool              SetCommand(const wxString& sApplicationId, const wxString& sNewCommand) const;
00036 
00037   private:
00038     wxString          GetDescription(const wxString& sFileType) const;
00039     wxFileName        GetIconPath(const wxString& sFileType, int nSize = -1) const;
00040     wxString          GetDefaultCommand(const wxString& sFileType) const;
00041     wxArrayString     GetExtensions(const wxString& sFileType) const;
00042 
00043   private:
00044     wxGnomeVfs  m_gnomevfs;
00045     wxGtk       m_gtk;
00046   };
00047 
00048 #endif
00049   // ndef __gnomefiletypes_h__

Generated on Wed Jan 25 08:13:09 2006 for Sherpa wxWidgets Classes by doxygen 1.3.6