Re: effective span of a TextBuffer's tag?

On Fri, May 09, 2003 at 07:39:14AM -0400, Yotam Medini wrote: 
> Thanks for the explanation. 
> Now, where is actually the tag information kept?
> that is - what data entity holds it? 

The buffer. If you want to understand the details of how the textview
works, first read the docs on the public API, then read
gtk+/docs/text_widget_internals.txt (this file is only on the HEAD
branch in CVS).

> Does each character has a priority list (possibly empty) of tags
> applying to it?

No, the tag is done with marks at either end of the tagged range.
> For example, say one wants to have a "1st character" C of a paragraph 
> that will manage the 'justification-tag' T. This is be applying a tag
> to a singleton range [i, i."next"()], where i points to C.
> Later, when the C is removed, is T automatically removed as well?
> If not, is there a clean way to "unapply" T, without removing it
> from the buffer's tag-table.?

A tag is automatically removed from a range if the range becomes
zero-length. There's also a function that just removes a tag from a
given range, browse through the GtkTextBuffer methods.


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