1
0
mirror of synced 2024-12-15 17:21:16 +01:00
ImHex/plugins/yara_rules/include/content/views/view_yara.hpp

35 lines
802 B
C++
Raw Normal View History

#pragma once
#include <hex.hpp>
#include <hex/ui/view.hpp>
#include <hex/api/task_manager.hpp>
2024-02-21 22:08:26 +01:00
#include <content/yara_rule.hpp>
#include <wolv/container/interval_tree.hpp>
2024-02-21 22:08:26 +01:00
namespace hex::plugin::yara {
class ViewYara : public View::Window {
public:
ViewYara();
~ViewYara() override;
void drawContent() override;
private:
2024-02-21 22:08:26 +01:00
PerProvider<std::vector<std::pair<std::fs::path, std::fs::path>>> m_rulePaths;
PerProvider<std::vector<YaraRule::Rule>> m_matchedRules;
2024-02-21 22:08:26 +01:00
PerProvider<std::vector<std::string>> m_consoleMessages;
PerProvider<u32> m_selectedRule;
PerProvider<wolv::container::IntervalTree<std::string>> m_highlights;
TaskHolder m_matcherTask;
void applyRules();
void clearResult();
};
}