PgAttribute.parseMarkup

Parses marked-up text (see <link linkend="PangoMarkupFormat">markup format</link>) to create a plain-text string and an attribute list.

If accel_marker is nonzero, the given character will mark the character following it as an accelerator. For example, accel_marker might be an ampersand or underscore. All characters marked as an accelerator will receive a PANGO_UNDERLINE_LOW attribute, and the first character so marked will be returned in accel_char. Two accel_marker characters following each other produce a single literal accel_marker character.

To parse a stream of pango markup incrementally, use pango_markup_parser_new().

If any error happens, none of the output arguments are touched except for error.

class PgAttribute
static
bool
parseMarkup
(
string markupText
,
int length
,,,
out string text
,
out dchar accelChar
)

Parameters

markupText string

markup to parse (see <link linkend="PangoMarkupFormat">markup format</link>)

length int

length of markup_text, or -1 if nul-terminated

accelMarker dchar

character that precedes an accelerator, or 0 for none

attrList PgAttributeList

address of return location for a PangoAttrList, or NULL

text string

address of return location for text with tags stripped, or NULL

accelChar dchar

address of return location for accelerator char, or NULL

Return Value

Type: bool

FALSE if error is set, otherwise TRUE

Throws

GException on failure.