#include <editor_display.hpp>


Public Member Functions | |
| editor_display (unit_map *units, CVideo &video, const editor_map *map, const std::vector< team > *t, const config &theme_cfg, const config &level) | |
| bool | in_editor () const |
| void | add_brush_loc (const map_location &hex) |
| void | set_brush_locs (const std::set< map_location > &hexes) |
| void | clear_brush_locs () |
| void | remove_brush_loc (const map_location &hex) |
| const editor_map & | map () const |
| void | rebuild_terrain (const map_location &loc) |
| void | set_toolbar_hint (const std::string &value) |
| void | set_palette_report (const config &palette_report) |
Protected Member Functions | |
| void | pre_draw () |
| Called near the beginning of each draw() call. | |
| image::TYPE | get_image_type (const map_location &loc) |
| The editor uses different rules for terrain highlighting (e.g. | |
| void | draw_hex (const map_location &loc) |
| Redraws a single gamemap location. | |
| const SDL_Rect & | get_clip_rect () |
| Get the clipping rectangle for drawing. | |
| void | draw_sidebar () |
| Called near the end of a draw operation, derived classes can use this to render a specific sidebar. | |
Protected Attributes | |
| std::set< map_location > | brush_locations_ |
| std::string | toolbar_hint_ |
Private Attributes | |
| config | palette_report_ |
Definition at line 24 of file editor_display.hpp.
| editor::editor_display::editor_display | ( | unit_map * | units, | |
| CVideo & | video, | |||
| const editor_map * | map, | |||
| const std::vector< team > * | t, | |||
| const config & | theme_cfg, | |||
| const config & | level | |||
| ) |
Definition at line 22 of file editor_display.cpp.
References display::clear_screen().

| void editor::editor_display::add_brush_loc | ( | const map_location & | hex | ) |
Definition at line 32 of file editor_display.cpp.
References brush_locations_, and display::invalidate().

| void editor::editor_display::clear_brush_locs | ( | ) |
Definition at line 45 of file editor_display.cpp.
References brush_locations_, and display::invalidate().

| void editor::editor_display::draw_hex | ( | const map_location & | loc | ) | [protected, virtual] |
Redraws a single gamemap location.
Reimplemented from display.
Definition at line 73 of file editor_display.cpp.
References brush_locations_, display::drawing_buffer_add(), game_config::images::editor_brush, image::get_image(), display::get_location_x(), display::get_location_y(), display::LAYER_FOG_SHROUD, display::LAYER_MOUSEOVER_BOTTOM, display::LAYER_SELECTED_HEX, map(), display::mouseoverHex_, image::SCALED_TO_HEX, and image::TOD_COLORED.

| void editor::editor_display::draw_sidebar | ( | ) | [protected, virtual] |
Called near the end of a draw operation, derived classes can use this to render a specific sidebar.
Very similar to post_commit.
Reimplemented from display.
Definition at line 101 of file editor_display.cpp.
References config::add_child(), display::get_map(), gamemap::get_terrain_editor_string(), display::mouseoverHex_, palette_report_, display::refresh_report(), str_cast(), and toolbar_hint_.

| const SDL_Rect & editor::editor_display::get_clip_rect | ( | ) | [protected, virtual] |
Get the clipping rectangle for drawing.
Virtual since the editor might use a slightly different approach.
Reimplemented from display.
Definition at line 96 of file editor_display.cpp.
References display::map_outside_area().

| image::TYPE editor::editor_display::get_image_type | ( | const map_location & | loc | ) | [protected, virtual] |
The editor uses different rules for terrain highlighting (e.g.
selections)
Reimplemented from display.
Definition at line 65 of file editor_display.cpp.
References map().

| bool editor::editor_display::in_editor | ( | ) | const [inline, virtual] |
Reimplemented from display.
Definition at line 30 of file editor_display.hpp.
| const editor_map& editor::editor_display::map | ( | ) | const [inline] |
Definition at line 36 of file editor_display.hpp.
References display::get_map().
Referenced by editor::mouse_action_select::affected_hexes(), editor::mouse_action_unit::click_left(), editor::mouse_action_paint::click_left(), editor::mouse_action_map_label::drag_left(), draw_hex(), get_image_type(), editor::mouse_action_map_label::up_left(), and editor::mouse_action_map_label::up_right().


| void editor::editor_display::pre_draw | ( | ) | [protected, virtual] |
Called near the beginning of each draw() call.
Derived classes can use this to add extra actions before redrawing invalidated hexes takes place. No action here by default.
Reimplemented from display.
Definition at line 61 of file editor_display.cpp.
| void editor::editor_display::rebuild_terrain | ( | const map_location & | loc | ) |
Definition at line 57 of file editor_display.cpp.
References display::builder_.
Referenced by editor::context_manager::refresh_after_action().

| void editor::editor_display::remove_brush_loc | ( | const map_location & | hex | ) |
Definition at line 51 of file editor_display.cpp.
References brush_locations_, and display::invalidate().

| void editor::editor_display::set_brush_locs | ( | const std::set< map_location > & | hexes | ) |
Definition at line 38 of file editor_display.cpp.
References brush_locations_, and display::invalidate().

| void editor::editor_display::set_palette_report | ( | const config & | palette_report | ) | [inline] |
Definition at line 40 of file editor_display.hpp.
References palette_report_.
Referenced by editor::editor_toolkit::hotkey_set_mouse_action(), and editor::editor_palette< Item >::set_group().

| void editor::editor_display::set_toolbar_hint | ( | const std::string & | value | ) | [inline] |
Definition at line 38 of file editor_display.hpp.
References toolbar_hint_.
std::set<map_location> editor::editor_display::brush_locations_ [protected] |
Definition at line 54 of file editor_display.hpp.
Referenced by add_brush_loc(), clear_brush_locs(), draw_hex(), remove_brush_loc(), and set_brush_locs().
Definition at line 58 of file editor_display.hpp.
Referenced by draw_sidebar(), and set_palette_report().
std::string editor::editor_display::toolbar_hint_ [protected] |
Definition at line 55 of file editor_display.hpp.
Referenced by draw_sidebar(), and set_toolbar_hint().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:39 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |