"apply-tag": how to change behavior?
- From: Allin Cottrell <cottrell wfu edu>
- To: gtk-app-devel-list gnome org
- Subject: "apply-tag": how to change behavior?
- Date: Tue, 10 Jun 2003 12:10:53 -0400 (EDT)
I'm working on a simple built-in editor for my program, using a
GtkTextView. I'd like to add dynamic syntax highlighting (simple
example: if a line begins with '#' it's a comment and will be shown in
a different color).
I think the functions I want are gtk_text_buffer_apply_tag() and
gtk_text_buffer_remove_tag(), but I don't want the default behavior of
applying a tag to a specified start-end range, rather I want the tag
to apply "from now until further notice" as the user types.
I guess that to achieve this I need to catch the "apply-tag" signal
for the text buffer and customize the response, but I'm having
difficulty figuring out what the response should look like.
Thanks in advance for any suggestions.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]