Re: effective span of a TextBuffer's tag?
- From: Havoc Pennington <hp redhat com>
- To: Yotam Medini <yotam_medini fastmail fm>
- Cc: gtk-i18n-list gnome org
- Subject: Re: effective span of a TextBuffer's tag?
- Date: Fri, 9 May 2003 11:17:15 -0400
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.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]