#pragma once #include "../GuiComponent.h" #include "ComponentListComponent.h" #include "../MetaData.h" #include "TextComponent.h" #include "NinePatchComponent.h" #include "ButtonComponent.h" #include #include "../scrapers/Scraper.h" class GuiMetaDataEd : public GuiComponent { public: GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector& mdd, ScraperSearchParams params, const std::string& header, std::function savedCallback, std::function deleteFunc); virtual ~GuiMetaDataEd(); bool input(InputConfig* config, Input input) override; private: void save(); void fetch(); void fetchDone(MetaDataList result); void populateList(const std::vector& mdd); ScraperSearchParams mScraperParams; NinePatchComponent mBox; ComponentListComponent mList; TextComponent mHeader; std::vector mLabels; std::vector mEditors; std::vector mMetaDataDecl; MetaDataList* mMetaData; std::function mSavedCallback; std::function mDeleteFunc; ButtonComponent mDeleteButton; ButtonComponent mFetchButton; ButtonComponent mSaveButton; };