[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    Can't find the list of all tags
From:       Igor Korot <ikorot01 () gmail ! com>
Date:       2011-12-10 0:33:10
Message-ID: CA+FnnTziyCBV2-z=QzHUuyGpypm0djkN4-FoNxNifm2pAKo+oQ () mail ! gmail ! com
[Download RAW message or body]

Hi, ALL,
I am looking at the documentation for the gtk_text_buffer_create_tag().at
http://developer.gnome.org/gtk/2.24/GtkTextBuffer.html#gtk-text-buffer-create-tag.

Unfortunately it does not mention where I can get a list of all
predefined tag available.

I am also looking at some code where I see this:


g_snprintf(buf, sizeof(buf), "UNDERLINE");
tag = gtk_text_tag_table_lookup( gtk_text_buffer_get_tag_table(
text_buffer ), buf );
if (!tag)
    tag = gtk_text_buffer_create_tag( text_buffer, buf,
"underline-set", TRUE, "underline", PANGO_UNDERLINE_SINGLE,  NULL );
gtk_text_buffer_apply_tag (text_buffer, tag, start, end);

This code will make the text underlined.

I need the code to make it a strikethrough. I tried the following:

            g_snprintf(buf, sizeof(buf), "STRIKETHROUGH");
            tag = gtk_text_tag_table_lookup(
gtk_text_buffer_get_tag_table( text_buffer ),
                                             buf );
            if (!tag)
                tag = gtk_text_buffer_create_tag( text_buffer, buf,
                                                  "strikethrough-set", TRUE,
                                                  "strikethrough",
PANGO_ATTR_STRIKETHROUGH,
                                                  NULL );
            gtk_text_buffer_apply_tag (text_buffer, tag, start, end);

but it does not work.

Can someone please help?

Thank you.
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic