2020-11-21 00:12:58 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-01-13 17:28:27 +01:00
|
|
|
#include <hex/views/view.hpp>
|
2020-11-21 00:12:58 +01:00
|
|
|
|
2021-01-13 17:28:27 +01:00
|
|
|
#include <hex/api/content_registry.hpp>
|
2021-01-13 01:24:27 +01:00
|
|
|
|
2020-11-22 15:32:37 +01:00
|
|
|
#include <bit>
|
2020-11-21 00:12:58 +01:00
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
namespace prv { class Provider; }
|
|
|
|
|
|
|
|
class ViewDataInspector : public View {
|
|
|
|
public:
|
2020-12-27 15:39:06 +01:00
|
|
|
explicit ViewDataInspector();
|
2020-11-21 00:12:58 +01:00
|
|
|
~ViewDataInspector() override;
|
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
2020-11-21 00:12:58 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_shouldInvalidate = true;
|
|
|
|
|
2021-01-03 17:12:20 +01:00
|
|
|
std::endian m_endian = std::endian::native;
|
2021-01-13 01:24:27 +01:00
|
|
|
ContentRegistry::DataInspector::NumberDisplayStyle m_numberDisplayStyle =ContentRegistry::DataInspector::NumberDisplayStyle::Decimal;
|
2020-11-22 15:32:37 +01:00
|
|
|
|
2021-01-13 01:24:27 +01:00
|
|
|
u64 m_startAddress = 0;
|
2020-11-21 00:12:58 +01:00
|
|
|
size_t m_validBytes = 0;
|
2021-01-13 01:24:27 +01:00
|
|
|
std::vector<std::pair<std::string, ContentRegistry::DataInspector::DisplayFunction>> m_cachedData;
|
2020-11-21 00:12:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|