Re: What is the meaning of toggle on/off for GtkTextTags?

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

 



Hello.

The way I would interpret those function calls would be:

gtk_text_iter_forward_to_tag_toggle (iter, NULL);
  - Move iter to the start or end of any tag that comes next in buffer. If no
    tag start or end is found, move to the end of the buffer.

gtk_text_iter_forward_to_tag_toggle (iter, mytag);
  - Move iter to the start or end of mytag tag that comes next in buffer. If
    mytag is not present in buffer contents after initial iter, move to the end
    of the buffer.

Exactly the same thing applies for backward function. The only things that
changes is search direction.

Take this piece of markup as an example:
This is <em>important</em> piece of <b>bold and <c>colored</c></b> text.

Let say that our initial position is at character 'r' inside word 'important'.
gtk_text_iter_forward_to_tag_toggle (iter, NULL) call would move iter to </em>.
gtk_text_iter_forward_to_tag_toggle (iter, b) call would move iter to <b>.
gtk_text_iter_forward_to_tag_toggle (iter, x) call would move iter to the end.

(I substituted GtkTextTab with simple name in function calls from didactic
reasons.)

Hopefully things are clearer now.

Tadej

--
Tadej Borovšak
tadeboro.blogspot.com
tadeboro@xxxxxxxxx
tadej.borovsak@xxxxxxxxx
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux