![]() |
![]() |
Public Member Functions | |
Glib::ustring | get_string () const |
Gets a RFC-3066 format string representing the given language tag. | |
const PangoLanguage* | gobj () const |
Provides access to the underlying C instance. | |
PangoLanguage* | gobj () |
Provides access to the underlying C instance. | |
PangoLanguage* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. | |
bool | includes_script (Script script) const |
Determines if script is one of the scripts used to write language . | |
Language (const Glib::ustring& language) | |
Constructs a Pango::Language object from a RFC-3066 format language tag. | |
Language () | |
Constructs an empty language tag. | |
Language (const Language& other) | |
Language (PangoLanguage* gobject, bool make_a_copy=true) | |
bool | matches (const Glib::ustring& range_list) const |
Checks if a language tag matches one of the elements in a list of language ranges. | |
Language& | operator= (const Language& other) |
void | swap (Language& other) |
~Language () | |
Protected Attributes | |
PangoLanguage* | gobject_ |
Related Functions | |
(Note that these are not member functions.) | |
void | swap (Language& lhs, Language& rhs) |
Pango::Language | wrap (PangoLanguage* object, bool take_copy=false) |
Pango::Language::Language | ( | PangoLanguage * | gobject, | |
bool | make_a_copy = true | |||
) | [explicit] |
Pango::Language::Language | ( | const Language& | other | ) |
Pango::Language::~Language | ( | ) |
Pango::Language::Language | ( | ) |
Constructs an empty language tag.
Pango::Language::Language | ( | const Glib::ustring & | language | ) |
Constructs a Pango::Language object from a RFC-3066 format language tag.
This function first canonicalizes the string by converting it to lowercase, mapping '_' to '-', and stripping all characters other than letters and '-'.
Glib::ustring Pango::Language::get_string | ( | ) | const |
Gets a RFC-3066 format string representing the given language tag.
const PangoLanguage* Pango::Language::gobj | ( | ) | const [inline] |
Provides access to the underlying C instance.
PangoLanguage* Pango::Language::gobj | ( | ) | [inline] |
Provides access to the underlying C instance.
PangoLanguage* Pango::Language::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
bool Pango::Language::includes_script | ( | Script | script | ) | const |
Determines if script is one of the scripts used to write language .
The returned value is conservative; if nothing is known about the language tag language , true
will be returned, since, as far as Pango knows, script might be used to write language .
This routine is used in Pango's itemization process when determining if a supplied language tag is relevant to a particular section of text. It probably is not useful for applications in most circumstances.
script | A Pango::Script. |
true
if script is one of the scripts used to write language , or if nothing is known about language .bool Pango::Language::matches | ( | const Glib::ustring & | range_list | ) | const |
Checks if a language tag matches one of the elements in a list of language ranges.
A language tag is considered to match a range in the list if the range is '*', the range is exactly the tag, or the range is a prefix of the tag, and the character after the tag is '-'.
range_list | A list of language ranges, separated by ';' characters. each element must either be '*', or a RFC 3066 language range canonicalized as by pango_language_from_string(). |
true
if a match was found. void Pango::Language::swap | ( | Language& | other | ) |
lhs | The left-hand side | |
rhs | The right-hand side |
Pango::Language wrap | ( | PangoLanguage * | object, | |
bool | take_copy = false | |||
) | [related] |
object | The C instance | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
PangoLanguage* Pango::Language::gobject_ [protected] |