Re: [gtk-list] Re: Syntax Highlighting Text Widgets

>I'm biased here, since I'm the author of gtkeditor, nevertheless I'll
>use this opportunity to do my sales pitch...we've redesigned and
>reimplemented our editor widget durring the last month or so, so I
>don't think there's that many other around who's got any experience
>with the new design.  The tools using gtkeditor right now, use a
>version that is close to a year old by now.  Anyway...

I've got GtkEditor compiled in now.  It's not what I need, and won't be without
a fair amount of hacking.  The whole c-scanner business is enough to scare
small children.  It works great as a straight-up replacement for gtktext, but I
don't want to impose an fdopen() that may or may not work upon my users.

>GtkEditor is a very flexible editor.  Highlighting is configured using
>regular expressions (in earlier version gnu-regex, now we use flex).
>You can specify either 'patterns' or 'blocks'.  The 'patterns' are
>simple regexs such as "[a-zA-Z][a-zA-Z0-9]*[ \t]*(" for a C function.
>The 'blocks' are, well, blocks of syntax, anything with a 'start' and
>'end' pattern such as C-comments ("/\*","\*/") or strings ("\"","\"").

I like the way that you do define the highlighting.  Very intuitive.

>The only requirements for GtkEditor is a vanilla installation of GTK+.
>This differs from earlier versions of GtkEditor. We use gtktext as a
>basis widget[1], but will adopt the new text widget as soon as we get
>an official replacement.

Not true.  If you want syntax highlighting then you're dependant upon the
c-scanner lib.  Although it's built at the same time as the shared libs, if you
don't plan on using it as a library then c-scanner becomes a liability.

>The major disadvantage with GtkEditor, as I see it, is that we're in
>the middle of a redesign, which puts the API in a bit of flux.  It
>won't be stable until a 0.2.0 release.  On the other hand, this is the
>opportunity to tailor the editor to your needs :) I don't think the
>highlighting API will change much though.  We're pretty satisfied with
>it as it is.

How about GtkEditor Lite that comprises a single .c file, #including a single
.h file that contains the highlighting rules?


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