1
0
mirror of synced 2024-12-11 07:26:00 +01:00
ImHex/include/views/view_pattern.hpp
Mary 310059f274 Support macOS
This allows building and running under macOS.
There is still some issues with dpi but the application compiles and run now.
2020-12-18 21:44:13 +01:00

39 lines
898 B
C++

#pragma once
#include "lang/ast_node.hpp"
#include "views/view.hpp"
#include "lang/pattern_data.hpp"
#include "providers/provider.hpp"
#include <cstring>
#include <filesystem>
#include "ImGuiFileBrowser.h"
#include "TextEditor.h"
namespace hex {
class ViewPattern : public View {
public:
explicit ViewPattern(prv::Provider* &dataProvider, std::vector<lang::PatternData*> &patternData);
~ViewPattern() override;
void createMenu() override;
void createView() override;
private:
std::vector<lang::PatternData*> &m_patternData;
prv::Provider* &m_dataProvider;
std::filesystem::path m_possiblePatternFile;
TextEditor m_textEditor;
imgui_addons::ImGuiFileBrowser m_fileBrowser;
void loadPatternFile(std::string path);
void clearPatternData();
void parsePattern(char *buffer);
};
}