d88e931d6925eea6744f6631f680891d40eacfa8
[supertux.git] / src / supertux / menu / menu_storage.hpp
1 //  SuperTux
2 //  Copyright (C) 2009 Ingo Ruhnke <grumbel@gmail.com>
3 //
4 //  This program is free software: you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation, either version 3 of the License, or
7 //  (at your option) any later version.
8 //
9 //  This program is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //  GNU General Public License for more details.
13 //
14 //  You should have received a copy of the GNU General Public License
15 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 #ifndef HEADER_SUPERTUX_SUPERTUX_MENU_MENU_STORAGE_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_MENU_MENU_STORAGE_HPP
19
20 #include <memory>
21
22 class JoystickMenu;
23 class KeyboardMenu;
24 class Menu;
25 class OptionsMenu;
26 class ProfileMenu;
27
28 class MenuStorage
29 {
30 private:
31   static MenuStorage* s_instance;
32 public:
33   static MenuStorage& instance();
34
35 public:
36   enum MenuId {
37     NO_MENU,
38     MAIN_MENU,
39     OPTIONS_MENU,
40     INGAME_OPTIONS_MENU,
41     PROFILE_MENU,
42     CONTRIB_MENU,
43     CONTRIB_WORLD_MENU,
44     ADDON_MENU,
45     LANGUAGE_MENU,
46     KEYBOARD_MENU,
47     JOYSTICK_MENU,
48     WORLDMAP_MENU,
49     GAME_MENU,
50     CHEAT_MENU
51   };
52
53 public:
54   MenuStorage();
55   ~MenuStorage();
56
57   std::unique_ptr<Menu> create(MenuId menu_id);
58
59 private:
60   MenuStorage(const MenuStorage&);
61   MenuStorage& operator=(const MenuStorage&);
62 };
63
64 #endif
65
66 /* EOF */