1
0
mirror of synced 2024-12-13 08:21:07 +01:00
ImHex/plugins/libimhex/source/helpers/shared_data.cpp
WerWolv e74c0f5cf5 sys: Tons of long overdue cleanup
- std::string -> const std::string& where needed
- Added a FileIO abstraction class
- Fixed recent files not updating
- Removed localization file from global include
- Renamed lang to pattern_language/pl
- Renamed EventFileDropped to RequestFileOpen
2021-09-08 15:18:24 +02:00

48 lines
2.1 KiB
C++

#include <hex/helpers/shared_data.hpp>
#include <nlohmann/json.hpp>
namespace hex {
std::vector<std::function<void()>> SharedData::deferredCalls;
prv::Provider *SharedData::currentProvider;
std::map<std::string, std::vector<ContentRegistry::Settings::Entry>> SharedData::settingsEntries;
nlohmann::json SharedData::settingsJson;
std::vector<ContentRegistry::CommandPaletteCommands::Entry> SharedData::commandPaletteCommands;
std::map<std::string, ContentRegistry::PatternLanguageFunctions::Function> SharedData::patternLanguageFunctions;
std::vector<View*> SharedData::views;
std::vector<ContentRegistry::Tools::Entry> SharedData::toolsEntries;
std::vector<ContentRegistry::DataInspector::Entry> SharedData::dataInspectorEntries;
u32 SharedData::patternPaletteOffset;
std::string SharedData::errorPopupMessage;
std::list<ImHexApi::Bookmarks::Entry> SharedData::bookmarkEntries;
std::vector<pl::PatternData*> SharedData::patternData;
std::map<std::string, std::string> SharedData::languageNames;
std::map<std::string, std::vector<LanguageDefinition>> SharedData::languageDefinitions;
std::map<std::string, std::string> SharedData::loadedLanguageStrings;
std::vector<ContentRegistry::Interface::DrawCallback> SharedData::welcomeScreenEntries;
std::vector<ContentRegistry::Interface::DrawCallback> SharedData::footerItems;
std::vector<ContentRegistry::Interface::DrawCallback> SharedData::toolbarItems;
std::vector<ContentRegistry::DataProcessorNode::Entry> SharedData::dataProcessorNodes;
u32 SharedData::dataProcessorNodeIdCounter = 1;
u32 SharedData::dataProcessorLinkIdCounter = 1;
u32 SharedData::dataProcessorAttrIdCounter = 1;
std::list<std::string> SharedData::recentFilePaths;
int SharedData::mainArgc;
char **SharedData::mainArgv;
ImFontAtlas *SharedData::fontAtlas;
ImFontConfig SharedData::fontConfig;
ImVec2 SharedData::windowPos;
ImVec2 SharedData::windowSize;
float SharedData::globalScale;
float SharedData::fontScale;
std::map<std::string, std::any> SharedData::sharedVariables;
}