#include <map_label.hpp>
Public Types | |
typedef std::map < gamemap::location, const terrain_label * > | label_map |
typedef std::map< std::string, label_map > | team_label_map |
Public Member Functions | |
map_labels (const display &disp, const gamemap &map, const team *) | |
map_labels (const display &disp, const config &cfg, const gamemap &map, const team *, const variable_set *variables) | |
~map_labels () | |
void | write (config &res) const |
void | read (const config &cfg, const variable_set *variables) |
const terrain_label * | get_label (const gamemap::location &loc, const std::string &team_name) |
const terrain_label * | get_label (const gamemap::location &loc) |
const terrain_label * | set_label (const gamemap::location &loc, const std::string &text, const std::string team="", const SDL_Color colour=font::NORMAL_COLOUR) |
void | add_label (const gamemap::location &, const terrain_label *) |
void | clear (const std::string &) |
void | scroll (double xmove, double ymove) |
void | recalculate_labels () |
bool | visible_global_label (const gamemap::location &) const |
void | recalculate_shroud () |
const display & | disp () const |
const std::string & | team_name () const |
void | set_team (const team *) |
Static Public Member Functions | |
static size_t | get_max_chars () |
Private Member Functions | |
void | clear_map (const label_map &) |
void | clear_all () |
map_labels (const map_labels &) | |
void | operator= (const map_labels &) |
Private Attributes | |
const display & | disp_ |
const team * | team_ |
const gamemap & | map_ |
team_label_map | labels_ |
label_map | label_cache_ |
Definition at line 33 of file map_label.hpp.
typedef std::map<gamemap::location,const terrain_label*> map_labels::label_map |
Definition at line 36 of file map_label.hpp.
typedef std::map<std::string,label_map> map_labels::team_label_map |
Definition at line 37 of file map_label.hpp.
Definition at line 38 of file map_label.cpp.
map_labels::map_labels | ( | const display & | disp, | |
const config & | cfg, | |||
const gamemap & | map, | |||
const team * | team, | |||
const variable_set * | variables | |||
) |
map_labels::~map_labels | ( | ) |
map_labels::map_labels | ( | const map_labels & | ) | [private] |
void map_labels::write | ( | config & | res | ) | const |
Definition at line 64 of file map_label.cpp.
References config::add_child(), and labels_.
Referenced by events::menu_handler::write_game_snapshot().
void map_labels::read | ( | const config & | cfg, | |
const variable_set * | variables | |||
) |
Definition at line 78 of file map_label.cpp.
References add_label(), clear_all(), config::get_children(), loc, and recalculate_labels().
Referenced by map_labels(), and playsingle_controller::play_scenario().
size_t map_labels::get_max_chars | ( | ) | [static] |
Definition at line 92 of file map_label.cpp.
References max_label_size.
Referenced by terrain_label::check_text_length(), and events::menu_handler::label_terrain().
const terrain_label * map_labels::get_label | ( | const gamemap::location & | loc, | |
const std::string & | team_name | |||
) |
Definition at line 97 of file map_label.cpp.
References labels_.
Referenced by events::menu_handler::do_search(), get_label(), and events::menu_handler::label_terrain().
const terrain_label * map_labels::get_label | ( | const gamemap::location & | loc | ) |
const terrain_label * map_labels::set_label | ( | const gamemap::location & | loc, | |
const std::string & | text, | |||
const std::string | team = "" , |
|||
const SDL_Color | colour = font::NORMAL_COLOUR | |||
) |
Definition at line 144 of file map_label.cpp.
References add_label(), preferences::erase(), and labels_.
Referenced by do_replay_handle(), and events::menu_handler::label_terrain().
void map_labels::add_label | ( | const gamemap::location & | loc, | |
const terrain_label * | new_label | |||
) |
Definition at line 213 of file map_label.cpp.
References labels_, and terrain_label::team_name().
Referenced by read(), and set_label().
void map_labels::clear | ( | const std::string & | team_name | ) |
Definition at line 228 of file map_label.cpp.
References clear_map(), and labels_.
Referenced by events::menu_handler::clear_labels(), clear_map(), and do_replay_handle().
void map_labels::scroll | ( | double | xmove, | |
double | ymove | |||
) |
void map_labels::recalculate_labels | ( | ) |
Definition at line 272 of file map_label.cpp.
References labels_.
Referenced by read(), display::redraw_everything(), game_display::set_team(), and display::set_zoom().
bool map_labels::visible_global_label | ( | const gamemap::location & | loc | ) | const |
Definition at line 283 of file map_label.cpp.
References labels_, and team_name().
Referenced by terrain_label::visible().
void map_labels::recalculate_shroud | ( | ) |
const display & map_labels::disp | ( | ) | const |
Definition at line 120 of file map_label.cpp.
References disp_.
Referenced by terrain_label::calculate_shroud(), and terrain_label::draw().
const std::string & map_labels::team_name | ( | ) | const |
Definition at line 125 of file map_label.cpp.
References team_, and team::team_name().
Referenced by get_label(), events::menu_handler::label_terrain(), terrain_label::visible(), and visible_global_label().
void map_labels::set_team | ( | const team * | team | ) |
Definition at line 135 of file map_label.cpp.
References team_.
Referenced by game_display::set_team().
void map_labels::clear_map | ( | const label_map & | m | ) | [private] |
Definition at line 243 of file map_label.cpp.
References clear().
Referenced by clear(), and clear_all().
void map_labels::clear_all | ( | ) | [private] |
Definition at line 252 of file map_label.cpp.
References clear_map(), and labels_.
Referenced by read(), and ~map_labels().
void map_labels::operator= | ( | const map_labels & | ) | [private] |
const display& map_labels::disp_ [private] |
const team* map_labels::team_ [private] |
const gamemap& map_labels::map_ [private] |
Definition at line 82 of file map_label.hpp.
team_label_map map_labels::labels_ [private] |
Definition at line 84 of file map_label.hpp.
Referenced by add_label(), clear(), clear_all(), get_label(), recalculate_labels(), recalculate_shroud(), scroll(), set_label(), visible_global_label(), and write().
label_map map_labels::label_cache_ [private] |
Definition at line 85 of file map_label.hpp.
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |