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.

Available since: 0.6

Ancestors

Instance methods

birb_pango_formatter_format

Formats the given text with the given attributes.

unstable since: 0.6

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

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: GObjectClass

No 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: gpointer

No 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

Birb.PangoFormatterClass.text

Called when there is text to insert.

unstable since: 0.6