theme Class Reference

#include <theme.hpp>

Collaboration diagram for theme:

Collaboration graph
[legend]

List of all members.

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 menucontext_menu () const
menurefresh_title (const std::string &id, const std::string &new_title)
menurefresh_title2 (const std::string &id, const std::string &title_tag)
const status_itemget_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 tborderborder () const
events::generic_eventtheme_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::objectfind_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< panelpanels_
std::vector< labellabels_
std::vector< menumenus_
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


Detailed Description

Definition at line 31 of file theme.hpp.


Constructor & Destructor Documentation

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().


Member Function Documentation

bool theme::set_resolution ( const SDL_Rect &  screen  ) 

void theme::modify ( const config cfg  ) 

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]

const menu* theme::context_menu (  )  const [inline]

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 
)

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]

events::generic_event& theme::theme_reset (  )  [inline]

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]

void theme::remove_object ( std::string  id  )  [private]

Definition at line 632 of file theme.cpp.

References labels_, menus_, and panels_.

Referenced by modify().

void theme::set_object_location ( theme::object element,
std::string  rect_str,
std::string  ref_id 
) [private]


Member Data Documentation

Definition at line 234 of file theme.hpp.

Referenced by set_resolution(), and theme_reset().

std::map< std::string, config > theme::known_themes [static, private]

Definition at line 236 of file theme.hpp.

Referenced by get_known_themes(), and set_known_themes().

std::string theme::cur_theme [private]

Definition at line 237 of file theme.hpp.

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]

menu theme::context_ [private]

Definition at line 243 of file theme.hpp.

Referenced by add_object(), and context_menu().

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().

Definition at line 247 of file theme.hpp.

Referenced by add_object(), find_element(), and main_map_location().

Definition at line 247 of file theme.hpp.

Referenced by add_object(), find_element(), and mini_map_location().

Definition at line 247 of file theme.hpp.

Referenced by add_object(), find_element(), and unit_image_location().

Definition at line 249 of file theme.hpp.

Referenced by add_object(), and border().


The documentation for this class was generated from the following files:

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