9#include "abg-internal.h"
11ABG_BEGIN_EXPORT_DECLARATIONS
15ABG_END_EXPORT_DECLARATIONS
22using std::ostringstream;
32const canvas iso_a4_canvas = { units::pixel, 765, 990 };
35 {
"'ArialMT'", 12, color::black, R
"(text-anchor="middle")"};
37const typography source_code_pro_typo = \
38 {
"Source Code Pro Light", 12, color::black, R
"(text-anchor="middle")"};
40const typography roboto_typo = \
41 {
"Roboto Light", 12, color::black, R
"(text-anchor="middle")"};
44const style base_row_sty = { color::white, color::gray75,
"" };
45const style member_row_sty = { color::black, color::gray25,
"" };
46const style implementation_row_sty = { color::black, color::white,
"" };
52 const std::string& replace)
55 while((pos = target.find(
match, pos)) != std::string::npos)
57 target.replace(pos,
match.length(), replace);
58 pos += replace.length();
63units_to_string(
units __val)
68 case units::millimeter:
75 throw std::logic_error(
"abigail::units_to_string units not recognized");
82color_to_string(
color __val)
100 throw std::logic_error(
"abigail::color_to_string color not recognized");
107typography::anchor_to_string(anchor __val)
const
119 throw std::logic_error(
"abigail::anchor_to_string anchor not recognized");
127typography::to_attribute(anchor __a)
const
129 const std::string name(
"__name");
130 const std::string size(
"__size");
131 const std::string anchor(
"__anchor");
132 std::string strip = R
"(font-family="__name" font-size="__size" text-anchor="__anchor")";
bool match(const regex_t_sptr &r, const std::string &str)
See if a string matches a regex.
Toplevel namespace for libabigail.
const style primary_row_sty
Useful row constants. Maybe just do enum->value map.
const canvas ansi_letter_canvas
Useful canvas constants.
units
Measurement abstraction type, conversion function.
const typography arial_typo
Useful typography constants.
color
Color, conversion function.
void string_replace(std::string &target, const std::string &match, const std::string &replace)
Utility function, like regex_replace.
Datum consolidating style preferences.