API freeze forgot to ask for this (gtk_text_buffer_remove_all_tags(buf, start, end))
- From: Mikael Hermansson <tyan linux se>
- To: gtk-devel-list gnome org
- Subject: API freeze forgot to ask for this (gtk_text_buffer_remove_all_tags(buf, start, end))
- Date: Fri, 6 Apr 2001 21:40:25 +0200
I don't remember if I have asked about this but how about adding:
gtk_text_buffer_remove_all_tags(GtkTextBuffer *buf, GtkTextIter *start,
GtkTextIter *end)
Example (need to cleanup I just cut'ed it from my GtkSourceBuffer)
typedef struct _IterBox
{
GtkTextIter *iter1;
GtkTextIter *iter2;
}IterBox;
void
remove_tag_func (GtkTextTag *tag, gpointer data)
{
IterBox *iters = (IterBox *)data;
gtk_text_buffer_remove_tag(gtk_text_iter_get_buffer(iters->iter1), tag,
iters->iter1, iters->iter2);
}
void
remove_all_tags(GtkSourceBuffer *text,GtkTextIter *iter,GtkTextIter *iter2)
{
GtkTextTagTable *tagtable;
IterBox iters;
iters.iter1 = iter;
iters.iter2 = iter2;
tagtable = gtk_text_buffer_get_tag_table(GTK_TEXT_BUFFER(text));
g_print("remove all tags (if there is) between %d and
%d\n",gtk_text_iter_get_offset(iter),gtk_text_iter_get_offset(iter2));
gtk_text_tag_table_foreach (tagtable, remove_tag_func, &iters);
}
Greets
M.H.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]