ES-DE/src/components/GuiMetaDataEd.h

46 lines
1.1 KiB
C
Raw Normal View History

2013-08-18 14:16:11 +00:00
#pragma once
#include "../GuiComponent.h"
#include "ComponentListComponent.h"
#include "../MetaData.h"
#include "TextComponent.h"
#include "../GameData.h"
#include "NinePatchComponent.h"
2013-08-22 20:29:50 +00:00
#include "ButtonComponent.h"
#include <functional>
#include "../scrapers/Scraper.h"
2013-08-18 14:16:11 +00:00
class GuiMetaDataEd : public GuiComponent
2013-08-18 14:16:11 +00:00
{
public:
GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector<MetaDataDecl>& mdd, ScraperSearchParams params,
const std::string& header, std::function<void()> savedCallback, std::function<void()> deleteFunc);
virtual ~GuiMetaDataEd();
2013-08-18 14:16:11 +00:00
private:
void save();
void fetch();
void fetchDone(std::vector<MetaDataList> results);
2013-08-22 20:29:50 +00:00
2013-08-18 14:16:11 +00:00
void populateList(const std::vector<MetaDataDecl>& mdd);
ScraperSearchParams mScraperParams;
NinePatchComponent mBox;
2013-08-18 14:16:11 +00:00
ComponentListComponent mList;
TextComponent mHeader;
2013-08-18 14:16:11 +00:00
2013-08-22 20:29:50 +00:00
std::vector<TextComponent*> mLabels;
std::vector<GuiComponent*> mEditors;
2013-08-18 14:16:11 +00:00
MetaDataList* mMetaData;
std::function<void()> mSavedCallback;
std::function<void()> mDeleteFunc;
2013-08-22 20:29:50 +00:00
ButtonComponent mDeleteButton;
ButtonComponent mFetchButton;
ButtonComponent mSaveButton;
2013-08-18 14:16:11 +00:00
};