2020-11-15 01:42:43 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-01-13 17:28:27 +01:00
|
|
|
#include <hex/views/view.hpp>
|
2020-11-15 01:42:43 +01:00
|
|
|
|
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
namespace prv { class Provider; }
|
|
|
|
|
|
|
|
struct FoundString {
|
|
|
|
std::string string;
|
|
|
|
u64 offset;
|
|
|
|
size_t size;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ViewStrings : public View {
|
|
|
|
public:
|
2020-12-27 15:39:06 +01:00
|
|
|
explicit ViewStrings();
|
2020-11-15 01:42:43 +01:00
|
|
|
~ViewStrings() override;
|
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
2020-11-15 01:42:43 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_shouldInvalidate = false;
|
|
|
|
|
|
|
|
std::vector<FoundString> m_foundStrings;
|
|
|
|
int m_minimumLength = 5;
|
|
|
|
char *m_filter;
|
2020-11-24 18:12:08 +01:00
|
|
|
|
|
|
|
std::string m_selectedString;
|
|
|
|
std::string m_demangledName;
|
|
|
|
|
|
|
|
void createStringContextMenu(const FoundString &foundString);
|
2020-11-15 01:42:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|