- GtkTextIter starti, endi;
- gtk_text_buffer_get_iter_at_offset( text_buffer, &starti, start );
- gtk_text_buffer_get_iter_at_offset( text_buffer, &endi, end );
-
- // use the attributes from style which are set in it and fall back
- // first to the default style and then to the text control default
- // colours for the others
- wxTextAttr attr = wxTextAttr::Combine(style, m_defaultStyle, this);
-
- PangoFontDescription *font_description = attr.HasFont()
- ? attr.GetFont().GetNativeFontInfo()->description
- : NULL;
-
- GdkColor *colFg = attr.HasTextColour() ? attr.GetTextColour().GetColor()
- : NULL;
-
- GdkColor *colBg = attr.HasBackgroundColour()
- ? attr.GetBackgroundColour().GetColor()
- : NULL;
-
- GtkTextTag *tag;
- tag = gtk_text_buffer_create_tag( text_buffer, NULL, "font-desc", font_description,
- "foreground-gdk", colFg,
- "background-gdk", colBg, NULL );
- gtk_text_buffer_apply_tag( text_buffer, tag, &starti, &endi );
-
- return TRUE;
-#else