Re: simple markup format



ERDI Gergo <cactus@telnet.hu> writes:
> On 23 Aug 2000, Havoc Pennington wrote:
> 
> > GtkLabel already supports bold/italic/etc. text in GTK+ 2.0.
> 
> Oh my.
> 

Note that it doesn't cause bloat because GtkLabel is basically a
display engine for PangoLayout, and PangoLayout already supports this.

So GtkLabel just does:

 layout = pango_layout_new ();
 pango_layout_set_text ("whatever");

And in its expose handler:

 gdk_draw_layout (drawable, gc, layout);

More or less.

Havoc





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