Re: Announcing: Project Ridley



On 8/21/05, Havoc Pennington <hp redhat com> wrote:
> Also basic support for "styled editing," i.e. right now to implement a
> Bold button that behaves like the one in a word processor is fairly
> involved with GtkTextView. So some kind of API for that might be cool.

What kind of API are you thinking about here?

Imho, the current API isn't that difficult to use. Maybe we just need
to advertise/provide some more examples on how to use it:

1. create a new GtkTextTag: gtk_text_tag_new ("bold");
2. set the bold attribute: g_object_set (tag, "weight",
PANGO_WEIGHT_BOLD, NULL);
3. get a start & end iter for the text you want to apply the tag to
4. call gtk_text_buffer_apply_tag_by_name

Jeroen



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