1
0
mirror of synced 2024-11-29 01:44:31 +01:00
ImHex/source/main.cpp

58 lines
1.7 KiB
C++
Raw Normal View History

#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>
2021-01-12 16:50:15 +01:00
#include "views/view_hexeditor.hpp"
#include "views/view_pattern.hpp"
2020-11-10 21:31:04 +01:00
#include "views/view_pattern_data.hpp"
#include "views/view_hashes.hpp"
#include "views/view_information.hpp"
2020-11-14 21:16:03 +01:00
#include "views/view_help.hpp"
2020-11-15 00:46:38 +01:00
#include "views/view_tools.hpp"
2020-11-15 01:42:43 +01:00
#include "views/view_strings.hpp"
2020-11-21 00:12:58 +01:00
#include "views/view_data_inspector.hpp"
#include "views/view_disassembler.hpp"
#include "views/view_bookmarks.hpp"
2020-11-29 02:06:41 +01:00
#include "views/view_patches.hpp"
#include "views/view_command_palette.hpp"
#include "views/view_settings.hpp"
2020-11-10 21:31:04 +01:00
#include <vector>
int main(int argc, char **argv) {
using namespace hex;
Window window(argc, argv);
2020-11-10 21:31:04 +01:00
// Shared Data
std::vector<lang::PatternData*> patternData;
2020-11-10 21:31:04 +01:00
// Create views
2021-01-20 20:16:24 +01:00
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>();
2021-01-20 20:16:24 +01:00
ContentRegistry::Views::add<ViewBookmarks>();
ContentRegistry::Views::add<ViewPatches>();
ContentRegistry::Views::add<ViewTools>();
ContentRegistry::Views::add<ViewCommandPalette>();
ContentRegistry::Views::add<ViewHelp>();
ContentRegistry::Views::add<ViewSettings>();
if (argc > 1)
View::postEvent(Events::FileDropped, argv[1]);
2021-01-12 16:50:15 +01:00
window.initPlugins();
window.loop();
2021-01-12 16:50:15 +01:00
return EXIT_SUCCESS;
}