22 #ifndef GUI_LAUNCHER_DIALOG_H 23 #define GUI_LAUNCHER_DIALOG_H 26 #ifdef DISABLE_FANCY_THEMES 27 #define DISABLE_LAUNCHERDISPLAY_GRID 29 #define kSwitchLauncherDialog -2 31 #include "common/hashmap.h" 33 #include "gui/dialog.h" 34 #include "gui/widgets/popup.h" 35 #include "gui/MetadataParser.h" 37 #include "engines/game.h" 41 enum LauncherDisplayType {
42 kLauncherDisplayList = 1,
43 kLauncherDisplayGrid = 2
83 class EntryContainerWidget;
104 key(k), engineid(e), gameid(g),
description(d), title(t), domain(v) {
115 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
117 virtual LauncherDisplayType getType()
const = 0;
128 #ifndef DISABLE_FANCY_THEMES 146 GroupingMethod _groupBy;
152 #ifndef DISABLE_LAUNCHERDISPLAY_GRID 160 void addLayoutChooserButtons();
162 #endif // !DISABLE_LAUNCHERDISPLAY_GRID 164 void reflowLayout()
override;
170 virtual void updateListing(
int selPos = -1) = 0;
172 virtual int getItemPos(
int item) = 0;
174 virtual void updateButtons() = 0;
176 virtual void build();
179 void open()
override;
180 void close()
override;
185 virtual void addGame();
191 void removeGame(
int item);
215 virtual void updateSelectionAfterRemoval() = 0;
228 void editGame(
int item);
233 void recordGame(
int item);
238 void loadGame(
int item);
249 virtual int getSelected() = 0;
253 bool checkModifier(
int modifier);
265 void reflowLayout()
override;
266 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
268 static const uint32 kRemovalYes = 1;
269 static const uint32 kRemovalNo = 2;
272 static const int kHorizontalMargin = 10;
273 static const int kButtonSpacing = 10;
274 static const int kGamePadding = 10;
277 const int _buttonWidth;
278 const int _buttonHeight;
279 const int _scrollbarWidth;
300 void selectLauncher();
308 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
311 LauncherDisplayType getType()
const override {
return kLauncherDisplayList; }
314 void updateSelectionAfterRemoval()
override;
316 void updateListing(
int selPos = -1)
override;
317 int getItemPos(
int item)
override;
319 void updateButtons()
override;
321 int getSelected()
override;
322 void build()
override;
const char * name
Definition: launcher.h:61
Definition: launcher.h:108
Definition: edittext.h:32
Definition: launcher.h:303
Definition: printman.h:30
Definition: launcher.h:94
Definition: saveload.h:32
GroupingMethod id
Definition: launcher.h:76
Definition: config-manager.h:59
Definition: launcher.h:57
Definition: launcher.h:291
const char * description
Definition: launcher.h:66
const char * lowresDescription
Definition: launcher.h:71
Definition: keyboard.h:294
Definition: launcher.h:260