From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 9CDEDBC57 for ; Tue, 30 Nov 2010 04:20:43 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMCAPP780zRVaA2kGdsb2JhbACYEYp0CBUBAQEBCQkMBxEDH6hBi3yFP4kEAQEDBYVCBIRahgeDD2eBHoQZ X-IronPort-AV: E=Sophos;i="4.59,278,1288566000"; d="scan'208";a="81792299" Received: from mail-pw0-f54.google.com ([209.85.160.54]) by mail2-smtp-roc.national.inria.fr with ESMTP; 30 Nov 2010 04:20:42 +0100 Received: by pwi10 with SMTP id 10so4379944pwi.27 for ; Mon, 29 Nov 2010 19:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=a/KOxin5vAcQvJ4J6AH41zJE7Ie/rKPcMp5Fd0u3UEA=; b=TcR9jp3/OMC3ObTHddkAc6z1mq7ubjXpm1vp7KnQwiqnBowLMnkKizS7jR7WY7h2Tp X2q3EFG1nhlc+xrYzrGcI0h3eHOwK+NhpM9tmrEml+gFlFTSe/EOBltCbuo69y9xc+0z cQEAwR/lTV+TGwojoz85vPESChRLc3qflJmvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=wJTGXFLFOc7m5zv8SbIYoNsucQE33+eOHd/cSkALwpSxIfzyicy6l48TcnkX/hnI5I ikIB63u3ZIpFYMWUSAkpkeCWpL6LSaTsqESTa4dHxrf+5WfuGBRbbvoqxkw3GfHI8gAt nq/6a8RvEBqjZFOo1CaLD6mvBFy1RiMI3kSJI= Received: by 10.143.39.20 with SMTP id r20mr6461321wfj.413.1291087240673; Mon, 29 Nov 2010 19:20:40 -0800 (PST) Received: from [10.1.1.70] ([220.196.30.146]) by mx.google.com with ESMTPS id x18sm8344213wfa.23.2010.11.29.19.20.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Nov 2010 19:20:39 -0800 (PST) Sender: Jacques Garrigue Subject: Re: [Caml-list] lablgtk pango_parse_markup Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Jacques Garrigue In-Reply-To: <20101129142053.GB25177@yquem.inria.fr> Date: Tue, 30 Nov 2010 11:20:22 +0800 Cc: caml-list@inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: References: <20101129142053.GB25177@yquem.inria.fr> To: Daniel de Rauglaudre X-Mailer: Apple Mail (2.1082) X-Spam: no; 0.00; lablgtk:01 gwindow:01 gmisc:01 foreground:01 gmain:01 gmisc:01 foreground:01 rauglaudre:01 lablgtk:01 rauglaudre:01 20,:98 wrote:01 caml-list:01 argument:02 parse:02 This is directly supported by the label widget: let w =3D GWindow.window () let l =3D GMisc.label ~packing:w#add () let () =3D l#set_text "Hello"; l#set_use_markup true; w#show (); GMain.main () This is even shorter as optional argument: let l =3D GMisc.label ~packing:w#add ~markup:"Hello" () Jacques Garrigue On 2010/11/29, at 22:20, Daniel de Rauglaudre wrote: > Hi, >=20 > I'd like to have a "label" widget in Lablgtk with a string with > internationalization, bold, italic, utf8, color, things like that. >=20 > I am not sure, but I saw in the Web that I must use the function > "pango_parse_markup" and XML tags in my string, but that function > seems not to exist in Lablgtk. Is it normal? Do I have to use other > features? >=20 > Thanks. >=20 > --=20 > Daniel de Rauglaudre > http://pauillac.inria.fr/~ddr/