5dfa9cf501
* refactor(patterns): add visitor interface * refactor(patterns): add public accessors * refactor(patterns): add method to get pattern value * refactor(pattern): make some methods public * refactor(pattern): extract code to draw GUI * refactor(patterns): remove GUI related code from patterns * refactor: move common GUI function from pattern to pattern_drawer * refactor(pattern_drawer): extract common code into methods * refactor: rename ImGuiDrawer -> PatternDrawer * refactor(patternr): move displayEnd into PatternDrawer * refactor: use ArrayPattern concept to restrict argument type Co-authored-by: Dmitry Polshakov <dmitry.polshakov@dsr-corporation.com>
27 lines
535 B
C++
27 lines
535 B
C++
#pragma once
|
|
|
|
#include <hex.hpp>
|
|
|
|
#include <imgui.h>
|
|
#include <hex/pattern_language/pattern_drawer.hpp>
|
|
#include <hex/ui/view.hpp>
|
|
|
|
#include <vector>
|
|
#include <tuple>
|
|
#include <cstdio>
|
|
|
|
namespace hex::plugin::builtin {
|
|
|
|
class ViewPatternData : public View {
|
|
public:
|
|
ViewPatternData();
|
|
~ViewPatternData() override;
|
|
|
|
void drawContent() override;
|
|
|
|
private:
|
|
std::map<prv::Provider *, std::vector<std::shared_ptr<pl::Pattern>>> m_sortedPatterns;
|
|
hex::pl::PatternDrawer m_drawer;
|
|
};
|
|
|
|
} |