30 #include <SDL2/SDL_rect.h>
105 explicit label(std::size_t
sw, std::size_t sh,
const config& cfg);
154 explicit panel(std::size_t
sw, std::size_t sh,
const config& cfg);
168 explicit action(std::size_t
sw, std::size_t sh,
const config& cfg);
197 explicit slider(std::size_t
sw, std::size_t sh,
const config& cfg);
221 explicit menu(std::size_t
sw, std::size_t sh,
const config& cfg);
247 explicit theme(
const config& cfg,
const SDL_Rect& screen);
266 object*
refresh_title(
const std::string&
id,
const std::string& new_title);
267 object*
refresh_title2(
const std::string&
id,
const std::string& title_tag);
268 void modify_label(
const std::string&
id,
const std::string& text);
308 std::map<std::string, std::unique_ptr<status_item>>
status_;
A config object defines a single node in a WML file, with access to child nodes.
A class grating read only view to a vector of config objects, viewed as one config with all children ...
bool tooltip_name_prepend_
void set_title(const std::string &new_title)
const std::string tooltip(std::size_t index) const
const std::string & overlay() const
std::vector< std::string > items_
const std::string & image() const
const std::string & type() const
const std::string & title() const
const std::vector< std::string > & items() const
const std::string & text() const
const std::string & icon() const
std::size_t font_size() const
void set_text(const std::string &text)
bool font_rgb_set() const
virtual rect & location(const SDL_Rect &screen) const
void modify_location(const _rect &rect)
const rect & get_location() const
static ANCHORING read_anchor(const std::string &str)
const std::string & get_id() const
panel(std::size_t sw, std::size_t sh, const config &cfg)
const std::string & image() const
void set_title(const std::string &new_title)
const std::string & title() const
const std::string & tooltip() const
const std::string & overlay() const
const std::string & image() const
std::size_t font_size() const
const std::string & postfix() const
bool font_rgb_set() const
const std::string & prefix() const
const label * get_label() const
status_item(std::size_t sw, std::size_t sh, const config &cfg)
theme::object & find_element(const std::string &id)
std::vector< panel > panels_
void add_object(std::size_t sw, std::size_t sh, const config &cfg)
std::vector< action > actions_
void set_object_location(theme::object &element, const std::string &rect_str, std::string ref_id)
std::map< std::string, std::unique_ptr< status_item > > status_
const border_t & border() const
static NOT_DANGLING const config & get_theme_config(const std::string &id)
Returns the saved config for the theme with the given ID.
theme(const theme &)=delete
const rect & unit_image_location(const SDL_Rect &screen) const
const action * get_action_item(const std::string &key) const
object * refresh_title(const std::string &id, const std::string &new_title)
events::generic_event & theme_reset_event()
const menu * get_menu_item(const std::string &key) const
void remove_object(const std::string &id)
object * refresh_title2(const std::string &id, const std::string &title_tag)
void modify(const config &cfg)
theme & operator=(const theme &)=delete
static std::map< std::string, config > known_themes
const std::vector< action > & actions() const
std::vector< menu > menus_
std::size_t cur_spec_height_
std::vector< slider > sliders_
std::size_t cur_spec_width_
const std::vector< menu > & menus() const
static std::vector< theme_info > get_basic_theme_info(bool include_hidden=false)
Returns minimal info about saved themes, optionally including hidden ones.
const rect & mini_map_location(const SDL_Rect &screen) const
const std::vector< panel > & panels() const
const rect & main_map_location(const SDL_Rect &screen) const
const std::vector< slider > & sliders() const
void modify_label(const std::string &id, const std::string &text)
std::vector< label > labels_
theme & operator=(theme &&)
SDL_Rect screen_dimensions_
bool set_resolution(const SDL_Rect &screen)
static void set_known_themes(const game_config_view *cfg)
Copies the theme configs from the main game config.
const rect & palette_location(const SDL_Rect &screen) const
events::generic_event theme_reset_event_
const status_item * get_status_item(const std::string &item) const
theme(const config &cfg, const SDL_Rect &screen)
const menu * context_menu() const
const std::vector< label > & labels() const
Definitions for the interface to Wesnoth Markup Language (WML).
std::size_t index(std::string_view str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
Contains the SDL_Rect helper code.
The basic class for representing 8-bit RGB or RGBA colour values.
An abstract description of a rectangle with integer coordinates.
std::string background_image
static map_location::direction sw