1
0
mirror of synced 2024-12-03 03:37:19 +01:00
ImHex/plugins/builtin/include/content/views/view_constants.hpp
2023-11-10 20:47:08 +01:00

46 lines
899 B
C++

#pragma once
#include <hex/ui/view.hpp>
#include <string>
namespace hex::plugin::builtin {
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 = default;
void drawContent() override;
ImVec2 getMinSize() const override {
return scaled(ImVec2(300, 400));
}
ImVec2 getMaxSize() const override {
return { FLT_MAX, 800_scaled };
}
private:
void reloadConstants();
std::vector<Constant> m_constants;
std::vector<size_t> m_filterIndices;
std::string m_filter;
};
}