2016-12-04 00:04:35 -07: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 04:44:32 -06:00
|
|
|
#include <utility>
|
2016-12-04 00:04:35 -07:00
|
|
|
#include <wx/panel.h>
|
|
|
|
|
|
|
|
class GameListItem;
|
|
|
|
class wxTreeCtrl;
|
|
|
|
class wxTreeEvent;
|
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-08-02 10:16:56 -06:00
|
|
|
struct Partition;
|
2017-06-06 03:49:01 -06:00
|
|
|
class Volume;
|
2016-12-04 00:04:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
class FilesystemPanel final : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
2015-06-13 04:51:24 -06:00
|
|
|
explicit FilesystemPanel(wxWindow* parent, wxWindowID id,
|
2017-06-06 03:49:01 -06:00
|
|
|
const std::unique_ptr<DiscIO::Volume>& opened_iso);
|
2016-12-04 00:04:35 -07:00
|
|
|
~FilesystemPanel();
|
|
|
|
|
|
|
|
private:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ID_EXTRACT_DIR = 20000,
|
|
|
|
ID_EXTRACT_ALL,
|
|
|
|
ID_EXTRACT_FILE,
|
2017-06-20 07:48:55 -06:00
|
|
|
ID_EXTRACT_SYSTEM_DATA,
|
2016-12-04 00:04:35 -07:00
|
|
|
ID_CHECK_INTEGRITY,
|
|
|
|
};
|
|
|
|
|
|
|
|
void CreateGUI();
|
|
|
|
void BindEvents();
|
|
|
|
|
2017-06-04 06:30:40 -06:00
|
|
|
bool PopulateFileSystemTree();
|
2016-12-04 00:04:35 -07:00
|
|
|
|
|
|
|
void OnRightClickTree(wxTreeEvent&);
|
|
|
|
void OnExtractFile(wxCommandEvent&);
|
|
|
|
void OnExtractDirectories(wxCommandEvent&);
|
2017-06-20 07:48:55 -06:00
|
|
|
void OnExtractSystemData(wxCommandEvent&);
|
2017-06-20 07:41:17 -06:00
|
|
|
void OnExtractAll(wxCommandEvent&);
|
2016-12-04 00:04:35 -07: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 10:16:56 -06:00
|
|
|
const DiscIO::Partition& partition);
|
|
|
|
void ExtractPartition(const std::string& output_folder, const DiscIO::Partition& partition);
|
2016-12-04 00:04:35 -07:00
|
|
|
|
2017-08-02 10:16:56 -06:00
|
|
|
std::pair<wxString, DiscIO::Partition> BuildFilePathFromSelection() const;
|
|
|
|
std::pair<wxString, DiscIO::Partition> BuildDirectoryPathFromSelection() const;
|
2016-12-04 00:04:35 -07:00
|
|
|
|
|
|
|
wxTreeCtrl* m_tree_ctrl;
|
|
|
|
|
2017-06-06 03:49:01 -06:00
|
|
|
const std::unique_ptr<DiscIO::Volume>& m_opened_iso;
|
2016-12-04 00:04:35 -07:00
|
|
|
|
2017-06-03 09:24:28 -06:00
|
|
|
bool m_has_partitions;
|
2016-12-04 00:04:35 -07:00
|
|
|
};
|