]> git.saurik.com Git - wxWidgets.git/blob - include/wx/fs_arc.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / fs_arc.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/fs_arc.h
3 // Purpose: Archive file system
4 // Author: Vaclav Slavik, Mike Wetherell
5 // Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_FS_ARC_H_
10 #define _WX_FS_ARC_H_
11
12 #include "wx/defs.h"
13
14 #if wxUSE_FS_ARCHIVE
15
16 #include "wx/filesys.h"
17 #include "wx/hashmap.h"
18
19 WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap);
20
21 //---------------------------------------------------------------------------
22 // wxArchiveFSHandler
23 //---------------------------------------------------------------------------
24
25 class WXDLLIMPEXP_BASE wxArchiveFSHandler : public wxFileSystemHandler
26 {
27 public:
28 wxArchiveFSHandler();
29 virtual bool CanOpen(const wxString& location);
30 virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
31 virtual wxString FindFirst(const wxString& spec, int flags = 0);
32 virtual wxString FindNext();
33 void Cleanup();
34 virtual ~wxArchiveFSHandler();
35
36 private:
37 class wxArchiveFSCache *m_cache;
38 wxFileSystem m_fs;
39
40 // these vars are used by FindFirst/Next:
41 class wxArchiveFSCacheData *m_Archive;
42 struct wxArchiveFSEntry *m_FindEntry;
43 wxString m_Pattern, m_BaseDir, m_ZipFile;
44 bool m_AllowDirs, m_AllowFiles;
45 wxArchiveFilenameHashMap *m_DirsFound;
46
47 wxString DoFind();
48
49 wxDECLARE_NO_COPY_CLASS(wxArchiveFSHandler);
50 DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler)
51 };
52
53 #endif // wxUSE_FS_ARCHIVE
54
55 #endif // _WX_FS_ARC_H_