5c7a529fa1
* Added imnodes * Added basic data processor view. Still needs to be cleaned up * Make sure all attached links get properly removed when a Node is deleted * Cleanup and API exposing * Added data provider overlays and integrate them with the data processor * Optimized data processing * Node UI enhancements * Added support for all themes to the nodes editor * Improved data processor context menus * Fixed data processor context menu showing up everywhere * Make hex editor context menu behave the same as data processor one * Add different node pin types and prevent incompatible ones from being connected * Don't require explicitly marking node as end node * Fixed plugin copying * Added some more nodes
40 lines
831 B
C++
40 lines
831 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;
|
|
|
|
void eraseLink(u32 id);
|
|
void eraseNodes(const std::vector<int> &ids);
|
|
void processNodes();
|
|
};
|
|
|
|
} |