1
0
mirror of synced 2024-11-27 17:10:51 +01:00
ImHex/plugins/builtin/include/content/views/view_strings.hpp
2022-03-25 21:08:38 +01:00

39 lines
814 B
C++

#pragma once
#include <hex/ui/view.hpp>
#include <cstdio>
#include <string>
namespace hex::plugin::builtin {
struct FoundString {
u64 offset;
size_t size;
};
class ViewStrings : public View {
public:
explicit ViewStrings();
~ViewStrings() override;
void drawContent() override;
private:
bool m_searching = false;
bool m_regex = false;
bool m_pattern_parsed = true;
std::vector<FoundString> m_foundStrings;
std::vector<size_t> m_filterIndices;
int m_minimumLength = 5;
std::string m_filter;
std::string m_selectedString;
std::string m_demangledName;
void searchStrings();
void createStringContextMenu(const FoundString &foundString);
};
}