2016-12-04 07:04:35 +00:00
|
|
|
// Copyright 2016 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
2017-06-18 10:44:32 +00:00
|
|
|
#include <utility>
|
2016-12-04 07:04:35 +00:00
|
|
|
#include <wx/panel.h>
|
|
|
|
|
|
|
|
class GameListItem;
|
|
|
|
class wxTreeCtrl;
|
|
|
|
class wxTreeEvent;
|
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-08-02 16:16:56 +00:00
|
|
|
struct Partition;
|
2017-06-06 09:49:01 +00:00
|
|
|
class Volume;
|
2016-12-04 07:04:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class FilesystemPanel final : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
2015-06-13 10:51:24 +00:00
|
|
|
explicit FilesystemPanel(wxWindow* parent, wxWindowID id,
|
2017-06-06 09:49:01 +00:00
|
|
|
const std::unique_ptr<DiscIO::Volume>& opened_iso);
|
2016-12-04 07:04:35 +00:00
|
|
|
~FilesystemPanel();
|
|
|
|
|
|
|
|
private:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ID_EXTRACT_DIR = 20000,
|
|
|
|
ID_EXTRACT_ALL,
|
|
|
|
ID_EXTRACT_FILE,
|
2017-06-20 13:48:55 +00:00
|
|
|
ID_EXTRACT_SYSTEM_DATA,
|
2016-12-04 07:04:35 +00:00
|
|
|
ID_CHECK_INTEGRITY,
|
|
|
|
};
|
|
|
|
|
|
|
|
void CreateGUI();
|
|
|
|
void BindEvents();
|
|
|
|
|
2017-06-04 12:30:40 +00:00
|
|
|
bool PopulateFileSystemTree();
|
2016-12-04 07:04:35 +00:00
|
|
|
|
|
|
|
void OnRightClickTree(wxTreeEvent&);
|
|
|
|
void OnExtractFile(wxCommandEvent&);
|
|
|
|
void OnExtractDirectories(wxCommandEvent&);
|
2017-06-20 13:48:55 +00:00
|
|
|
void OnExtractSystemData(wxCommandEvent&);
|
2017-06-20 13:41:17 +00:00
|
|
|
void OnExtractAll(wxCommandEvent&);
|
2016-12-04 07:04:35 +00:00
|
|
|
void OnCheckPartitionIntegrity(wxCommandEvent&);
|
|
|
|
|
|
|
|
void ExtractSingleFile(const wxString& output_file_path) const;
|
|
|
|
void ExtractSingleDirectory(const wxString& output_folder);
|
|
|
|
void ExtractDirectories(const std::string& full_path, const std::string& output_folder,
|
2017-08-02 16:16:56 +00:00
|
|
|
const DiscIO::Partition& partition);
|
|
|
|
void ExtractPartition(const std::string& output_folder, const DiscIO::Partition& partition);
|
2016-12-04 07:04:35 +00:00
|
|
|
|
2017-08-02 16:16:56 +00:00
|
|
|
std::pair<wxString, DiscIO::Partition> BuildFilePathFromSelection() const;
|
|
|
|
std::pair<wxString, DiscIO::Partition> BuildDirectoryPathFromSelection() const;
|
2016-12-04 07:04:35 +00:00
|
|
|
|
|
|
|
wxTreeCtrl* m_tree_ctrl;
|
|
|
|
|
2017-06-06 09:49:01 +00:00
|
|
|
const std::unique_ptr<DiscIO::Volume>& m_opened_iso;
|
2016-12-04 07:04:35 +00:00
|
|
|
|
2017-06-03 15:24:28 +00:00
|
|
|
bool m_has_partitions;
|
2016-12-04 07:04:35 +00:00
|
|
|
};
|