00001 /* $Id: editor_generate_map.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2008 - 2012 by Mark de Wever <koraq@xs4all.nl> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 #ifndef GUI_DIALOGS_EDITOR_GENERATE_MAP_HPP_INCLUDED 00017 #define GUI_DIALOGS_EDITOR_GENERATE_MAP_HPP_INCLUDED 00018 00019 #include "gui/dialogs/dialog.hpp" 00020 00021 class map_generator; 00022 class display; 00023 00024 namespace gui2 { 00025 00026 class tlabel; 00027 00028 /** The dialog for selecting which random generator to use in the editor. */ 00029 class teditor_generate_map 00030 : public tdialog 00031 { 00032 public: 00033 teditor_generate_map(); 00034 00035 /** Callback for the settings button */ 00036 void do_settings(twindow& window); 00037 00038 /** Callback for the next generator button */ 00039 void do_next_generator(twindow& window); 00040 00041 void set_map_generators(std::vector<map_generator*> mg) 00042 { 00043 map_generators_ = mg; 00044 } 00045 00046 std::vector<map_generator*> get_map_generators() { return map_generators_; } 00047 00048 map_generator* get_selected_map_generator(); 00049 00050 void update_current_generator_label(twindow& window); 00051 00052 void set_gui(display* d) { gui_ = d; } 00053 display* get_gui() { return gui_; } 00054 00055 private: 00056 00057 /** Inherited from tdialog, implemented by REGISTER_DIALOG. */ 00058 virtual const std::string& window_id() const; 00059 00060 /** Inherited from tdialog. */ 00061 void pre_show(CVideo& video, twindow& window); 00062 00063 /** Available map generators */ 00064 std::vector<map_generator*> map_generators_; 00065 00066 /** Current map generator index */ 00067 int current_map_generator_; 00068 00069 /** Label for the current map generator */ 00070 tlabel* current_generator_label_; 00071 00072 /** Needed for the old-style map generator settings dialog */ 00073 display* gui_; 00074 }; 00075 00076 } // namespace gui2 00077 00078 #endif 00079
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:02:42 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |