1 #pragma once
2 #ifndef ES_APP_VIEWS_GAME_LIST_ISIMPLE_GAME_LIST_VIEW_H
3 #define ES_APP_VIEWS_GAME_LIST_ISIMPLE_GAME_LIST_VIEW_H
4 
5 #include "components/ImageComponent.h"
6 #include "components/TextComponent.h"
7 #include "views/gamelist/IGameListView.h"
8 #include <stack>
9 
10 class ISimpleGameListView : public IGameListView
11 {
12 public:
13 	ISimpleGameListView(Window* window, FileData* root);
~ISimpleGameListView()14 	virtual ~ISimpleGameListView() {}
15 
16 	// Called when a new file is added, a file is removed, a file's metadata changes, or a file's children are sorted.
17 	// NOTE: FILE_SORTED is only reported for the topmost FileData, where the sort started.
18 	//       Since sorts are recursive, that FileData's children probably changed too.
19 	virtual void onFileChanged(FileData* file, FileChangeType change);
20 
21 	// Called whenever the theme changes.
22 	virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme);
23 
24 	virtual FileData* getCursor() = 0;
25 	virtual void setCursor(FileData*) = 0;
26 
27 	virtual bool input(InputConfig* config, Input input) override;
28 	virtual void launch(FileData* game) = 0;
29 
30 protected:
31 	virtual std::string getQuickSystemSelectRightButton() = 0;
32 	virtual std::string getQuickSystemSelectLeftButton() = 0;
33 	virtual void populateList(const std::vector<FileData*>& files) = 0;
34 
35 	TextComponent mHeaderText;
36 	ImageComponent mHeaderImage;
37 	ImageComponent mBackground;
38 
39 	std::vector<GuiComponent*> mThemeExtras;
40 
41 	std::stack<FileData*> mCursorStack;
42 };
43 
44 #endif // ES_APP_VIEWS_GAME_LIST_ISIMPLE_GAME_LIST_VIEW_H
45