00001 /* $Id: editor_display.hpp 53966 2012-04-22 13:52:28Z mordante $ */ 00002 /* 00003 Copyright (C) 2008 - 2012 by Tomasz Sniatowski <kailoran@gmail.com> 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 EDITOR_EDITOR_DISPLAY_HPP_INCLUDED 00017 #define EDITOR_EDITOR_DISPLAY_HPP_INCLUDED 00018 00019 #include "map/editor_map.hpp" 00020 #include "../display.hpp" 00021 00022 namespace editor { 00023 00024 class editor_display : public display 00025 { 00026 public: 00027 editor_display(unit_map* units, CVideo& video, const editor_map* map, 00028 const std::vector<team>* t, const config& theme_cfg, const config& level); 00029 00030 bool in_editor() const { return true; } 00031 00032 void add_brush_loc(const map_location& hex); 00033 void set_brush_locs(const std::set<map_location>& hexes); 00034 void clear_brush_locs(); 00035 void remove_brush_loc(const map_location& hex); 00036 const editor_map& map() const { return static_cast<const editor_map&>(get_map()); } 00037 void rebuild_terrain(const map_location &loc); 00038 void set_toolbar_hint(const std::string& value) { toolbar_hint_ = value; } 00039 00040 void set_palette_report(const config& palette_report) {palette_report_ = palette_report;}; 00041 00042 protected: 00043 void pre_draw(); 00044 /** 00045 * The editor uses different rules for terrain highlighting (e.g. selections) 00046 */ 00047 image::TYPE get_image_type(const map_location& loc); 00048 00049 void draw_hex(const map_location& loc); 00050 00051 const SDL_Rect& get_clip_rect(); 00052 void draw_sidebar(); 00053 00054 std::set<map_location> brush_locations_; 00055 std::string toolbar_hint_; 00056 00057 private: 00058 config palette_report_; 00059 }; 00060 00061 } //end namespace editor 00062 #endif
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:02:34 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |