2020-11-10 15:26:38 +01:00
|
|
|
#include "window.hpp"
|
|
|
|
|
2021-01-13 17:28:27 +01:00
|
|
|
#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
|
|
|
|
2020-11-10 15:26:38 +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"
|
2020-11-11 00:13:09 +01:00
|
|
|
#include "views/view_hashes.hpp"
|
2020-11-12 09:38:52 +01:00
|
|
|
#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"
|
2020-11-22 23:07:50 +01:00
|
|
|
#include "views/view_disassembler.hpp"
|
2020-11-28 00:33:26 +01:00
|
|
|
#include "views/view_bookmarks.hpp"
|
2020-11-29 02:06:41 +01:00
|
|
|
#include "views/view_patches.hpp"
|
2020-12-16 22:43:07 +01:00
|
|
|
#include "views/view_command_palette.hpp"
|
2021-01-11 20:31:40 +01:00
|
|
|
#include "views/view_settings.hpp"
|
2020-11-10 21:31:04 +01:00
|
|
|
|
|
|
|
#include <vector>
|
2020-11-10 15:26:38 +01:00
|
|
|
|
2020-12-01 18:19:49 +01:00
|
|
|
int main(int argc, char **argv) {
|
2021-01-13 17:28:27 +01:00
|
|
|
using namespace hex;
|
|
|
|
|
|
|
|
Window window(argc, argv);
|
2020-11-10 15:26:38 +01:00
|
|
|
|
2020-11-10 21:31:04 +01:00
|
|
|
// Shared Data
|
2021-01-13 17:28:27 +01:00
|
|
|
std::vector<lang::PatternData*> patternData;
|
2020-11-28 00:33:26 +01:00
|
|
|
|
2020-11-10 21:31:04 +01:00
|
|
|
// Create views
|
2021-01-20 20:16:24 +01:00
|
|
|
ContentRegistry::Views::add<ViewHexEditor>(patternData);
|
2021-01-13 17:28:27 +01:00
|
|
|
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>();
|
2021-01-13 17:28:27 +01:00
|
|
|
ContentRegistry::Views::add<ViewPatches>();
|
|
|
|
ContentRegistry::Views::add<ViewTools>();
|
|
|
|
ContentRegistry::Views::add<ViewCommandPalette>();
|
|
|
|
ContentRegistry::Views::add<ViewHelp>();
|
|
|
|
ContentRegistry::Views::add<ViewSettings>();
|
2020-11-10 15:26:38 +01:00
|
|
|
|
2020-12-05 22:10:03 +01:00
|
|
|
if (argc > 1)
|
2021-01-13 17:28:27 +01:00
|
|
|
View::postEvent(Events::FileDropped, argv[1]);
|
2020-12-05 22:10:03 +01:00
|
|
|
|
2021-01-12 16:50:15 +01:00
|
|
|
window.initPlugins();
|
2020-11-10 15:26:38 +01:00
|
|
|
window.loop();
|
|
|
|
|
2021-01-12 16:50:15 +01:00
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
2020-11-10 15:26:38 +01:00
|
|
|
}
|