Re: [gtk-list] Re: Gtk_Text customization?



On 14 Jul 1998, Thomas Mailund Jensen wrote:

> Funny, I am currently working on a source editor widget (a subclass of
> the text widget). I have only done syntax highlighting now, but plan
> on looking at parenthesis matching and indenter soon. If you are
> interested, let me know.

   That would be great!  I was planning on implementing syntax
highlighting some time, but I have no clue on how to do it.  Highlighting
always seemed complicated to me, since you have to keep track of the whole
text (I tried doing one in console mode, but it didn't work because I only
highlighted based on what was on the screen, so if the beginning of an
expr/comment was off the screen it didn't highlight correctly).  The
flexibility of yours using regex sounds great.

> I have uploaded a patch (gtk-mailund-980713-0.patch) to ftp.gtk.org,
> which makes it possible to add user data to text properties in the
> text widget. Using that, you could add comments as user data to,
> e.g. a "/*<comment>*/" text, and when clicking on the text, extract
> the comment and insert it instead of the /*<comment>*/ text.
>
> I have only used the user data in gtktext for highlighting (I save the
> state in the regex automaton), so I don't know if this is useful for
> these comments. But you could take a look.

Great, I'll check it out.

---
Matt Perry [guy@mikepery.linuxos.org]

Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western
        Civilization?
Gandhi: I think it would be a good idea.
---



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