Re: how to load Pango Markup into GtkTextBuffer?



Joshua N Pritikin <vishnu pobox com> writes:
Is there an easy way to load Pango Markup into a GtkTextBuffer?

Nope.

Or do i need to do it myself -- create the appropriate GtkTextTags, scan
the string with a GMarkup parser, and insert chunks piece by piece?

This is essentially the problem, there are no default tags, and
inserting markup would require that.

So yeah, what you have to do right now is write your own gmarkup
parser that does this. You could of course start with pango-markup.c
source code, and change it to modify a text buffer instead of a
PangoAttrList.

Should think of a GTK 2.2 or 3.0 solution, no doubt this feature will
be popularly requested.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]