2020-11-12 09:38:52 +01:00
|
|
|
#pragma once
|
|
|
|
|
2024-02-21 00:06:52 +01:00
|
|
|
#include <hex/api/content_registry.hpp>
|
2023-11-18 14:50:43 +01:00
|
|
|
#include <hex/api/task_manager.hpp>
|
2024-02-21 00:06:52 +01:00
|
|
|
#include <hex/ui/view.hpp>
|
2023-04-10 14:08:21 +02:00
|
|
|
#include <ui/widgets.hpp>
|
2022-12-27 22:50:37 +01:00
|
|
|
|
2021-12-07 22:47:41 +01:00
|
|
|
namespace hex::plugin::builtin {
|
2020-11-12 09:38:52 +01:00
|
|
|
|
2023-11-21 13:47:50 +01:00
|
|
|
class ViewInformation : public View::Window {
|
2020-11-12 09:38:52 +01:00
|
|
|
public:
|
2020-12-27 15:39:06 +01:00
|
|
|
explicit ViewInformation();
|
2024-02-21 00:06:52 +01:00
|
|
|
~ViewInformation() override = default;
|
2020-11-12 09:38:52 +01:00
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
void drawContent() override;
|
2020-11-12 09:38:52 +01:00
|
|
|
|
|
|
|
private:
|
2024-02-21 00:06:52 +01:00
|
|
|
void analyze();
|
2020-11-22 19:43:35 +01:00
|
|
|
|
2024-02-21 00:06:52 +01:00
|
|
|
struct AnalysisData {
|
|
|
|
bool valid = false;
|
2020-11-12 09:38:52 +01:00
|
|
|
|
2024-02-21 00:06:52 +01:00
|
|
|
TaskHolder task;
|
2024-01-25 22:49:56 +01:00
|
|
|
prv::Provider *analyzedProvider = nullptr;
|
2024-02-21 00:06:52 +01:00
|
|
|
Region analysisRegion = { 0, 0 };
|
2024-01-25 22:49:56 +01:00
|
|
|
|
|
|
|
ui::RegionType selectionType = ui::RegionType::EntireData;
|
|
|
|
|
2024-02-21 00:06:52 +01:00
|
|
|
std::list<std::unique_ptr<ContentRegistry::DataInformation::InformationSection>> informationSections;
|
|
|
|
};
|
2023-03-10 16:06:18 +01:00
|
|
|
|
2024-02-21 00:06:52 +01:00
|
|
|
PerProvider<AnalysisData> m_analysisData;
|
2020-11-12 09:38:52 +01:00
|
|
|
};
|
|
|
|
|
2023-03-10 16:06:18 +01:00
|
|
|
}
|