From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 3695CBC69 for ; Tue, 27 Mar 2007 11:44:57 +0200 (CEST) Received: from net.univ-savoie.fr (net.univ-savoie.fr [193.48.120.75]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2R9iuss032318 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 27 Mar 2007 11:44:57 +0200 Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by net.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id l2R9iobu030668 for ; Tue, 27 Mar 2007 11:44:50 +0200 Received: from [193.48.123.45] (d45.lama.univ-savoie.fr [193.48.123.45]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id l2R9ioKh004991 ; Tue, 27 Mar 2007 11:44:51 +0200 Message-ID: <4608E7DE.5060107@univ-savoie.fr> Date: Tue, 27 Mar 2007 11:46:06 +0200 From: Christophe Raffalli User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] cameleon2 References: <460530EF.9040507@univ-savoie.fr> <46056F0F.1020907@univ-savoie.fr> <4605B9AE.8050207@univ-savoie.fr> <4606388D.9010902@univ-savoie.fr> <20070326085314.508131d9@tintin.inria.fr> <46078EDE.7@univ-savoie.fr> <20070326113406.61b3effe@tintin.inria.fr> <20070327093444.3e324784@tintin.inria.fr> In-Reply-To: <20070327093444.3e324784@tintin.inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at discorde with ID 4608E798.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 cameleon:01 gedit:01 gtk:01 buffer:01 buffer:01 gtk:01 syntax:01 syntax:01 foreground:01 cameleon:01 > > In fact, there is no font attribute in source tag styles of gtksourceviews. > I could not find any gedit screenshot showing two distinct fonts in the same > gtksourceview. > The third screen shot on this page: http://gtksourceview.sourceforge.net/screens.html > Here is a little explanation about how the gtksourceview works (as I > understand it). > > Gtk offers buffers and views on buffers. There can be more than one view on > one buffer. In each buffer, one can define "tags", and associate parts of > the text in a buffer to these tags. These tags can have different style > which allows to render the (parts of) text in different colors, font > weight, ... depending on the associated tags. This is for Gtk. > > What gtksourceview brings is a convenient way to define syntax elements and > new buffers and views, inheriting from the original ones of gtk. The new > buffers (source_buffers) can be given a language, which is a description of > syntax elements. The buffers then automatically define tags > corresponding to the syntax elements of the language and associates these > tags to the parts of the text in the buffer, according to the definition > of the syntax elements (keywords, beginning and ending of blocks, ...). The > application only has to define the styles of each of these tags to provide > syntax highlighting. > > The styles associated to "syntax tags" can be used to define background and > foreground colors, bold, italic, strikethrough, and underline attributes. > > So each application has to define (and eventually store) the attributes > associated to each "syntax tags" for each language. > > I hope this explanation was useful (and quite clear). Yes very much, thanks. Remark: my previous mail did criticize the doc of gtksourceview not the one on cameleon or lablgtksourceview, but after rereading it I see it was not so clear, so sorry for that. > > By the way, the lablgtksourceview library offers bindings to the > gtksourceview library (and so the features above): > http://helm.cs.unibo.it/software/lablgtksourceview/ > > This library is used in Chamo to provide syntax highlighting. > -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI