Re: "apply-tag": how to change behavior?
- From: Allin Cottrell <cottrell wfu edu>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: "apply-tag": how to change behavior?
- Date: Tue, 10 Jun 2003 16:25:50 -0400 (EDT)
On Tue, 10 Jun 2003, Havoc Pennington wrote:
On Tue, Jun 10, 2003 at 12:10:53PM -0400, Allin Cottrell wrote:
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)...
One way you might do this is to connect_after() to insert_text and
have the signal handler apply the tag to the just-inserted text.
You can't really change what apply_tag does, because that will break
most of the API.
You might also look at just using the gtksourceview library, it's
required for gedit and seems like a pretty complete syntax
highlighting solution.
Thanks for the suggestions. I'll take a look at gtksourceview.
Allin Cottrell.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]