29 const static std::string
br =
"<br/>";
34 template<
typename... Args>
35 std::string
tag(
const std::string& tag_name, Args&&... contents)
38 <<
"<" << tag_name <<
">")
41 <<
"</" << tag_name <<
">";
48 template<
typename... Args>
49 std::string
tag_esc(
const std::string& tag_name, Args&&... contents)
52 <<
"<" << tag_name <<
">")
55 <<
"</" << tag_name <<
">";
67 template<
typename... Args>
82 template<
typename... Args>
85 return ((
formatter() <<
"<span color='" << color <<
"'>") << ... <<
data) <<
"</span>";
97 template<
typename... Args>
100 return ((
formatter() <<
"<span size='" <<
size <<
"'>") << ... <<
data) <<
"</span>";
108 template<
typename... Args>
119 template<
typename... Args>
125 std::string
img(
const std::string&
src,
const std::string& align =
"left",
const bool floating =
false);
127 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 bold(Args &&... s)
Returns a Pango formatting string corresponding to bold formatting.
static const std::string br
std::string span_size(const std::string &size, Args &&... data)
Returns a Pango formatting string that set the font size of the enclosed 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)
Returns the contents enclosed inside <tag_name> and </tag_name>
std::string span_color(const color_t &color, Args &&... data)
Returns a Pango formatting string using the provided color_t object.
std::string italic(Args &&... s)
Returns a Pango formatting string corresponding to italic formatting.
std::string tag_esc(const std::string &tag_name, Args &&... contents)
Returns the contents enclosed inside <tag_name> and </tag_name> This version escapes single quotes an...
config parse_text(const std::string &text)
Parse a xml style marked up text string.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
std::string escape(const std::string &str, const char *special_chars)
Prepends a configurable set of characters with a backslash.
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)
static map_location::direction s