Re: gtksourceview and C# bindings..



Hi,

On Tue, 2003-09-09 at 12:56, Mike Rosset wrote:
> > IIRC, the mono debugger already uses gtksourceview to display syntax
> > highlighted code. I don't know which version of gtksourceview they're
> > using though. (go-mono.com seems to be down, otherwise i would have
> > included a link to a screenshot showing gtksourceview in the debugger).
> 
> Yes this is where I stumpled across the C# bindings. however It does not
> appear to use the PatternTag in the way I would like. this test-widget
> included in the debugger cvs seems alot smother, here is a snippet.
> I ported.. but my buffer does not highlight.
> 
> debugger/widgets/sources/gtksourceview/test-widget.c
> 
> GLib.List l = new GLib.List ((IntPtr) 0, typeof (Gtk.TextTag));
> ptag = new PatternTag("numbers","\\b[0-9]+\\.?\\b");
> ptag.Foreground = "tomato3";
> l.Append(ptag.Handle);
> tag_table = new TextTagTable();
> source_buffer = new SourceBuffer(tag_table);
> source_buffer.InstallRegexTags(l);
> source_buffer.Highlight = true;
> source_buffer.CheckBrackets = true;
> source_buffer.Text = "1 2 21  include";
> source_view = new SourceView(source_buffer);
> scroll_window.Add(source_view);

"tomato3" seems a really weird foreground color. Are you sure that's not
the problem? (the rest looks ok to an untrained C# person).

> If anyone knows if this is feasable please let me know, mean time I'll
> go over the debugger frontend some more.

Paolo is probably to guy to really ask (he's one of the maintainers of
gtksourceview). Otherwise you should probably contact the maintainer of
the mono debugger and ask him where he got the C# bindings from.

HTH,

Jeroen

p.s. Don't forget to reply to all, otherwise it won't appear on the
devtools list.




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