Class
BirbPangoFormatter
unstable since: 0.6
Description [src]
abstract class Birb.PangoFormatter : GObject.Object
{
/* No available fields */
}
A helper class for writing out PangoAttrList formatted strings.
birb_pango_formatter_format() will process a plain text string with a
PangoAttrList and call the appropriate virtual functions when necessary.
When formatting is started Birb.PangoFormatterClass.start will always be called.
When an attribute is starting, Birb.PangoFormatterClass.attribute_start will
be called to tell the formatter as such. Likewise,
Birb.PangoFormatterClass.attribute_end will be called when the attribute is ending.
Birb.PangoFormatterClass.text will be called for all text which will be
dispersed between calls turning attributes on and off.
Finally once all text and attributes have been processed,
Birb.PangoFormatterClass.finish will be called to get the resulting
formatted string.
Here is a simple example of how this would work with a string like
foo <b>bar</b> baz.
Birb.PangoFormatterClass.startis calledBirb.PangoFormatterClass.textis called with"foo "as the text parameter.Birb.PangoFormatterClass.attribute_startis called with thePangoAttributefor the weight.Birb.PangoFormatterClass.textis called with"bar"as the text parameter.Birb.PangoFormatterClass.attribute_endis called with thePangoAttributefor the weight.Birb.PangoFormatterClass.textis called with" baz"as the text parameter.Birb.PangoFormatterClass.finishis called.
Available since: 0.6
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct BirbPangoFormatterClass {
GObjectClass parent;
void (* start) (
BirbPangoFormatter* formatter
);
void (* attribute_start) (
BirbPangoFormatter* formatter,
PangoAttribute* attribute
);
void (* attribute_end) (
BirbPangoFormatter* formatter,
PangoAttribute* attribute
);
void (* text) (
BirbPangoFormatter* formatter,
const char* text
);
char* (* finish) (
BirbPangoFormatter* formatter
);
gpointer reserved;
}
No description available.
Class members
parent: GObjectClassNo description available.
start: void (* start) ( BirbPangoFormatter* formatter )No description available.
attribute_start: void (* attribute_start) ( BirbPangoFormatter* formatter, PangoAttribute* attribute )No description available.
attribute_end: void (* attribute_end) ( BirbPangoFormatter* formatter, PangoAttribute* attribute )No description available.
text: void (* text) ( BirbPangoFormatter* formatter, const char* text )No description available.
finish: char* (* finish) ( BirbPangoFormatter* formatter )No description available.
reserved: gpointerNo description available.
Virtual methods
Birb.PangoFormatterClass.attribute_end
Called when an attribute is being finished.
unstable since: 0.6
Birb.PangoFormatterClass.attribute_start
Called when an attribute is being started.
unstable since: 0.6
Birb.PangoFormatterClass.finish
Called when there is no more text or attributes to get the results of the formatting.
unstable since: 0.6
Birb.PangoFormatterClass.start
Called when birb_pango_formatter_format() was called to initialize the formatter.
unstable since: 0.6