| 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_GUI_MENU_MANAGER_HPP | 
|---|
| 18 | #define | 
|---|
| 19 |  | 
|---|
| 20 | #include <memory> | 
|---|
| 21 | #include <vector> | 
|---|
| 22 |  | 
|---|
| 23 | class Controller; | 
|---|
| 24 | class Dialog; | 
|---|
| 25 | class DrawingContext; | 
|---|
| 26 | class ; | 
|---|
| 27 | class ; | 
|---|
| 28 | union SDL_Event; | 
|---|
| 29 |  | 
|---|
| 30 | class  final | 
|---|
| 31 | { | 
|---|
| 32 | private: | 
|---|
| 33 | static MenuManager* ; | 
|---|
| 34 | public: | 
|---|
| 35 | static MenuManager& (); | 
|---|
| 36 |  | 
|---|
| 37 | private: | 
|---|
| 38 | std::unique_ptr<Dialog> ; | 
|---|
| 39 | bool ; | 
|---|
| 40 | std::unique_ptr<Dialog> ; | 
|---|
| 41 |  | 
|---|
| 42 | std::vector<std::unique_ptr<Menu> > ; | 
|---|
| 43 | std::unique_ptr<MenuTransition> ; | 
|---|
| 44 |  | 
|---|
| 45 | public: | 
|---|
| 46 | (); | 
|---|
| 47 | (); | 
|---|
| 48 |  | 
|---|
| 49 | void (const SDL_Event& event); | 
|---|
| 50 | void (const Controller& controller); | 
|---|
| 51 | void (); | 
|---|
| 52 |  | 
|---|
| 53 | void (DrawingContext& context); | 
|---|
| 54 |  | 
|---|
| 55 | void (std::unique_ptr<Dialog> dialog); | 
|---|
| 56 |  | 
|---|
| 57 | void (int id); | 
|---|
| 58 | void (std::unique_ptr<Menu> ); | 
|---|
| 59 | void (int id); | 
|---|
| 60 | void (std::unique_ptr<Menu> ); | 
|---|
| 61 | void (); | 
|---|
| 62 | void (); | 
|---|
| 63 |  | 
|---|
| 64 | void (); | 
|---|
| 65 | bool () const | 
|---|
| 66 | { | 
|---|
| 67 | return !m_menu_stack.empty(); | 
|---|
| 68 | } | 
|---|
| 69 |  | 
|---|
| 70 | Menu* () const; | 
|---|
| 71 |  | 
|---|
| 72 | private: | 
|---|
| 73 | void (Menu* from, Menu* to); | 
|---|
| 74 |  | 
|---|
| 75 | private: | 
|---|
| 76 | (const MenuManager&) = delete; | 
|---|
| 77 | MenuManager& (const MenuManager&) = delete; | 
|---|
| 78 | }; | 
|---|
| 79 |  | 
|---|
| 80 | #endif | 
|---|
| 81 |  | 
|---|
| 82 | /* EOF */ | 
|---|
| 83 |  | 
|---|