src/gui/menu_manager.hpp

Go to the documentation of this file.
00001 //  SuperTux
00002 //  Copyright (C) 2009 Ingo Ruhnke <grumbel@gmx.de>
00003 //
00004 //  This program is free software: you can redistribute it and/or modify
00005 //  it under the terms of the GNU General Public License as published by
00006 //  the Free Software Foundation, either version 3 of the License, or
00007 //  (at your option) any later version.
00008 //
00009 //  This program is distributed in the hope that it will be useful,
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 //  GNU General Public License for more details.
00013 //
00014 //  You should have received a copy of the GNU General Public License
00015 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017 #ifndef HEADER_SUPERTUX_GUI_MENU_MANAGER_HPP
00018 #define HEADER_SUPERTUX_GUI_MENU_MANAGER_HPP
00019 
00020 #include <vector>
00021 #include <list>
00022 
00023 class Menu;
00024 
00025 class MenuManager
00026 {
00027 public:
00028   static std::vector<Menu*> last_menus;
00029   static Menu* previous;
00030   static Menu* current_;
00031 
00032 public:
00034   static std::list<Menu*>   all_menus;
00035 
00036 public:
00038   static void set_current(Menu* pmenu);
00039 
00040   static void push_current(Menu* pmenu);
00041   static void pop_current();
00042 
00043   static void recalc_pos();
00044 
00046   static Menu* current()
00047   {
00048     return current_;
00049   }
00050 
00051 private:
00052   MenuManager(const MenuManager&);
00053   MenuManager& operator=(const MenuManager&);
00054 };
00055 
00056 #endif
00057 
00058 /* EOF */

Generated on Mon Jun 9 03:38:18 2014 for SuperTux by  doxygen 1.5.1