#include <theme.hpp>
Public Member Functions | |
theme (const config &cfg, const SDL_Rect &screen) | |
bool | set_resolution (const SDL_Rect &screen) |
void | modify (const config *cfg) |
const std::vector< panel > & | panels () const |
const std::vector< label > & | labels () const |
const std::vector< menu > & | menus () const |
const menu * | context_menu () const |
menu * | refresh_title (const std::string &id, const std::string &new_title) |
menu * | refresh_title2 (const std::string &id, const std::string &title_tag) |
const status_item * | get_status_item (const std::string &item) const |
const SDL_Rect & | main_map_location (const SDL_Rect &screen) const |
const SDL_Rect & | mini_map_location (const SDL_Rect &screen) const |
const SDL_Rect & | unit_image_location (const SDL_Rect &screen) const |
const tborder & | border () const |
events::generic_event & | theme_reset () |
Static Public Member Functions | |
static void | set_known_themes (const config *cfg) |
static std::vector< std::string > | get_known_themes () |
Private Member Functions | |
theme::object & | find_element (std::string id) |
void | add_object (const config &cfg) |
void | remove_object (std::string id) |
void | set_object_location (theme::object &element, std::string rect_str, std::string ref_id) |
Private Attributes | |
events::generic_event | theme_reset_ |
std::string | cur_theme |
config | cfg_ |
std::vector< panel > | panels_ |
std::vector< label > | labels_ |
std::vector< menu > | menus_ |
menu | context_ |
std::map< std::string, status_item > | status_ |
object | main_map_ |
object | mini_map_ |
object | unit_image_ |
tborder | border_ |
Static Private Attributes | |
static std::map< std::string, config > | known_themes |
Classes | |
class | label |
class | menu |
class | object |
class | panel |
class | status_item |
struct | tborder |
Definition at line 31 of file theme.hpp.
theme::theme | ( | const config & | cfg, | |
const SDL_Rect & | screen | |||
) | [explicit] |
Definition at line 502 of file theme.cpp.
References cfg_, do_resolve_rects(), expand_partialresolution(), and set_resolution().
bool theme::set_resolution | ( | const SDL_Rect & | screen | ) |
Definition at line 511 of file theme.cpp.
References add_object(), cfg_, lg::err, config::get_children(), labels_, LOG_DP, LOG_STREAM, menus_, events::generic_event::notify_observers(), panels_, status_, and theme_reset_.
Referenced by display::redraw_everything(), and theme().
void theme::modify | ( | const config * | cfg | ) |
Definition at line 667 of file theme.cpp.
References add_object(), find_element(), config::get_children(), theme::object::get_id(), menus_, remove_object(), and set_object_location().
Referenced by replay_controller::rebuild_replay_theme().
const std::vector<panel>& theme::panels | ( | ) | const [inline] |
Definition at line 198 of file theme.hpp.
References panels_.
Referenced by display::draw_all_panels().
const std::vector<label>& theme::labels | ( | ) | const [inline] |
Definition at line 199 of file theme.hpp.
References labels_.
Referenced by display::draw_all_panels().
const std::vector<menu>& theme::menus | ( | ) | const [inline] |
Definition at line 200 of file theme.hpp.
References menus_.
Referenced by display::create_buttons(), display::enable_menu(), map_editor::load_tooltips(), display::menu_pressed(), and map_editor::update_l_button_palette().
const menu* theme::context_menu | ( | ) | const [inline] |
Definition at line 202 of file theme.hpp.
References context_, and theme::menu::is_context().
Referenced by play_controller::handle_event(), and events::mouse_handler::mouse_press().
theme::menu * theme::refresh_title | ( | const std::string & | id, | |
const std::string & | new_title | |||
) |
Definition at line 760 of file theme.cpp.
References menus_, and theme::menu::set_title().
Referenced by refresh_title2(), and playmp_controller::set_end_scenario_button().
theme::menu * theme::refresh_title2 | ( | const std::string & | id, | |
const std::string & | title_tag | |||
) |
Definition at line 773 of file theme.cpp.
References cfg_, find_ref(), and refresh_title().
Referenced by playsingle_controller::linger(), and playmp_controller::reset_end_scenario_button().
const theme::status_item * theme::get_status_item | ( | const std::string & | item | ) | const |
Definition at line 725 of file theme.cpp.
References status_.
Referenced by display::refresh_report().
const SDL_Rect& theme::main_map_location | ( | const SDL_Rect & | screen | ) | const [inline] |
Definition at line 212 of file theme.hpp.
References theme::object::location(), and main_map_.
Referenced by display::map_outside_area().
const SDL_Rect& theme::mini_map_location | ( | const SDL_Rect & | screen | ) | const [inline] |
Definition at line 214 of file theme.hpp.
References theme::object::location(), and mini_map_.
Referenced by display::minimap_area().
const SDL_Rect& theme::unit_image_location | ( | const SDL_Rect & | screen | ) | const [inline] |
Definition at line 216 of file theme.hpp.
References theme::object::location(), and unit_image_.
Referenced by display::unit_image_area().
void theme::set_known_themes | ( | const config * | cfg | ) | [static] |
Definition at line 735 of file theme.cpp.
References config::get_children(), and known_themes.
Referenced by play_controller::init().
std::vector< std::string > theme::get_known_themes | ( | ) | [static] |
Definition at line 750 of file theme.cpp.
References known_themes.
Referenced by preferences::show_theme_dialog().
const tborder& theme::border | ( | ) | const [inline] |
Definition at line 222 of file theme.hpp.
References border_.
Referenced by display::bounds_check_position(), display::draw_border(), display::draw_init(), display::draw_minimap(), display::get_location_x(), display::get_location_y(), display::get_rect_hex_bounds(), display::get_terrain_images(), display::max_map_area(), and display::pixel_position_to_hex().
events::generic_event& theme::theme_reset | ( | ) | [inline] |
Definition at line 224 of file theme.hpp.
References theme_reset_.
Referenced by replay_controller::init_replay_display(), and replay_controller::~replay_controller().
theme::object & theme::find_element | ( | std::string | id | ) | [private] |
Definition at line 707 of file theme.cpp.
References labels_, main_map_, menus_, mini_map_, panels_, and unit_image_.
Referenced by modify(), and set_object_location().
void theme::add_object | ( | const config & | cfg | ) | [private] |
Definition at line 569 of file theme.cpp.
References config::all_children(), border_, config::child(), context_, DBG_DP, config::get_children(), theme::menu::is_context(), labels_, main_map_, menus_, mini_map_, panels_, set_object_location(), status_, and unit_image_.
Referenced by modify(), and set_resolution().
void theme::remove_object | ( | std::string | id | ) | [private] |
void theme::set_object_location | ( | theme::object & | element, | |
std::string | rect_str, | |||
std::string | ref_id | |||
) | [private] |
Definition at line 653 of file theme.cpp.
References find_element(), theme::object::get_id(), theme::object::get_location(), theme::object::modify_location(), and ref_rect.
Referenced by add_object(), and modify().
events::generic_event theme::theme_reset_ [private] |
std::map< std::string, config > theme::known_themes [static, private] |
std::string theme::cur_theme [private] |
config theme::cfg_ [private] |
Definition at line 238 of file theme.hpp.
Referenced by refresh_title2(), set_resolution(), and theme().
std::vector<panel> theme::panels_ [private] |
Definition at line 239 of file theme.hpp.
Referenced by add_object(), find_element(), panels(), remove_object(), and set_resolution().
std::vector<label> theme::labels_ [private] |
Definition at line 240 of file theme.hpp.
Referenced by add_object(), find_element(), labels(), remove_object(), and set_resolution().
std::vector<menu> theme::menus_ [private] |
Definition at line 241 of file theme.hpp.
Referenced by add_object(), find_element(), menus(), modify(), refresh_title(), remove_object(), and set_resolution().
menu theme::context_ [private] |
std::map<std::string,status_item> theme::status_ [private] |
Definition at line 245 of file theme.hpp.
Referenced by add_object(), get_status_item(), and set_resolution().
object theme::main_map_ [private] |
Definition at line 247 of file theme.hpp.
Referenced by add_object(), find_element(), and main_map_location().
object theme::mini_map_ [private] |
Definition at line 247 of file theme.hpp.
Referenced by add_object(), find_element(), and mini_map_location().
object theme::unit_image_ [private] |
Definition at line 247 of file theme.hpp.
Referenced by add_object(), find_element(), and unit_image_location().
tborder theme::border_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |