Re: Newbie: Getting the associated tags of a text



 --- Havoc Pennington <hp redhat com> writes:
> Markus Reitz <markus_reitz yahoo com> writes:
> > 
> > is there an easy way of getting the information
> where
> > tags in a GtkTextBuffer start and end?
> >
> 
> There are GtkTextIter functions to move to the next
> tag or the next
> tag of a given type. Check the API docs on
> GtkTextIter.
>  
Hi Havoc,

thanks for your quick answer. I have checked the
GtkTextIter API, but I only found a way to get the
tags which are associated with the text at a given
iterator position. So a solution to my problem would
have to query the associated tags for each character
of the whole text, check if the set of tags has
changed compared to the previous text character and if
so adjust the output.

But checking each character seems very slow and not
really usable if the text is large. Are there other
solutions or did I miss something?

Thanks

Markus

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Yahoo! präsentiert als offizieller Sponsor das Fußball-Highlight des
Jahres: - http://www.FIFAworldcup.com



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