2020-11-10 15:26:38 +01:00
|
|
|
#pragma once
|
|
|
|
|
2020-11-17 02:31:51 +01:00
|
|
|
#include "lang/ast_node.hpp"
|
2020-11-13 13:06:22 +01:00
|
|
|
|
2020-11-10 15:26:38 +01:00
|
|
|
#include "views/view.hpp"
|
2020-11-19 11:36:52 +01:00
|
|
|
#include "lang/pattern_data.hpp"
|
2020-11-13 13:06:22 +01:00
|
|
|
|
|
|
|
#include "providers/provider.hpp"
|
2020-11-10 15:26:38 +01:00
|
|
|
|
|
|
|
#include <concepts>
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
|
2020-11-17 15:38:24 +01:00
|
|
|
#include "ImGuiFileBrowser.h"
|
2020-11-12 21:20:51 +01:00
|
|
|
|
2020-11-10 15:26:38 +01:00
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
class ViewPattern : public View {
|
|
|
|
public:
|
2020-11-19 11:36:52 +01:00
|
|
|
explicit ViewPattern(prv::Provider* &dataProvider, std::vector<lang::PatternData*> &patternData);
|
2020-11-11 09:28:44 +01:00
|
|
|
~ViewPattern() override;
|
2020-11-10 15:26:38 +01:00
|
|
|
|
2020-11-11 09:28:44 +01:00
|
|
|
void createMenu() override;
|
|
|
|
void createView() override;
|
2020-11-10 15:26:38 +01:00
|
|
|
|
|
|
|
private:
|
2020-11-13 13:50:59 +01:00
|
|
|
char *m_buffer = nullptr;
|
2020-11-10 15:26:38 +01:00
|
|
|
|
2020-11-19 11:36:52 +01:00
|
|
|
std::vector<lang::PatternData*> &m_patternData;
|
2020-11-13 13:06:22 +01:00
|
|
|
prv::Provider* &m_dataProvider;
|
2020-11-10 17:34:11 +01:00
|
|
|
bool m_windowOpen = true;
|
2020-11-10 15:26:38 +01:00
|
|
|
|
2020-11-17 15:38:24 +01:00
|
|
|
imgui_addons::ImGuiFileBrowser m_fileBrowser;
|
2020-11-12 21:20:51 +01:00
|
|
|
|
2020-11-14 14:42:21 +01:00
|
|
|
void clearPatternData();
|
2020-11-10 21:31:04 +01:00
|
|
|
void parsePattern(char *buffer);
|
2020-11-10 15:26:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|