#pragma once #ifndef ES_APP_GUIS_GUI_META_DATA_ED_H #define ES_APP_GUIS_GUI_META_DATA_ED_H #include "GuiComponent.h" #include "components/MenuComponent.h" #include "MetaData.h" #include "scrapers/Scraper.h" #include 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); bool input(InputConfig* config, Input input) override; void onSizeChanged() override; virtual std::vector getHelpPrompts() override; private: void save(); void fetch(); void fetchDone(const ScraperSearchResult& result); void close(bool closeAllWindows); NinePatchComponent mBackground; ComponentGrid mGrid; std::shared_ptr mTitle; std::shared_ptr mSubtitle; std::shared_ptr mHeaderGrid; std::shared_ptr mList; std::shared_ptr mButtons; ScraperSearchParams mScraperParams; std::vector< std::shared_ptr > mEditors; std::vector mMetaDataDecl; MetaDataList* mMetaData; std::function mSavedCallback; std::function mDeleteFunc; }; #endif // ES_APP_GUIS_GUI_META_DATA_ED_H