33 const static std::string
br =
"<br/>";
44 template<
typename... Args>
45 std::string
tag(
const std::string& tag_name, Args&&... contents)
47 std::string input_text = ((
formatter()) << ... << contents);
48 if (input_text.empty()) {
52 <<
"<" << tag_name <<
">"
54 <<
"</" << tag_name <<
">";
67 template<
typename... Args>
71 if (input_text.empty()) {
75 <<
"<span color='" << color.
to_hex_string() <<
"'>" << input_text <<
"</span>";
88 template<
typename... Args>
92 if (input_text.empty()) {
96 <<
"<span color='" << color <<
"'>" << input_text <<
"</span>";
109 template<
typename... Args>
113 if (input_text.empty()) {
117 <<
"<span size='" <<
size <<
"'>" << input_text <<
"</span>";
127 template<
typename... Args>
139 template<
typename... Args>
156 std::string
img(
const std::string&
src,
const std::string& align =
"left",
const bool floating =
false);
167 std::string
make_link(
const std::string& text,
const std::string&
dst);
A config object defines a single node in a WML file, with access to child nodes.
Definitions for the interface to Wesnoth Markup Language (WML).
std::string italic(Args &&... data)
static const std::string br
std::string span_size(const std::string &size, Args &&... data)
std::string make_link(const std::string &text, const std::string &dst)
std::string img(const std::string &src, const std::string &align, const bool floating)
std::string tag(const std::string &tag_name, Args &&... contents)
std::string bold(Args &&... data)
std::string span_color(const color_t &color, Args &&... data)
config parse_text(const std::string &text)
Parse a xml style marked up text string.
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
rect dst
Location on the final composed sheet.
rect src
Non-transparent portion of the surface to compose.
The basic class for representing 8-bit RGB or RGBA colour values.
std::string to_hex_string() const
Returns the stored color in rrggbb hex format.
Base class for all the errors encountered by the engine.
Thrown when the help system fails to parse something.
parse_error(const std::string &msg)