123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109(**************************************************************************)(* Lablgtk *)(* *)(* This program is free software; you can redistribute it *)(* and/or modify it under the terms of the GNU Library General *)(* Public License as published by the Free Software Foundation *)(* version 2, with the exception described in file COPYING which *)(* comes with the library. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Library General Public License for more details. *)(* *)(* You should have received a copy of the GNU Library General *)(* Public License along with this program; if not, write to the *)(* Free Software Foundation, Inc., 59 Temple Place, Suite 330, *)(* Boston, MA 02111-1307 USA *)(* *)(* *)(**************************************************************************)(* $Id$ *)openGauxopenPangoopenFontletto_pixels(x:units)=(x-1)/scale+1letfrom_pixelsx:units=x*scaleclassmetricsobj=objectmethodascent=get_ascentobjmethoddescent=get_descentobjmethodapprox_char_width=get_approximate_char_widthobjmethodapprox_digit_width=get_approximate_digit_widthobjendclassfont_descriptionfd=objectmethodfd=fdmethodcopy=newfont_description(copyfd)methodto_string=to_stringfdmethodfamily=get_familyfdmethodstyle=get_stylefdmethodvariant=get_variantfdmethodweight=get_weightfdmethodstretch=get_stretchfdmethodsize=get_sizefdmethodmodify=modifyfdendletfont_description_from_strings=newfont_description(from_strings)openContextclasslayoutobj=objectvalobj=objmethodas_layout=objmethodcopy=newlayout(Layout.copyobj)methodget_context=newcontext(Layout.get_contextobj)methodget_text=Layout.get_textobjmethodset_texts=Layout.set_textobjsmethodset_markups=Layout.set_markupobjsmethodset_markup_with_accelsc=Layout.set_markup_with_accelobjscmethodset_font_description(fd:font_description)=Layout.set_font_descriptionobjfd#fdmethodget_font_description=newfont_description(Layout.get_font_descriptionobj)methodget_width=Layout.get_widthobjmethodset_widthw=Layout.set_widthobjwmethodget_indent=Layout.get_indentobjmethodset_indenti=Layout.set_indentobjimethodget_spacing=Layout.get_spacingobjmethodset_spacings=Layout.set_spacingobjsmethodget_wrap=Layout.get_wrapobjmethodset_wrapw=Layout.set_wrapobjwmethodget_justify=Layout.get_justifyobjmethodset_justifyb=Layout.set_justifyobjbmethodget_single_paragraph_mode=Layout.get_single_paragraph_modeobjmethodset_single_paragraph_modeb=Layout.set_single_paragraph_modeobjbmethodcontext_changed=Layout.context_changedobjmethodget_size=Layout.get_sizeobjmethodget_pixel_size=Layout.get_pixel_sizeobjmethodget_extent=Layout.get_extentobjmethodget_pixel_extent=Layout.get_pixel_extentobjmethodindex_to_posi=Layout.index_to_posobjimethodxy_to_index~x~y=Layout.xy_to_indexobj~x~ymethodget_ellipsize=Layout.get_ellipsizeobjmethodset_ellipsizem=Layout.set_ellipsizeobjmendandcontextobj=object(self)valobj=objmethodas_context=objmethodfont_description=newfont_description(get_font_descriptionobj)methodfont_name=Font.to_string(get_font_descriptionobj)methodlanguage=Language.to_string(get_languageobj)methodload_fontdesc=load_fontobj(Font.from_stringdesc)methodload_fontset?(desc=self#font_description)?(lang=self#language)()=load_fontsetobj(desc#fd)(Language.from_stringlang)methodget_metrics?(desc=self#font_description)?(lang=self#language)()=newmetrics(get_metricsobj(desc#fd)(Some(Language.from_stringlang)))methodcreate_layout=newlayout(Layout.createobj)methodset_font_description(desc:font_description)=set_font_descriptionobjdesc#fdmethodset_font_by_namedesc=set_font_descriptionobj(Font.from_stringdesc)methodset_languagelang=set_languageobj(Language.from_stringlang)end