2021-01-30 21:39:06 +00:00
|
|
|
#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>
|
|
|
|
|
2021-12-07 21:47:41 +00:00
|
|
|
namespace hex::plugin::builtin {
|
2021-01-30 21:39:06 +00:00
|
|
|
|
2022-01-24 19:53:17 +00:00
|
|
|
namespace prv {
|
|
|
|
class Provider;
|
|
|
|
}
|
2021-01-30 21:39:06 +00:00
|
|
|
|
|
|
|
class ViewDataProcessor : public View {
|
|
|
|
public:
|
|
|
|
ViewDataProcessor();
|
|
|
|
~ViewDataProcessor() override;
|
|
|
|
|
|
|
|
void drawContent() override;
|
|
|
|
|
|
|
|
private:
|
2022-01-24 19:53:17 +00:00
|
|
|
std::list<dp::Node *> m_endNodes;
|
|
|
|
std::list<dp::Node *> m_nodes;
|
|
|
|
std::list<dp::Link> m_links;
|
2021-01-30 21:39:06 +00:00
|
|
|
|
2022-01-24 19:53:17 +00:00
|
|
|
std::vector<hex::prv::Overlay *> m_dataOverlays;
|
2021-01-30 21:39:06 +00:00
|
|
|
|
|
|
|
int m_rightClickedId = -1;
|
|
|
|
ImVec2 m_rightClickedCoords;
|
|
|
|
|
2021-02-04 00:14:05 +00:00
|
|
|
std::optional<dp::Node::NodeError> m_currNodeError;
|
|
|
|
|
2021-01-30 21:39:06 +00:00
|
|
|
void eraseLink(u32 id);
|
|
|
|
void eraseNodes(const std::vector<int> &ids);
|
|
|
|
void processNodes();
|
2021-05-17 21:17:58 +00:00
|
|
|
|
|
|
|
std::string saveNodes();
|
2021-09-08 13:18:24 +00:00
|
|
|
void loadNodes(const std::string &data);
|
2021-01-30 21:39:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|