2020-09-15 20:57:54 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-09-15 20:57:54 +00:00
|
|
|
// EmulationStation Desktop Edition
|
2020-06-21 12:25:28 +00:00
|
|
|
// ISimpleGameListView.h
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-09-15 20:57:54 +00:00
|
|
|
// Interface that defines a simple gamelist view.
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
|
|
|
|
2017-10-31 17:12:50 +00:00
|
|
|
#ifndef ES_APP_VIEWS_GAME_LIST_ISIMPLE_GAME_LIST_VIEW_H
|
|
|
|
#define ES_APP_VIEWS_GAME_LIST_ISIMPLE_GAME_LIST_VIEW_H
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-09-21 16:13:27 +00:00
|
|
|
#include "views/gamelist/IGameListView.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "components/ImageComponent.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "components/TextComponent.h"
|
2020-09-15 20:57:54 +00:00
|
|
|
|
2017-11-01 22:21:10 +00:00
|
|
|
#include <stack>
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
class ISimpleGameListView : public IGameListView
|
|
|
|
{
|
|
|
|
public:
|
2020-06-21 12:25:28 +00:00
|
|
|
ISimpleGameListView(Window* window, FileData* root);
|
2020-08-08 20:29:32 +00:00
|
|
|
virtual ~ISimpleGameListView();
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
// Called when a new file is added, a file is removed, a file's metadata changes,
|
|
|
|
// or a file's children are sorted.
|
2020-09-15 20:57:54 +00:00
|
|
|
// Note: FILE_SORTED is only reported for the topmost FileData, where the sort started.
|
|
|
|
// Since sorts are recursive, FileData's children probably changed too.
|
2020-06-25 17:52:38 +00:00
|
|
|
virtual void onFileChanged(FileData* file, FileChangeType change) override;
|
2019-08-25 15:23:02 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
// Called whenever the theme changes.
|
2020-06-25 17:52:38 +00:00
|
|
|
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-25 17:52:38 +00:00
|
|
|
virtual FileData* getCursor() override = 0;
|
|
|
|
virtual void setCursor(FileData*) override = 0;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual bool input(InputConfig* config, Input input) override;
|
2020-06-25 17:52:38 +00:00
|
|
|
virtual void launch(FileData* game) override = 0;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
protected:
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual std::string getQuickSystemSelectRightButton() = 0;
|
|
|
|
virtual std::string getQuickSystemSelectLeftButton() = 0;
|
|
|
|
virtual void populateList(const std::vector<FileData*>& files) = 0;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
TextComponent mHeaderText;
|
|
|
|
ImageComponent mHeaderImage;
|
|
|
|
ImageComponent mBackground;
|
2017-04-22 14:15:16 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
std::vector<GuiComponent*> mThemeExtras;
|
|
|
|
std::stack<FileData*> mCursorStack;
|
2014-06-25 16:29:58 +00:00
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_APP_VIEWS_GAME_LIST_ISIMPLE_GAME_LIST_VIEW_H
|