editor_dialogs.hpp

Go to the documentation of this file.
00001 /* $Id: editor_dialogs.hpp 25168 2008-03-26 18:38:50Z boucman $ */
00002 /*
00003   Copyright (C) 2003 - 2008 by David White <dave@whitevine.net>
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 version 2
00008   or at your option any later version.
00009   This program is distributed in the hope that it will be useful,
00010   but WITHOUT ANY WARRANTY.
00011 
00012   See the COPYING file for more details.
00013 */
00014 
00015 //! @file editor/editor_dialogs.hpp
00016 //!
00017 
00018 #include "../display.hpp"
00019 #include "../config.hpp"
00020 #include "../map.hpp"
00021 
00022 #include "map_manip.hpp"
00023 
00024 #include <map>
00025 
00026 #ifndef EDITOR_DIALOGS_H_INCLUDED
00027 #define EDITOR_DIALOGS_H_INCLUDED
00028 
00029 namespace map_editor {
00030 
00031 //! Notify the user that the map is changed and ask if the user wants to
00032 //! proceed. Return true if yes is answered.
00033 bool confirm_modification_disposal(display &disp);
00034 
00035 //! Show a dialog to create new map. If confirmation_needed is true, the
00036 //! user will be asked if she wants to continue even though the changes
00037 //! to the current map is lost. fill_terrain will be used to fill the
00038 //! map if a new one is created. Return the string representation of the
00039 //! new map, or the empty string if the operation failed or was
00040 //! cancelled.
00041 std::string new_map_dialog(display &disp, const t_translation::t_terrain fill_terrain,
00042    const bool confirmation_needed, const config &gconfig);
00043 
00044 //! Show a dialog where the user may set the preferences used in the
00045 //! editor.
00046 void preferences_dialog(display &disp, config &prefs);
00047 
00048 //! Show a dialog asking for the new size of the map. Return the chosen
00049 //! width and height. Checks are made to see that the desired values
00050 //! will result in a feasible map.
00051 bool resize_dialog(display &disp, unsigned& width, unsigned& height,
00052     int& x_offset, int& y_offset, bool& do_expand);
00053 
00054 FLIP_AXIS flip_dialog(display &disp);
00055 
00056 }
00057 
00058 
00059 #endif // DIALOGS_H_INCLUDED

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs