ImHex/include/views/view_data_inspector.hpp

34 lines
830 B
C++
Raw Normal View History

2020-11-20 23:12:58 +00:00
#pragma once
#include <hex/views/view.hpp>
2020-11-20 23:12:58 +00:00
#include <hex/api/content_registry.hpp>
#include <bit>
2020-11-20 23:12:58 +00:00
#include <cstdio>
#include <string>
namespace hex {
namespace prv { class Provider; }
class ViewDataInspector : public View {
public:
explicit ViewDataInspector();
2020-11-20 23:12:58 +00:00
~ViewDataInspector() override;
void drawContent() override;
void drawMenu() override;
2020-11-20 23:12:58 +00:00
private:
bool m_shouldInvalidate = true;
std::endian m_endian = std::endian::native;
ContentRegistry::DataInspector::NumberDisplayStyle m_numberDisplayStyle =ContentRegistry::DataInspector::NumberDisplayStyle::Decimal;
u64 m_startAddress = 0;
2020-11-20 23:12:58 +00:00
size_t m_validBytes = 0;
std::vector<std::pair<std::string, ContentRegistry::DataInspector::DisplayFunction>> m_cachedData;
2020-11-20 23:12:58 +00:00
};
}