0ad/source/tools/atlas/AtlasUI/ArchiveViewer/ArchiveViewer.h
olsner db045c330b # Made Atlas compile on linux
graphics: basic terrain passibility
atlas: lots of changes to make atlas compile under linux
unix/X: more clipboard support - copy from 0AD to other programs
unix/debug: use sys_get_executable_name instead of hard-coded paths
... and lots of other misc. changes

This was SVN commit r4640.
2006-11-12 04:02:36 +00:00

76 lines
1.7 KiB
C++

#include "FileHistory/FileHistory.h"
#include "SnapSplitterWindow/SnapSplitterWindow.h"
#include "FilePreviewer.h"
#include "wx/filename.h"
#include "wx/listctrl.h"
#include <vector>
namespace DatafileIO
{
class BARReader;
struct BAREntry;
class SeekableInputStream;
}
class ArchiveViewer : public wxFrame
{
public:
ArchiveViewer(wxWindow* parent);
~ArchiveViewer();
void OnOpen(wxCommandEvent& event);
void OnMRUFile(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void OnExtractSelected(wxCommandEvent& event);
void OnExtractAll(wxCommandEvent& event);
void OnEnablePreview(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void SetFilter(const wxString& filter);
void UpdatePreview(long index = -1);
private:
void OpenFile(const wxString& filename);
void UpdateFileList(); // must be called after opening a new file
void RedrawFileList(bool keepSelection);
void ExtractFiles(bool onlySelected);
void SetCurrentFilename(wxFileName filename = wxString());
wxFileName GetCurrentFilename() { return m_CurrentFilename; }
wxString GetDefaultOpenDirectory();
wxFileName m_CurrentFilename;
wxString m_WindowTitle;
wxString m_Filter;
bool m_PreviewEnabled;
FilePreviewer* m_PreviewWindow;
SnapSplitterWindow* m_Splitter;
wxString m_LastExtractDir;
// wxStatusBar* m_StatusBar;
wxListCtrl* m_FileListCtrl;
DatafileIO::SeekableInputStream* m_BARStream;
DatafileIO::BARReader* m_BARReader;
struct FileData {
wxString NameLower; // for filtering
wxString Name;
wxString Size;
wxString Date;
};
std::vector<FileData> m_CachedFileData;
FileHistory m_FileHistory;
DECLARE_EVENT_TABLE();
};