1
0
mirror of synced 2024-11-15 03:27:40 +01:00
ImHex/include/views/view_data_processor.hpp
WerWolv e74c0f5cf5 sys: Tons of long overdue cleanup
- std::string -> const std::string& where needed
- Added a FileIO abstraction class
- Fixed recent files not updating
- Removed localization file from global include
- Renamed lang to pattern_language/pl
- Renamed EventFileDropped to RequestFileOpen
2021-09-08 15:18:24 +02:00

45 lines
975 B
C++

#pragma once
#include <hex.hpp>
#include <imgui.h>
#include <hex/views/view.hpp>
#include <hex/data_processor/node.hpp>
#include <hex/data_processor/link.hpp>
#include <array>
#include <string>
namespace hex {
namespace prv { class Provider; }
class ViewDataProcessor : public View {
public:
ViewDataProcessor();
~ViewDataProcessor() override;
void drawContent() override;
void drawMenu() override;
private:
std::list<dp::Node*> m_endNodes;
std::list<dp::Node*> m_nodes;
std::list<dp::Link> m_links;
std::vector<prv::Overlay*> m_dataOverlays;
int m_rightClickedId = -1;
ImVec2 m_rightClickedCoords;
std::optional<dp::Node::NodeError> m_currNodeError;
void eraseLink(u32 id);
void eraseNodes(const std::vector<int> &ids);
void processNodes();
std::string saveNodes();
void loadNodes(const std::string &data);
};
}