2021-06-25 23:18:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hex/views/view.hpp>
|
|
|
|
|
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
enum class ConstantType {
|
|
|
|
Int10,
|
|
|
|
Int16BigEndian,
|
|
|
|
Int16LittleEndian
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Constant {
|
|
|
|
std::string name, description;
|
|
|
|
std::string category;
|
|
|
|
ConstantType type;
|
|
|
|
std::string value;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ViewConstants : public View {
|
|
|
|
public:
|
|
|
|
explicit ViewConstants();
|
|
|
|
~ViewConstants() override;
|
|
|
|
|
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void reloadConstants();
|
|
|
|
|
|
|
|
std::vector<Constant> m_constants;
|
2021-09-09 10:58:44 +00:00
|
|
|
std::vector<size_t> m_filterIndices;
|
|
|
|
std::string m_filter;
|
2021-06-25 23:18:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|