1
0
mirror of synced 2024-11-18 12:57:12 +01:00
ImHex/plugins/builtin/include/content/views/view_strings.hpp

42 lines
877 B
C++
Raw Normal View History

2020-11-15 01:42:43 +01:00
#pragma once
#include <hex/views/view.hpp>
2020-11-15 01:42:43 +01:00
#include <cstdio>
#include <string>
2021-12-07 22:47:41 +01:00
namespace hex::plugin::builtin {
2020-11-15 01:42:43 +01:00
namespace prv { class Provider; }
struct FoundString {
u64 offset;
size_t size;
};
class ViewStrings : public View {
public:
explicit ViewStrings();
2020-11-15 01:42:43 +01:00
~ViewStrings() override;
void drawContent() override;
void drawMenu() override;
2020-11-15 01:42:43 +01:00
private:
2021-02-22 10:16:58 +01:00
bool m_searching = false;
bool m_regex = false;
bool m_pattern_parsed = false;
2020-11-15 01:42:43 +01:00
std::vector<FoundString> m_foundStrings;
std::vector<size_t> m_filterIndices;
2020-11-15 01:42:43 +01:00
int m_minimumLength = 5;
std::string m_filter;
std::string m_selectedString;
std::string m_demangledName;
2021-02-22 10:16:58 +01:00
void searchStrings();
void createStringContextMenu(const FoundString &foundString);
2020-11-15 01:42:43 +01:00
};
}