1
0
mirror of synced 2024-11-28 09:30:51 +01:00
ImHex/source/main.cpp
WerWolv 5c7a529fa1
Added Data Processor using Nodes (#152)
* 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
2021-01-30 22:39:06 +01:00

60 lines
1.8 KiB
C++

#include "window.hpp"
#include <hex/api/content_registry.hpp>
#include <hex/providers/provider.hpp>
#include <hex/lang/pattern_data.hpp>
#include <hex/helpers/utils.hpp>
#include "views/view_hexeditor.hpp"
#include "views/view_pattern.hpp"
#include "views/view_pattern_data.hpp"
#include "views/view_hashes.hpp"
#include "views/view_information.hpp"
#include "views/view_help.hpp"
#include "views/view_tools.hpp"
#include "views/view_strings.hpp"
#include "views/view_data_inspector.hpp"
#include "views/view_disassembler.hpp"
#include "views/view_bookmarks.hpp"
#include "views/view_patches.hpp"
#include "views/view_command_palette.hpp"
#include "views/view_settings.hpp"
#include "views/view_data_processor.hpp"
#include <vector>
int main(int argc, char **argv) {
using namespace hex;
Window window(argc, argv);
// Shared Data
std::vector<lang::PatternData*> patternData;
// Create views
ContentRegistry::Views::add<ViewHexEditor>(patternData);
ContentRegistry::Views::add<ViewPattern>(patternData);
ContentRegistry::Views::add<ViewPatternData>(patternData);
ContentRegistry::Views::add<ViewDataInspector>();
ContentRegistry::Views::add<ViewHashes>();
ContentRegistry::Views::add<ViewInformation>();
ContentRegistry::Views::add<ViewStrings>();
ContentRegistry::Views::add<ViewDisassembler>();
ContentRegistry::Views::add<ViewBookmarks>();
ContentRegistry::Views::add<ViewPatches>();
ContentRegistry::Views::add<ViewTools>();
ContentRegistry::Views::add<ViewCommandPalette>();
ContentRegistry::Views::add<ViewHelp>();
ContentRegistry::Views::add<ViewSettings>();
ContentRegistry::Views::add<ViewDataProcessor>();
if (argc > 1)
View::postEvent(Events::FileDropped, argv[1]);
window.initPlugins();
window.loop();
return EXIT_SUCCESS;
}