Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > bed11f767cee248b0cff07c687e41adb > files > 15

gtkmathview-0.8.0-5.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!-- Created on March, 24  2003 by texi2html 1.65 -->
<!-- 
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
 
-->
<HEAD>
<TITLE>GtkMathView Reference Manual: </TITLE>

<META NAME="description" CONTENT="GtkMathView Reference Manual: ">
<META NAME="keywords" CONTENT="GtkMathView Reference Manual: ">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.65">

</HEAD>

<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC_Top"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>GtkMathView Reference Manual</H1><BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC1">1. Overview</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">General information about GtkMathView.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC2">2. Usage</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Compiling and installation instructions.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC11">3. Interactivity Support</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC15">4. Sample Application</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC16">5. C++ Interface</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the C++ interface.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC22">6. GTK+ Interface</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the GTK+ interface.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC23">7. Tools</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Tools coming along the widget.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC26">8. Bugs and Contributions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to report a bug.</TD></TR>
</TABLE>

<br>
&nbsp;--&nbsp;The&nbsp;Detailed&nbsp;Node&nbsp;Listing&nbsp;---
<br>

<br>
Usage
<br>

<br>
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC3">2.1 Download</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Where the source code is</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC4">2.2 Requirements</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Auxiliary packages to compile and run GtkMathView.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC5">2.3 Installing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to compile the source code of the widget.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC6">2.4 Compile and Link</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to link against your source code.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC7">2.5 Configuration</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to fine-tune the widget</TD></TR>
</TABLE>

<br>
Configuration
<br>

<br>
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC8">2.5.1 Main Configuration File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Basic configuration</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC9">2.5.2 Operator Dictionary</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Setting the default value for operator attributes</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC10">2.5.3 Font Setup</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the widget maps Unicode characters into glyphs</TD></TR>
</TABLE>

<br>
Interactivity&nbsp;Support
<br>

<br>
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC12">3.1 Selection</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Highlighting sub-expressions</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC13">3.2 Point-and-click Functionalities</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Handling of basic mouse events</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC14">3.3 Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Changind the source document tree</TD></TR>
</TABLE>

<br>
C++&nbsp;Interface
<br>

<br>
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC17">5.1 Lengths</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">About Lengths</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC18">5.2 Boxes and Rectangles</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC21">5.3 The MathMLRenderingEngine Class</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE>

<br>
Boxes&nbsp;and&nbsp;Rectangles
<br>

<br>
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC19">5.2.1 Rectangles</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC20">5.2.2 Bounding Boxes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE>

<br>
Tools
<br>

<br>
<TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC24">7.1 <CODE>mathmlviewer</CODE></A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A simple viewer application.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC25">7.2 <CODE>mathml2ps</CODE></A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A MathML =&#62; PostScript conversion utility.</TD></TR>
</TABLE>

<br>
</BLOCKQUOTE>
<P>

<HR SIZE=1>
<A NAME="SEC1"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<A NAME="Overview"></A>
<H1> 1. Overview </H1>
<!--docid::SEC1::-->
GtkMathView is a C++ rendering engine for MathML (see
<A HREF="http://www.w3.org/Math">http://www.w3.org/Math</A>) documents.  Although GtkMathView is, by
its own definition, related to the GTK+ framework (we eventually had
to commit to a development platform that was convenient for our
purposes), its internal architecture is designed as to isolate as much
as possible platform dependencies. A large part of GtkMathView, the
one dealing with proper formula layout, is completely platform
independent. On top of this internal, hidden library of C++ classes
are two different interfaces, one for GTK+ and another one that allows
to render MathML documents to PostScript. The implementation of a new
interface is a relatively easy and straightforward task.
<P>

For questions, comments, suggestions, bug reports, contributions, please
contact the author at the following email address:
<A HREF="mailto:luca.padovani@cs.unibo.it">luca.padovani@cs.unibo.it</A>
</P><P>

<A NAME="Usage"></A>
<HR SIZE="6">
<A NAME="SEC2"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC1"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC3"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC1"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 2. Usage </H1>
<!--docid::SEC2::-->
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC3">2.1 Download</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Where the source code is</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC4">2.2 Requirements</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Auxiliary packages to compile and run GtkMathView.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC5">2.3 Installing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to compile the source code of the widget.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC6">2.4 Compile and Link</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to link against your source code.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC7">2.5 Configuration</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to fine-tune the widget</TD></TR>
</TABLE></BLOCKQUOTE>
<P>

<A NAME="Download"></A>
<HR SIZE="6">
<A NAME="SEC3"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC4"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.1 Download </H2>
<!--docid::SEC3::-->
The latest version of the source code of the GtkMathView widget, along
with this documentation, can be obtained directly from
<A HREF="http://helm.cs.unibo.it/mml-widget/">http://helm.cs.unibo.it/mml-widget/</A>.
<P>

In the same page you will find <EM>unofficial</EM> RedHat packages and
<EM>official</EM> Debian packages for the widget and related tools.
</P><P>

The source code is also available from the GNOME CVS repository, which can be
accesses anonymously via CVS at the following address
<CODE>:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome</CODE>
</P><P>

The module name is <CODE>gtkmathview</CODE>. The CVS repository can also be
browsed online at the address
<A HREF="http://cvs.gnome.org/lxr/source/gtkmathview/">http://cvs.gnome.org/lxr/source/gtkmathview/</A>.
</P><P>

<A NAME="Requirements"></A>
<HR SIZE="6">
<A NAME="SEC4"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC3"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC5"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.2 Requirements </H2>
<!--docid::SEC4::-->
To compile and use the widget you need the following packages
installed on your system:
<P>

<UL>
<LI>
<CODE>GTK+</CODE> (version 1.2) <A HREF="http://www.gtk.org">http://www.gtk.org</A>, of course.
<LI>
<CODE>GMetaDOM</CODE> (at least version 0.1.5)
<A HREF="http://gmetadom.sourceforge.org">http://gmetadom.sourceforge.org</A>. This library provides a C++ DOM
implementation based on <CODE>Gdome2</CODE> <A HREF="http://gdome2.cs.unibo.it">http://gdome2.cs.unibo.it</A>
which in turn is based on <CODE>libxml</CODE> <A HREF="http://xmlsoft.org">http://xmlsoft.org</A>.
</UL>
<P>

<UL>
<LI>
<CODE>t1lib</CODE> (version 1.2 or higher)
<A HREF="ftp://sunsite.unc.edu/pub/Linux/libs/graphics/">ftp://sunsite.unc.edu/pub/Linux/libs/graphics/</A> This library is
not required, however, if you have it, you will be able to use Type1
fonts independently from the X font server. Furthermore, you will be
able to render anti-aliased text. This library is also needed in the
case you want to export MathML to PostScript.  Note that the
configuration script is usually able to autodetect the library, if
installed, however you will have to configure some files and
environment variables. See the section about font installation below.
</UL>
<P>

<A NAME="Installing"></A>
<HR SIZE="6">
<A NAME="SEC5"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC4"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC6"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.3 Installing </H2>
<!--docid::SEC5::-->
Keep in mind that the widget will not compile if <CODE>GMetaDOM</CODE> is
not installed.  See the INSTALL file included in the source
distribution for detailed compilation and installation
instructions. After installation you will have the following files:
<P>

<UL>
<LI>
`<TT>/usr/local/bin/gtkmathview-config</TT>' this is the configuration
script. Use <CODE>gtkmathview-config --cflags</CODE> to get compilation
flags of source files using the widget. Use <CODE>gtkmathview-config
--libs</CODE> to get linking flags and libraries to be linked with your object
files.
<LI>
`<TT>/usr/local/include/gtkmathview/</TT>' include files (you have to include
`<TT>gtkmathview.h</TT>').
<LI>
`<TT>/usr/local/lib/</TT>' libraries. Unless you
gave <CODE>configure</CODE> one of `<SAMP>--disable-static</SAMP>' or
`<SAMP>--disable-shared</SAMP>' you will find in this directory both static and shared
versions of the widget.
<LI>
`<TT>/usr/local/info/</TT>', the info file. You can browse it with the
command <CODE>info -f /usr/local/info/gtkmathview.info</CODE>.
<LI>
`<TT>/usr/local/share/gtkmathview/</TT>' some configuration files (fonts,
operator dictionary and general configuration) along with their DTDs.
</UL>
<P>

<A NAME="Compile and Link"></A>
<HR SIZE="6">
<A NAME="SEC6"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC5"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC7"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.4 Compile and Link </H2>
<!--docid::SEC6::-->
<P>

To compile a source file which uses the widget use the command
</P><P>

<CODE>gcc -c filename.c -l... -I... `gtkmathview-config --cflags`</CODE>
</P><P>

The widget is compiled by default to generate both static and shared
object file.  It can be linked dynamically against your applications
with the command:
</P><P>

<CODE>gcc -o appname *.o `gtkmathview-config --libs`</CODE>
</P><P>

<A NAME="Configuration"></A>
<HR SIZE="6">
<A NAME="SEC7"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC6"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC8"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.5 Configuration </H2>
<!--docid::SEC7::-->
<P>

The widget can be partly configured after instantiation by using the
provided methods described in <A HREF="gtkmathview.html#SEC22">6. GTK+ Interface</A>. However, most of
the configuration is specified in an external file whose path can be
set in the environment variable <CODE>MATHENGINECONF</CODE>. In case the
environment variable is not set, the widget will try to read the
configuration file from the default location, which typically is
<CODE>/usr/local/share/gtkmathview</CODE>.
</P><P>

<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC8">2.5.1 Main Configuration File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Basic configuration</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC9">2.5.2 Operator Dictionary</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Setting the default value for operator attributes</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC10">2.5.3 Font Setup</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the widget maps Unicode characters into glyphs</TD></TR>
</TABLE></BLOCKQUOTE>
<P>

<A NAME="Main Configuration File"></A>
<HR SIZE="6">
<A NAME="SEC8"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC7"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC9"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC6"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 2.5.1 Main Configuration File </H3>
<!--docid::SEC8::-->
<P>

The main configuration file is an XML document whose root element must
be <CODE>math-engine-configuration</CODE>. The children of the root
element determine the value of a number of parameter that are
described below:
</P><P>

<UL>
<LI><CODE>dictionary-path</CODE>: the content of this element is the
full path of the XML file describing the content of the operator
dictionary used by GtkMathView.
<P>

There can be more instances of the <CODE>dictionary-path</CODE> element,
each pointing to a different dictionary. If an entry of the dictionary
is defined multiple times, possibly within different dictionaries, the
last definition is the one that matters. This way it is possible to
define the suggested operator dictionary as by the MathML
specification, and then customize it depending on the application
needs.
</P><P>

The format of the operator dictionary will be detailed in
<A HREF="gtkmathview.html#SEC9">2.5.2 Operator Dictionary</A>.
</P><P>

<LI><CODE>font-configuration-path</CODE>: the content of this element
is the full path of the XML file describing the font configuration.
<P>

There are usually several instances of the
<CODE>font-configuration-path</CODE> element.
</P><P>

The format of the font configuration file will be detailed in
<A HREF="gtkmathview.html#SEC10">2.5.3 Font Setup</A>.
</P><P>

<LI><CODE>t1-config-path</CODE>: the content of this element is the
full path of the <CODE>t1lib</CODE> font configuration file.  The format of
this file is detailed in the <CODE>t1lib</CODE> documentation and will not
be described here. Also, this entry is only necessary if the use of
Type~1 fonts is required.
<P>

<LI><CODE>font-size</CODE>: the attribute <CODE>size</CODE> of this
element can be used to set the default value of font size used for
rendering the MathML document. The number must be followed by the
appropriate unit (typically points). For example, to set the default
font size to 12 points the <CODE>size</CODE> attribute must be set to the
string <CODE>12pt</CODE>. The set of valid units is the same as the set of
units allowed in MathML documents; it is also described in
 <A HREF="gtkmathview.html#units">units</A>. An application using GtkMathView can override the default
font size by invoking the <CODE>gtk_math_view_set_font_size</CODE> method
which is described in <A HREF="gtkmathview.html#SEC22">6. GTK+ Interface</A>.
<P>

<LI><CODE>color</CODE>: default color of the rendered document. The
attributes <CODE>foreground</CODE> and <CODE>background</CODE> determine the
foreground and background colors respectively. The format of the two
attributes is the same as for color specifications on MathML elements
accepting the <CODE>mathcolor</CODE> attribute. In particular, it is
possible to use one of the named colors defined by the HTML
specification, or to use an RGB format (a `#' sign followed by 3 or 6
hexadecimal digits).
<P>

<LI><CODE>link-color</CODE>: default color of tokens with an
<CODE>xlink:href</CODE> attribute. The format of the two <CODE>foreground</CODE>
and <CODE>background</CODE> attributes is the same as for the <CODE>color</CODE>
element.
<P>

<LI><CODE>select-color</CODE>: color combination used for selections.
The format of the two <CODE>foreground</CODE> and <CODE>background</CODE>
attributes is the same as for the <CODE>color</CODE> element.
<P>

</UL>
<P>

<A NAME="Operator Dictionary"></A>
<HR SIZE="6">
<A NAME="SEC9"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC8"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC10"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC6"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 2.5.2 Operator Dictionary </H3>
<!--docid::SEC9::-->
<P>

The operator dictionary defines the default value of a number of
attributes that applies to <CODE>mo</CODE> elements. The exact definition of
the operator dictionary along with the attributes that can be set is
described in the MathML specification<A NAME="DOCF1" HREF="gtkmathview.html#FOOT1">(1)</A>}
</P><P>

The dictionary XML file is made of a <CODE>dictionary</CODE> element with an
arbitrary number of <CODE>operator</CODE> children. For each operator the
following attributes can be used: <CODE>name</CODE> (this is required),
<CODE>form</CODE> (this is also required and can be one of <CODE>prefix</CODE>,
<CODE>infix</CODE>, or <CODE>postfix</CODE>), <CODE>fence</CODE>, <CODE>separator</CODE>,
<CODE>lspace</CODE>, <CODE>rspace</CODE>, <CODE>stretchy</CODE>, <CODE>symmetric</CODE>,
<CODE>maxsize</CODE>, <CODE>minsize</CODE>, <CODE>largeop</CODE>, <CODE>movablelimits</CODE>,
<CODE>accent</CODE>. The syntax for the attributes is the same as the one
specified in the MathML recommendation.
</P><P>

In addition, two extension attributes <CODE>tspace</CODE> and <CODE>bspace</CODE>
can be defined. They represent the amount of space respectively at the
top and at the bottom of an operator. They are usually ignored, unless
the widget has been configured with the <CODE>--enable-extensions</CODE>
flag set.
</P><P>

A sample entry for the operator dictionary is the following,
describing the default attributes for an open parenthesis when it is
in prefix position (that is, the parenthesis is the first child of a
(possibly inferred) <CODE>mrow</CODE> element): 
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>  &#60;operator name="(" form="prefix" fence="true"
            stretchy="true" lspace="0em" rspace="0em"/&#62;
</pre></td></tr></table></P><P>

<A NAME="Font Setup"></A>
<HR SIZE="6">
<A NAME="SEC10"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC9"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC6"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 2.5.3 Font Setup </H3>
<!--docid::SEC10::-->
Font configuration defines the mapping from Unicode<A NAME="DOCF2" HREF="gtkmathview.html#FOOT2">(2)</A> characters to glyph indexes inside
system fonts.  Although font configuration should be done once and for
all, and the widget already comes with a sensible configuration for
most math fonts, we will describe the font configuration format so
that users know how to extend their configuration, or to correct the
existing one in case of errors.
<P>

The font configuration XML file is made of a <CODE>font-configuration</CODE>
element with an arbitrary number of <CODE>font</CODE> and <CODE>map</CODE>
children. <CODE>font</CODE> children define how abstract font descriptions
are mapped into system font descriptions, whereas <CODE>map</CODE> children
define an actual mapping of Unicode characters into glyph indexes for
a particular font. Every <CODE>font</CODE> abstract description <EM>must
have</EM> a reference to a <CODE>map</CODE> element. The reason why font
abstract descriptions and maps are kept separate is that many
different font abstract descriptions may share the same font map,
hence it is convenient to use an indirection instead of replicating
the map each time it is needed.
</P><P>

Each <CODE>font</CODE> element has the following attributes:
</P><P>

<STRONG>Font Classification.</STRONG>
<UL>
<LI><CODE>type</CODE>: type of the font. Currently <CODE>x</CODE> (for X)
or <CODE>ps</CODE> (for PostScript, Type1) fonts are supported.
<P>

<LI><CODE>mode</CODE>: mode for which the font should be used. May be
one of <CODE>any</CODE>, <CODE>text</CODE>, or <CODE>math</CODE>.
<P>

<LI><CODE>mapping</CODE>: reference to the corresponding <CODE>map</CODE>
element. It can be an arbitrary non-empty string.
</UL>
<P>

<STRONG>Font Description</STRONG>:
<UL>
<LI><CODE>family</CODE>: the font family. This field is not fixed,
but the most common values are <CODE>serif</CODE>, <CODE>sans-serif</CODE>,
<CODE>monospace</CODE>;
<P>

<LI><CODE>style</CODE>: either <CODE>normal</CODE> or <CODE>italic</CODE>;
<P>

<LI><CODE>weight</CODE>: either <CODE>normal</CODE> or <CODE>bold</CODE>;
<P>

<LI><CODE>size</CODE>: preferred size at which the font should be used.
If not specified the font will be magnified to the desired size.
</UL>
<P>

<STRONG>Specific Font Data.</STRONG> The set of valid attributes depends on
the <CODE>type</CODE> attribute.  For X fonts, the attributes are
<CODE>x-foundry</CODE>, <CODE>x-family</CODE>, <CODE>x-weight</CODE>, <CODE>x-slant</CODE>,
<CODE>x-width</CODE>, <CODE>x-style</CODE>, <CODE>x-pixels</CODE>, <CODE>x-points</CODE>,
<CODE>x-hres</CODE>, <CODE>x-vres</CODE>, <CODE>x-spacing</CODE>, <CODE>x-avgwidth</CODE>,
<CODE>x-registry</CODE>, <CODE>x-encoding</CODE>. Their syntax follows the syntax
for X font specifications.
</P><P>

For PostScript (or Type1) fonts, the attributes are <CODE>ps-name</CODE> and
<CODE>ps-file</CODE> specifying the PostScript name of the font and the file
name that contains the font, respectively.
</P><P>

Each <CODE>map</CODE> element has an <CODE>id</CODE> attribute that font abstract
specifications can refer to and has an arbitrary list of
<CODE>single</CODE>, <CODE>range</CODE>, <CODE>multi</CODE>, or <CODE>stretchy</CODE>
children. Whenever Unicode characters or glyph indexes need to be
referenced from the maps, they can be given in hexadecimal (with
<CODE>0x</CODE> prefix), octal (with <CODE>0</CODE> prefix), or decimal (in all
the other cases). Unicode characters can also be specified by simply
inserting the character (or a character reference) into the attribute.
</P><P>

A <CODE>single</CODE> child specifies the mapping for a single Unicode
character.  The Unicode character is specified in the <CODE>code</CODE>
attribute, its index in the <CODE>index</CODE> attribute.
</P><P>

A <CODE>range</CODE> child specifies the mapping for a range of Unicode
characters. The first and last characters (inclusive) in the range are
specified in the <CODE>first</CODE> and <CODE>last</CODE> attributes,
respectively. The attribute <CODE>offset</CODE> specifies the index of the
glyph corresponding to the <CODE>first</CODE> character.
</P><P>

A <CODE>multi</CODE> child specifies the mapping for a range of Unicode
characters whose glyph indexes do not follow the same order, or are
not all available. In this case the <CODE>index</CODE> attribute is a space
separated list of glyph indexes, each related to the corresponding
Unicode character in the range. If there is no glyph corresponding to
a given Unicode character, the constant <CODE>-1</CODE> must be used.
</P><P>

A <CODE>stretchy</CODE> child specifies the mapping of a stretchable Unicode
character, that is a character that can be formatted in different
sizes, depending on the context. The <CODE>code</CODE> attribute specifies
the Unicode character, and the <CODE>direction</CODE> attribute specifies
whether the character can be stretched horizontally
(<CODE>horizontal</CODE>), vertically (<CODE>vertical</CODE>), or in both
directions (<CODE>both</CODE>). A stretchy character has a mandatory
<CODE>simple</CODE> child optionally followed by a <CODE>compound</CODE> child.
The <CODE>simple</CODE> child has an <CODE>index</CODE> attribute that specifies
the glyph indexes (separated by spaces) corresponding to the character
as a whole, in increasing order of size. The <CODE>compound</CODE> child has
an <CODE>index</CODE> attribute that specifies the glyph indexes (separated
by spaces) corresponding to the dismantled pieces that can be combined
to build up the character. There must be 4 entries corresponding to
the leftmost (or bottommost) piece, the middle piece, the rightmost
(or topmost) piece, and the piece that can be repeated at will to make
the symbol as hight (or wide) as required.
</P><P>

For example, a specification like
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;stretchy code="(" direction="vertical"&#62;
  &#60;simple index="0000 0020 0022 0040"/&#62;
  &#60;compound index="0060 -1 0100 0102"/&#62;
&#60;/stretchy&#62;
</pre></td></tr></table></P><P>

says that the open round parenthesis is available as simple
glyphs at the positions <CODE>0000</CODE>, <CODE>0020</CODE>, <CODE>0022</CODE>,
<CODE>0040</CODE>. Those glyphs are listed in increasing order of size.  In
case there is the need of an even bigger parenthesis, it can be
combined by using the <CODE>0060</CODE> glyph for the bottommost piece,
<CODE>0100</CODE> glyph for the topmost piece, and <CODE>0102</CODE> as the glyph
that can be repeated at will.
</P><P>

<STRONG>A special note about True Type fonts</STRONG>: recent X servers can
render a wide variety of fonts, including True Type fonts usually
shipped with Microsoft Windows. These fonts have more flexible scaling
capabilities and you could find the final rendering really improved by
their use.  Since their handling is almost completely hidden inside
the X font server, the widget needs not any special configuration to
use them, apart from a proper setting of the font configuration file
(`<TT>font-configuration.xml</TT>'). 
</P><P>

<STRONG>Type1 fonts and the t1lib library</STRONG>: starting from version
0.2.0, the rendering engine can use the <CODE>t1lib</CODE> library to render
Type1 fonts.  It is known that <CODE>t1lib</CODE> has some bugs that can
cause the widget to crash, especially in version 0.4.1 or later.  Here
are some tips to configure the engine so that you can use Type1 fonts
(please, consult the <CODE>t1lib</CODE> documentation at library's home page
for firther details).
</P><P>

First of all, you have to setup a little configuration file for the
<CODE>t1lib</CODE> library.  Call this file `<TT>t1.config</TT>' and place it
somewhere in your home directory.  Here is a sample file (also
provided with the standard distribution):
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>#
#
ENCODING=.
AFM=/usr/share/texmf/fonts/afm/
TYPE1=/usr/share/texmf/fonts/type1/bluesky/cm/:.
</pre></td></tr></table></P><P>

In particular, you have to specify where your Type1 fonts reside
(<CODE>TYPE1</CODE>) along with their metrics (<CODE>AFM</CODE>). Metric
information in optional, since it can be (mostly) recovered from the
font file itself. However, metrics from the <CODE>AFM</CODE> file can be
more precise than that automatically inferred. A sample configuration
file for <CODE>t1lib</CODE> is included in the standard distribution of
<CODE>gtkmathview</CODE> and is installed in
`<TT>/usr/local/share/gtkmathview/</TT>'.
</P><P>

Next, you have to setup an environment variable <CODE>T1LIB_CONFIG</CODE>
with the full path to this configuration file. For example, if you use
<CODE>bash</CODE>:
</P><P>

<CODE>export T1LIB_CONFIG=./config/t1.config</CODE>
</P><P>

And, if you use <CODE>tcsh</CODE>:
</P><P>

<CODE>setenv T1LIB_CONFIG ./config/t1.config</CODE>
</P><P>

Now you are ready to use Type1 fonts.
</P><P>

<A NAME="Interactivity Support"></A>
<HR SIZE="6">
<A NAME="SEC11"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC10"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC12"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 3. Interactivity Support </H1>
<!--docid::SEC11::-->
<P>

GtkMathView's support for interaction support can be summarized in
three aspects, <EM>selection</EM>, <EM>point-and-click</EM>, and
<EM>editing</EM>, which we will define more precisely in the sections
that follows.
</P><P>

Interactivity support often implies re-rendering of the displayed
MathML document. As this can be an expensive operation, especially
when several actions take place in rapid succession, GtkMathView
provides for two methods (<CODE>gtk_math_view_freeze</CODE> and
<CODE>gtk_math_view_thaw</CODE>) that delay any re-computation and update of
the displaying window until the application has terminated the action.
</P><P>

As a matter of fact, due to the current design of GtkMathView's
architecture, the use of these two methods is <EM>mandatory</EM> in that
the displayed window is guaranteed to be updated correctly only if the
two methods are properly used. Although we perceive this as a
limitation, the points in favor are the following:
</P><P>

<UL>
<LI>we found that in most cases the handling of the action already
justifies the use of <CODE>gtk_math_view_freeze</CODE> and
<CODE>gtk_math_view_thaw</CODE>, as a way of improving performances;
<P>

<LI>they are lightweight methods that have a negligible impact in
the user application;
<P>

<LI>because of the DOM-driven architecture, the implementation of
the alternative mechanism seems to violate the clear separation of the
platform-independent engine from the graphical interface.
</UL>
<P>

It is safe to nest calls to <CODE>gtk_math_view_freeze</CODE> and
<CODE>gtk_math_view_thaw</CODE> methods at any level.
</P><P>

<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC12">3.1 Selection</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Highlighting sub-expressions</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC13">3.2 Point-and-click Functionalities</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Handling of basic mouse events</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC14">3.3 Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Changind the source document tree</TD></TR>
</TABLE></BLOCKQUOTE>
<P>

<A NAME="Selection"></A>
<HR SIZE="6">
<A NAME="SEC12"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC13"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.1 Selection </H2>
<!--docid::SEC12::-->
<P>

By <EM>selection</EM> we mean the possibility for the user to
distinguish one or more DOM elements from the others in a MathML
document. The typical visual feedback for selected elements is that of
displaying them with a different background color.
</P><P>

Selection support in GtkMathView consists of three methods and four
signals. The methods are needed to set and query about the selection
status of a particular MathML element, as this information is hidden
within the internal data structures of GtkMathView and is not
available as part of the MathML document itself. Selection is a
boolean property: an element can be either selected or not, there are
no multiple levels of selection.
</P><P>

Both <CODE>gtk_math_view_select</CODE> and <CODE>gtk_math_view_unselect</CODE>
operate recursively on the given MathML element and also on all its
descendants, but the <CODE>gtk_math_view_unselect</CODE> method can be used
to perforate a previously selected element thus leaving a "hole"
within a selection. This mechanism can be exploited for representing
<EM>patterns</EM> of elements within the MathML documents.
</P><P>

The signals related to selection are <CODE>select_begin</CODE>,
<CODE>select_end</CODE>, <CODE>select_over</CODE>, and <CODE>select_abort</CODE>. The
first three signals have two arguments, the MathML element on which
the signal has been emitted and the status of control keys on the
keyboard. The four signals are fired in disjoint sequences matching
the following regular expression:
<TABLE><tr><td>&nbsp;</td><td class=example><pre>select_begin select_over* (select_end | select_abort)
</pre></td></tr></table></P><P>

which is to be read as follows: selection begins when the user presses
the first mouse button and moves it a bit from the original
position. As the user moves the mouse with the button pressed, an
arbitrary number of <CODE>select_over</CODE> signals is emitted. Selection
can terminate in two cases: either the user releases the button
(<CODE>select_end</CODE>) or he/she presses another mouse button, hence
aborting the selection (<CODE>select_abort</CODE>).
</P><P>

An interface for which multiple selections are required can check the
status of control keys on the keyboard in order to determine whether a
new selection sequence replaces a previous selection or adds a new
selection to it.
</P><P>

<STRONG>Support for semantic selection.</STRONG> The widget does not highlight
automatically the parts of the document on which the user is dragging
the mouse. It is complete responsibility of the application to handle
the selection signals and to invoke the <CODE>gtk_math_view_select</CODE>
method appropriately. Although this puts some burden on the
application side, it also enables the maximum flexibility, as
selection may be constrained in ways that, in the most general case,
are infeasible to hard code within GtkMathView.
</P><P>

<A NAME="Point-and-click Functionalities"></A>
<HR SIZE="6">
<A NAME="SEC13"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC12"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC14"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.2 Point-and-click Functionalities </H2>
<!--docid::SEC13::-->
<P>

Point-and-click is supported by the <CODE>click</CODE> signal, which is
emitted when the users clicks on the MathML document. The two
arguments of the signal are the deepest MathML element on which the
mouse was placed at the time of the click or <CODE>NULL</CODE> if there is
no such element, and the status of the control keys on the keyboard.
</P><P>

Among the possible usages for this signal are the activation of
hyperlinks and the management of <CODE>maction</CODE> elements. When the
user clicks on the document, the event handler can look for a MathML
element that has a <CODE>xlink:href</CODE> attribute set, and render that
document. The search is typically done by starting from the element
provided by the signal, and possibly climbing up the chain of elements
until one with the required attribute is found, or the root element is
reached, or any other application-specific condition applies.
</P><P>

Activation of <CODE>maction</CODE> elements works in the same way. Currently
only the <CODE>toggle</CODE> action is supported by GtkMathView. In
particular, once the <CODE>maction</CODE> element is found, it is possible
to increase the number found in the <CODE>selection</CODE> attribute, which
determines which of the <CODE>maction</CODE>'s children is displayed. If the
<CODE>selection</CODE> is increased beyond the actual number of children,
GtkMathView will recast it into a valid range via a modulo
operation. This way the application code for handling <CODE>maction</CODE>
does not have to know the exact number of children, and is thus
simplified. Note however that this behavior is not mandated by the
MathML recommendation, and can differ in other MathML rendering
engines. Once the <CODE>selection</CODE> attribute is set with the new
value, GtkMathView will recompute automatically the document's layout.
</P><P>

Possible conflicts in case the <CODE>xlink:href</CODE> is set on an
<CODE>maction</CODE> element must be resolved by the signal handler.
</P><P>

<A NAME="Editing"></A>
<HR SIZE="6">
<A NAME="SEC14"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC13"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 3.3 Editing </H2>
<!--docid::SEC14::-->
<P>

The notion of <EM>editing</EM> in the context of GtkMathView is very
limited. It simply refers to the fact that GtkMathView reacts
<EM>automatically</EM> as the source MathML document changes, but
GtkMathView itself does not enforce any constraints on how and when
the document can change. The management of <CODE>maction</CODE> can be seen
as a very particular kind of editing, as it involves a modification of
the source document tree.
</P><P>

GtkMathView implements a number of internal mechanisms that try to
optimize rendering, in the sense of minimizing the amount of
computation that is needed to re-render a document after a
modification has occurred.
</P><P>

Note also that in some cases local modifications may have non-local
effects. For instance, modifying the content of a table cell may
cause the re-computation of the whole table layout, as MathML
attributes for table can specify constraints among cells in different
columns or rows.
</P><P>

<A NAME="Sample Application"></A>
<HR SIZE="6">
<A NAME="SEC15"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC14"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC11"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 4. Sample Application </H1>
<!--docid::SEC15::-->
<P>

In this section we show a minimal GTK+ application that uses
GtkMathView for displaying a MathML document. The application is
intentionally small and only shows a small subset of GtkMathView
capabilities. More complex examples, including sophisticated
selections and <CODE>maction</CODE> handling, can be found in the
GtkMathView source distribution.
</P><P>

The application begins, as usual, with some <CODE>#include</CODE> directives
that load the necessary <CODE>.h</CODE> files. Note in particular that the
<CODE>gtkmathview.h</CODE> header file must be included in order to use the
widget.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>#include &#60;stdio.h&#62;
#include &#60;gtk/gtk.h&#62;
#include &#60;gtkmathview.h&#62;
</pre></td></tr></table></P><P>

Next we declare a number of global variables that represent the main
components of the graphical interface. The reason why these variables
are global is that we may need to reference them from outside the
<CODE>main</CODE> function, where they are initialized.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>static GtkWidget* window = NULL;
static GtkWidget* main_vbox = NULL;
static GtkWidget* main_area = NULL;
static GtkWidget* scrolled_area = NULL;
</pre></td></tr></table></P><P>

We also need two global variables to support selection:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>static GdomeElement* first_selected = NULL;
static GdomeElement* root_selected = NULL;
</pre></td></tr></table></P><P>

The following is an auxiliary function that loads the MathML document
whose URI is specified in <CODE>name</CODE> inside the widget.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>static int
load_document(const char* name)
{
  GtkMathView* math_view = GTK_MATH_VIEW(main_area);

  g_return_val_if_fail(name != NULL, -1);
  g_return_val_if_fail(math_view != NULL, -1);

  return gtk_math_view_load_uri(math_view, name);
}
</pre></td></tr></table></P><P>

The <CODE>click</CODE> function will be responsible for handling
<CODE>click</CODE> signals as they are emitted. Note that the function takes
three arguments: the GtkMathView widget that has generated the signal
(<VAR>math_view</VAR>), the MathML element on which the user has clicked
(<VAR>elem</VAR>), and finally the status of control keys.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>static void
click(GtkMathView* math_view, GdomeElement* elem, gint state)
{
  g_return_if_fail(math_view != NULL);

  printf("*** click signal: %p %x\n", elem, state);

  if (elem != NULL)
    {
      /* do something with the element */
    }
}
</pre></td></tr></table></P><P>

The implementation of the selection mechanism is slightly more
complicated as it involves handling at least two different signals.
Upon receiving the <CODE>select_begin</CODE> signal the current selection,
if present, is deleted, and the two global variables
<CODE>first_selected</CODE> and <CODE>root_selected</CODE> are initialized with
the element <VAR>elem</VAR> under the mouse pointer at the time selection
was initiated. The element, if not <CODE>NULL</CODE>, is highlighted.
</P><P>

Note that the whole body of the signal handler begins with a
<CODE>gtk_math_view_freeze</CODE> operation and ends with a
<CODE>gtk_math_view_thaw</CODE> operation. This means that the display
window is not updated until the signal handler terminates, with two
advantages: the method is more efficient as GtkMathView updates
only once, after two operations have been completed, and also we avoid
the problem of flickering in case the previously selected area
overlaps with the new one.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>static void
select_begin(GtkMathView* math_view, GdomeElement* elem, gint state)
{
  gtk_math_view_freeze(math_view);

  if (root_selected != NULL)
    gtk_math_view_unselect(math_view, root_selected);

  first_selected = root_selected = elem;

  if (root_selected != NULL)
    gtk_math_view_select(math_view, elem);

  gtk_math_view_thaw(math_view);
}
</pre></td></tr></table></P><P>

Next we have to handle the signal emitted as the user drags the mouse
keeping the button pressed. The idea is that <VAR>first_selected</VAR>
remembers the element on which selection was initiated. As the mouse
pointer is moved over the document, it crosses other elements. From
<VAR>first_selected</VAR> and the current element <VAR>elem</VAR> it is possible
to compute the smallest DOM subtree selected. In the sample code this
operation is accomplished by the <VAR>common_ancestor</VAR>, which is left
unspecified here.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>static void
select_over(GtkMathView* math_view, GdomeElement* elem, gint state)
{
  gtk_math_view_freeze(math_view);

  if (root_selected != NULL)
    gtk_math_view_unselect(math_view, root_selected);

  root_selected = common_ancestor(first_selected, elem);

  if (root_selected != NULL)
    gtk_math_view_select(math_view, elem);

  gtk_math_view_thaw(math_view);
}
</pre></td></tr></table></P><P>

Note that the sample code does not implement any mechanism for
semantic selection, but the idea is that the two signal handlers (as
well as the remaining ones not shown here for simplicity), can be made
as complex as the application needs. In particular, the computation of
the selected root (<VAR>common_ancestor</VAR>) can be specialized so to
search the smallest DOM subtree that meets the desired requirements as
the application needs.
</P><P>

In order to complete the application, let us examine the <CODE>main</CODE>
function, which creates the graphical interface, along with an
instance of the GtkMathView widget, attaches the <CODE>delete_event</CODE>
to the closing button of the window so that the window is
automatically destroyed when the user closes it, and connects the
signal handlers. Then the document whose URI is passed on the command
line of the application is loaded into GtkMathView, and the control is
finally transferred to GTK+.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>main(int argc, char *argv[])
{
  gtk_init(&#38;argc, &#38;argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect(GTK_OBJECT(window), "delete_event",
                     (GtkSignalFunc) gtk_main_quit, NULL);
  gtk_widget_show(window);

  main_vbox = gtk_vbox_new(FALSE, 1);
  gtk_container_border_width(GTK_CONTAINER(main_vbox), 1);
  gtk_container_add(GTK_CONTAINER(window), main_vbox);
  gtk_widget_show(main_vbox);

  main_area = gtk_math_view_new(NULL, NULL);
  gtk_widget_show(main_area);

  gtk_signal_connect_object (GTK_OBJECT (main_area), 
                             "click", GTK_SIGNAL_FUNC(click),
                             (gpointer) main_area);

  gtk_signal_connect_object (GTK_OBJECT (main_area), 
                             "select_begin", GTK_SIGNAL_FUNC(select_begin),
                             (gpointer) main_area);

  gtk_signal_connect_object (GTK_OBJECT (main_area), 
                             "select_over", GTK_SIGNAL_FUNC(select_over),
                             (gpointer) main_area);

  scrolled_area = gtk_scrolled_window_new(NULL, NULL);
  gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_area),
                                 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  gtk_widget_show(scrolled_area);
  gtk_container_add(GTK_CONTAINER(scrolled_area), main_area);
  gtk_box_pack_start(GTK_BOX(main_vbox), scrolled_area, TRUE, TRUE, 0);

  load_document(argv[1]);

  gtk_main();
}
</pre></td></tr></table></P><P>

<STRONG>A note on memory management.</STRONG> It is important to mention that
the objects of the DOM implementation (\code{Gdome2}) used in the
sample code are subject to a memory management system that is based on
reference counting. This means that every time a pointer to a DOM
object (like a <CODE>GdomeElement*</CODE> in the example) is stored in some
variable, the application has to explicitly increment its reference
counter so that the object is not deallocated. For the sake of brevity
every operation involving the reference counting mechanism has been
omitted, but it is crucial to use it correctly in every application,
no matter how simple the operations are. In this respect, the use of
the corresponding C++ library (<CODE>GMetaDOM</CODE>) simplifies
significantly the work of the programmer, as the DOM objects are
accessed by means of <EM>smart pointers</EM> that take care of the
reference counter automatically, without explicit intervention from
the programmer's side.
</P><P>

<A NAME="C++ Interface"></A>
<HR SIZE="6">
<A NAME="SEC16"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC17"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC15"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC22"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 5. C++ Interface </H1>
<!--docid::SEC16::-->
In this chapter we will describe the C++ class
<CODE>MathMLRenderingEngine</CODE> which provides access to all the
functionalities of the rendering engine from a C++ program. The GTK+
widget is just a wrapper of this class with particular support for
GTK.
<P>

<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC17">5.1 Lengths</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">About Lengths</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC18">5.2 Boxes and Rectangles</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC21">5.3 The MathMLRenderingEngine Class</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>

<A NAME="Lengths"></A>
<HR SIZE="6">
<A NAME="SEC17"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC18"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC22"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 5.1 Lengths </H2>
<!--docid::SEC17::-->
A brief introduction is devoted to lengths, since they are a
fundamental concept in the engine. From the user point of view,
lengths can be expressed in many ways. For example, one might prefer
using decimal units such as centimeters of millimeters, while others
might prefer using inches or other typographical units. However, the
engine uses internally a single unit which is called <EM>scaled
point</EM>. It is the same unit as used by TeX.
<P>

From the point of view of the programmer, a <EM>scaled point</EM> is a
floating point number, though it can be turned into fixed-pointer
number giving the option `<SAMP>--disable-floating</SAMP>' while configuring
the widget.  Doing so is not particularly recommended, since with most
modern microprocessor floating-point arithmetics is rather efficient.
</P><P>

Another unit of measure which is of particular interest for the
programmer is the <EM>pixel</EM>. Unfortunately, there is not a unique
correspondence between pixels and scaled points. Theoretically, their
relationship should depend on the resolution of the output device
involved for rendering (usually, the display). Since this resolution
is not available in general and often is also misconfigured, it has
been fixed in the rendering engine to be 72 dots per inch (DPI), which
gives pretty good results. Its value can be changed by modifing the
file `<TT>src/defs.h</TT>'.
</P><P>

The following table summarizes the relationships between scaled points
and the other units of measure recognized by the widget.
</P><P>

<A NAME="units"></A>
<TABLE>
<TR><TD></TD><TD> <EM>Unit</EM> </TD><TD> <EM>Name</EM> </TD><TD> <EM>scaled points</EM> </TD><TD></TD>
</TR>
<TR><TD></TD><TD> mm </TD><TD> millimeter </TD><TD> 186467.98 </TD><TD></TD>
</TR>
<TR><TD></TD><TD> cm </TD><TD> centimeter </TD><TD> 1864679.8 </TD><TD></TD>
</TR>
<TR><TD></TD><TD> pt </TD><TD> point </TD><TD> 65536 </TD><TD></TD>
</TR>
<TR><TD></TD><TD> pc </TD><TD> pica </TD><TD> 786432 </TD><TD></TD>
</TR>
<TR><TD></TD><TD> in </TD><TD> inch </TD><TD> 65536 * 72.27 </TD><TD></TD>
</TR>
<TR><TD></TD><TD> px </TD><TD> pixel </TD><TD> 65536 * 72.27 / DPI </TD><TD></TD>
</TR></TABLE>
<P>

The include file `<TT>src/scaled.hh</TT>' defines several conversion
functions to convert from one unit to another. The following table
summarizes the conversion availables.
</P><P>

<A NAME="IDX1"></A>
<DL>
<DT><U>Inline Function:</U> scaled <B><VAR>xx</VAR>2sp</B> <I>(float <VAR>v</VAR>)</I>
<DD>convert the value <VAR>v</VAR> expressed in the <VAR>xx</VAR> unit into scaled
points.
</DL>
</P><P>

<A NAME="IDX2"></A>
<DL>
<DT><U>Inline Function:</U> float <B>sp2<VAR>xx</VAR></B> <I>(scaled <VAR>sp</VAR>)</I>
<DD>convert <VAR>sp</VAR> scaled points into the unit <VAR>xx</VAR>.
</DL>
</P><P>

<A NAME="IDX3"></A>
<DL>
<DT><U>Inline Function:</U> int <B>sp2ipx</B> <I>(scaled <VAR>sp</VAR>)</I>
<DD>convert <VAR>sp</VAR> scaled points into an integral number of pixels.
</DL>
</P><P>

The system of coordinates depends on the actual drawing area used for
the rendering. For example, the standard "browser-like" coordinate
system has the vertical components growing to the bottom. On the other
hand, PostScript has the vertical components growing to the top. In
either case, when referring to vertical coordinates, "lower" means
"nearer to the origin".
</P><P>

<A NAME="Boxes and Rectangles"></A>
<HR SIZE="6">
<A NAME="SEC18"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC17"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC19"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC21"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 5.2 Boxes and Rectangles </H2>
<!--docid::SEC18::-->
MathML elements are enclosed inside rectangles and boxes.
<P>

<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC19">5.2.1 Rectangles</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC20">5.2.2 Bounding Boxes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>

<A NAME="Rectangles"></A>
<HR SIZE="6">
<A NAME="SEC19"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC18"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC20"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC18"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC21"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 5.2.1 Rectangles </H3>
<!--docid::SEC19::-->
<P>

A rectangle is a tuple consisting of four components which locate the
element by means of absolute coordinates.
</P><P>

<A NAME="IDX4"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>void</B> <I>Zero ()</I>
<DD>Set all the instance variables <VAR>x</VAR>, <VAR>y</VAR>, <VAR>width</VAR> and <VAR>height</VAR> to zero.
</DL>
</P><P>

<A NAME="IDX5"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>bool</B> <I>Overlaps (const Rectangle&#38; <VAR>rect</VAR>)</I>
<DD>Return <CODE>true</CODE> if the rectangle (partially) overlaps with <VAR>rect</VAR>.
</DL>
</P><P>

<A NAME="IDX6"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>bool</B> <I>Overlaps (scaled <VAR>x0</VAR>, scaled <VAR>y0</VAR>, scaled <VAR>w0</VAR>, scaled <VAR>h0</VAR>)</I>
<DD>Same as the previous method, but the rectangle is given in its components.
</DL>
</P><P>

<A NAME="IDX7"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>bool</B> <I>IsNull ()</I>
<DD>Return <CODE>true</CODE> if the rectangle is null, that is if either <VAR>width</VAR> or <VAR>height</VAR>
is strictly less than a predefined constant <CODE>EPSILON</CODE>.
</DL>
</P><P>

<A NAME="IDX8"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>bool</B> <I>IsInside (scaled <VAR>x</VAR>, scaled <VAR>y</VAR>)</I>
<DD>Return <CODE>true</CODE> if the point (<VAR>x</VAR>, <VAR>y</VAR>) is inside the rectangle.
</DL>
</P><P>

<A NAME="IDX9"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>void</B> <I>Union (const Rectangle&#38; <VAR>rect</VAR>)</I>
<DD>Set the rectangle as the smallest rectangle which comprises both <VAR>*this</VAR> and <VAR>rect</VAR>.
</DL>
</P><P>

<A NAME="IDX10"></A>
<DL>
<DT><U>Method:</U> Rectangle <B>void</B> <I>Dump ()</I>
<DD>Debug method.
</DL>
</P><P>

<A NAME="Bounding Boxes"></A>
<HR SIZE="6">
<A NAME="SEC20"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC19"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC21"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC18"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC21"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 5.2.2 Bounding Boxes </H3>
<!--docid::SEC20::-->
<P>

A bounding box is a tuple which identifies the <EM>extent</EM>
of an element, but not its absolute position.
</P><P>

<A NAME="IDX11"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Null ()</I>
<DD>Nullify the box.
</DL>
</P><P>

<A NAME="IDX12"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>bool</B> <I>IsNull ()</I>
<DD>Return <CODE>true</CODE> if the box is null.
</DL>
</P><P>

<A NAME="IDX13"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>scaled</B> <I>GetHeight ()</I>
<DD>Return the height of the box, given as the sum of <VAR>ascent</VAR> and <VAR>descent</VAR>.
</DL>
</P><P>

<A NAME="IDX14"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>scaled</B> <I>GetTotalHeight ()</I>
<DD>Return the "total height" of the box, given as the sum of <VAR>tAscent</VAR> and <VAR>tDescent</VAR>.
</DL>
</P><P>

<A NAME="IDX15"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Set (scaled <VAR>w</VAR>, scaled <VAR>a</VAR>, scaled <VAR>d</VAR>)</I>
<DD>Set the box to be non-null, with width <VAR>w</VAR>, ascent <VAR>a</VAR>, descent <VAR>d</VAR>,
left bearing 0 and right bearing <VAR>w</VAR>.
</DL>
</P><P>

<A NAME="IDX16"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Set (scaled <VAR>w</VAR>, scaled <VAR>a</VAR>, scaled <VAR>d</VAR>, scaled <VAR>l</VAR>, scaled <VAR>r</VAR>)</I>
<DD>Set the box to be non-null, with width <VAR>w</VAR>, ascent <VAR>a</VAR>, descent <VAR>d</VAR>,
left bearing <VAR>l</VAR> and right bearing <VAR>r</VAR>.
</DL>
</P><P>

<A NAME="IDX17"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Append (const BoundingBox&#38; <VAR>box</VAR>)</I>
<DD>Enlarge current bounding box as if <VAR>box</VAR> was "appended" right after it. All the instance
variable are updated accordingly.
</DL>
</P><P>

<A NAME="IDX18"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Append (scaled <VAR>w</VAR>)</I>
<DD>Augment the <VAR>width</VAR> of the current bounding box by <VAR>w</VAR>.
</DL>
</P><P>

<A NAME="IDX19"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Max (const BoundingBox&#38; <VAR>box</VAR>)</I>
<DD>Enlarge current bounding box as if <VAR>box</VAR> was "overlaid" on top of it.
</DL>
</P><P>

<A NAME="IDX20"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>ToRectangle (scaled <VAR>x</VAR>, scaled <VAR>y</VAR>, Rectangle&#38; <VAR>rect</VAR>)</I>
<DD>Initialize a rectangle <VAR>rect</VAR> from the current bounding box as if it was placed at
(<VAR>x</VAR>, <VAR>y</VAR>).
</DL>
</P><P>

<A NAME="IDX21"></A>
<DL>
<DT><U>Method:</U> BoundingBox <B>void</B> <I>Dump ()</I>
<DD>Debug method.
</DL>
</P><P>

<A NAME="MathMLRenderingEngine"></A>
<HR SIZE="6">
<A NAME="SEC21"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC20"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC22"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC18"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC22"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 5.3 The MathMLRenderingEngine Class </H2>
<!--docid::SEC21::-->
<P>

<A NAME="IDX22"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>MathMLRenderingEngine</B> <I>()</I>
<DD>This is the default constructor of the rendering engine.
</DL>
</P><P>

<A NAME="IDX23"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>~MathMLRenderingEngine</B> <I>()</I>
<DD>The descructor.
</DL>
</P><P>

<A NAME="IDX24"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>InitGlobalData (const char* <VAR>confPath</VAR>)</I>
<DD>Global initialization function. Must be called once (and only once) no
matter how many instances of the rendering engine are
created. <VAR>confPath</VAR> is the full path to the engine's configuration
file. If it is <CODE>NULL</CODE> then the engine will try to open the
default configuration file (usually located in
`<TT>/usr/local/share/gtkmathview</TT>').
</DL>
</P><P>

<A NAME="IDX25"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>Init (DrawingArea* <VAR>area</VAR>, FontManager* <VAR>fm</VAR>)</I>
<DD>Initialization function. Must be called before any other method of
this class is invoked. <VAR>area</VAR> must be a non-<CODE>NULL</CODE> pointer to
an already instantiated <CODE>DrawingArea</CODE> object and <VAR>fm</VAR> must be
a non-<CODE>NULL</CODE> pointer to an already instantiated
<CODE>FontManager</CODE> object.
</DL>
</P><P>

<A NAME="IDX26"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>bool</B> <I>Load (const char* <VAR>uri</VAR>)</I>
<DD>Load the document whose URI is <VAR>uri</VAR>. The document is parsed, the
setup is done (see below). Return <CODE>true</CODE> if the document has been
loaded correctly, <CODE>false</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX27"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>bool</B> <I>Load (const DOM::Document&#38; <VAR>doc</VAR>)</I>
<DD>Load the document whose DOM structure is <VAR>doc</VAR>. Return <CODE>true</CODE>
if the document has been loaded correctly, <CODE>false</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX28"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>bool</B> <I>Load (const DOM::Element&#38; <VAR>elem</VAR>)</I>
<DD>Load the MathML document whose root <CODE>math</CODE> element is
<VAR>elem</VAR>. Return <CODE>true</CODE> if the document has been loaded
correctly, <CODE>false</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX29"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>Unload ()</I>
<DD>Unload the document currently loaded and release all resources associated
to it. This method is implicitly called by the load method.
</DL>
</P><P>

<A NAME="IDX30"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>SetDirty (const Rectangle* <VAR>rect</VAR> = 0)</I>
<DD>Force a set of MathML elements to be redrawn. If <VAR>rect</VAR> is
specified (i.e. it is non-<CODE>NULL</CODE>), then only elements whose
bounding box has a non-empty intersection with <VAR>rect</VAR> are set as
"dirty". If <VAR>rect</VAR> is <CODE>NULL</CODE>, all the elements in the
document are set as "dirty". Only dirty elements will be drawn in
the next call to the update method.
</DL>
</P><P>

<A NAME="IDX31"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>Render (const Rectangle* <VAR>rect</VAR> = 0)</I>
<DD>Render the whole document if <VAR>rect</VAR> is <CODE>NULL</CODE>, or all MathML
elements whose bounding box has a non-empty intersection with
<VAR>rect</VAR>.
</DL>
</P><P>

<A NAME="IDX32"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>Ptr&#60;MathMLElement&#62;</B> <I>GetRoot ()</I>
<DD>Return the document's root element.
</DL>
</P><P>

<A NAME="IDX33"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>Ptr&#60;MathMLDocument&#62;</B> <I>GetDocument ()</I>
<DD>Return the document.
</DL>
</P><P>

<A NAME="IDX34"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>Ptr&#60;MathMLElement&#62;</B> <I>GetElementAt (scaled <VAR>x</VAR>, scaled <VAR>y</VAR>)</I>
<DD>Return the element pointed to by (<VAR>x</VAR>, <VAR>y</VAR>), or <CODE>0</CODE> if
there is no element at that coordinates.
</DL>
</P><P>

<A NAME="IDX35"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>GetDocumentBoundingBox (BoundingBox&#38; <VAR>box</VAR>)</I>
<DD>Initialize <VAR>box</VAR> with the bounding box of the whole document.
</DL>
</P><P>

<A NAME="IDX36"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>GetDocumentRectangle (Rectangle&#38; <VAR>rect</VAR>)</I>
<DD>Initialize <VAR>rect</VAR> with the rectangle of the whole document.
</DL>
</P><P>

<A NAME="IDX37"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>SetDefaultFontSize (unsigned <VAR>size</VAR>)</I>
<DD>Set the default font size for the document. <VAR>size</VAR> is supposed to
be expressed in points.
</DL>
</P><P>

<A NAME="IDX38"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>unsigned</B> <I>GetDefaultFontSize ()</I>
<DD>Return the current default font size for the document in points.
</DL>
</P><P>

<A NAME="IDX39"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>SetVerbosity (int <VAR>level</VAR>)</I>
<DD>Set the verbosity level to <VAR>level</VAR>. Valid levels are the integers from
0 to 3, each associated to an increasing verbosity of messages.
</DL>
</P><P>

<A NAME="IDX40"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>int</B> <I>GetVerbosity ()</I>
<DD>Return the current level of verbosity as an index from 0 to 3.
</DL>
</P><P>

<A NAME="IDX41"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>SetAntiAliasing (bool <VAR>b</VAR>)</I>
<DD>Enable anti-aliasing if <VAR>b</VAR> is <CODE>true</CODE>, disable otherwise. The
document is updated at each invocation of this method. Anti-aliasing
is available with Type1 fonts only and it is much slower than
non-anti-aliased mode.
</DL>
</P><P>

<A NAME="IDX42"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>bool</B> <I>GetAntiAliasing ()</I>
<DD>Return <CODE>true</CODE> if anti-aliasing is enabled.
</DL>
</P><P>

<A NAME="IDX43"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>void</B> <I>SetTransparency (bool <VAR>b</VAR>)</I>
<DD>Enable transparency if <VAR>b</VAR> is true, disable
otherwise. Transparency allows two or more glyphs to overlap
transparently, which is rather useful in the case of combining
characters. Since these characters are not frequent and transparency
is slower than standard rendering mode, the default for transparency
is <CODE>false</CODE>. Note also that transparency is currently supported
for Type1 fonts only.
</DL>
</P><P>

<A NAME="IDX44"></A>
<DL>
<DT><U>Method:</U> MathMLRenderingEngine <B>bool</B> <I>GetTransparency ()</I>
<DD>Return <CODE>true</CODE> if transparency is enabled.
</DL>
</P><P>

<A NAME="GTK+ Interface"></A>
<HR SIZE="6">
<A NAME="SEC22"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC21"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC16"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 6. GTK+ Interface </H1>
<!--docid::SEC22::-->
<P>

The GTK+ interface provides a set of <EM>high-level</EM> methods for the
creation, the usage, and the destruction of instances of the
GtkMathView widget.
</P><P>

<A NAME="IDX45"></A>
<DL>
<DT><U>Macro:</U> <B>GTK_TYPE_MATH_VIEW</B>
<DD>used to get the GTK type for the <CODE>GtkMathView</CODE> class. It is not
normally needed, unless one is subclassing <CODE>gtkmathview</CODE>.
</DL>
</P><P>

<A NAME="IDX46"></A>
<DL>
<DT><U>Macro:</U> <B>GTK_MATH_VIEW</B> <I>(<VAR>object</VAR>)</I>
<DD>used to cast a Gtk widget to a <CODE>GtkMathView</CODE> class. Remember that
all methods working with the widget takes a pointer to
<CODE>GtkMathView</CODE>.
</DL>
</P><P>

<A NAME="IDX47"></A>
<DL>
<DT><U>Macro:</U> <B>GTK_MATH_VIEW_CLASS</B> <I>(<VAR>klass</VAR>)</I>
<DD>used to cast a Gtk class to a <CODE>GtkMathView</CODE> class. This macro is
used internally, it is not normally needed.
</DL>
</P><P>

<A NAME="IDX48"></A>
<DL>
<DT><U>Macro:</U> <B>GTK_IS_MATH_VIEW</B> <I>(<VAR>object</VAR>)</I>
<DD>used to test wether a Gtk object is indeed a <CODE>GtkMathView</CODE>
object.  It is normally used as a runtime check before casting
<VAR>object</VAR> to the <CODE>GtkMathView</CODE> type.
</DL>
</P><P>

<A NAME="IDX49"></A>
<DL>
<DT><U>Method:</U> GtkType <B>gtk_math_view_get_type</B> <I>()</I>
<DD>allocates a new Gtk type for the class <CODE>GtkMathView</CODE>. Used
internally.
</DL>
</P><P>

<A NAME="IDX50"></A>
<DL>
<DT><U>Method:</U> GtkWidget* <B>gtk_math_view_new</B> <I>(GtkAdjustment* <VAR>h_adj</VAR>, GtkAdjustment* <VAR>v_adj</VAR>)</I>
<DD>this is the main constructor for <CODE>GtkMathView</CODE>. It allocates a
new <CODE>GtkMathView</CODE> object. You can pass a couple of adjustments
for the scrolling bars, or just <CODE>NULL</CODE> in the case you want the
widget to allocate its own scrolling bars.
</DL>
</P><P>

<A NAME="IDX51"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_freeze</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>after the invocation of this method any update of the widget is
postponed until the invocation of the <CODE>gtk_math_view_thaw</CODE>
method. It can be useful to stop automatic update of the widget in
those cases in which a large number of modifications to the source
document tree are done, so that it would be inefficient and useless to
update the view at every single modification.
</DL>
</P><P>

<A NAME="IDX52"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_thaw</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>update the widget after the invocation of the
<CODE>gtk_math_view_freeze</CODE> method. Any modification to the source
document tree that occurred while the widget was "frozen" is
displayed at this time.
</DL>
</P><P>

<A NAME="IDX53"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_load</B> <I>(GtkMathView* <VAR>widget</VAR>, const gchar* <VAR>uri</VAR>)</I>
<DD>load the MathML document whose URI is <VAR>uri</VAR> and display it. If the
loading succeed then <CODE>TRUE</CODE> is returned, <CODE>FALSE</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX54"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_load_doc</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeDocument* <VAR>doc</VAR>)</I>
<DD>display the <VAR>doc</VAR> document. If the operation succeeds then
<CODE>TRUE</CODE> is returned, <CODE>FALSE</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX55"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_load_tree</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>)</I>
<DD>display the MathML fragment whose root is <VAR>elem</VAR> in the widget's
window. <VAR>elem</VAR> must be a <CODE>math</CODE> element in the MathML
namespace.
</DL>
</P><P>

<A NAME="IDX56"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_unload</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>unload a document from the widget, release all resources related to the document
itself. This is automatically invoked if you load two subsequent documents, so you don't need
to call this method explicitly.
</DL>
</P><P>

<A NAME="IDX57"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_load_select</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>)</I>
<DD>mark the element <VAR>elem</VAR> as "selected." This has the effect of
highlighting the portion of the widget's window that include the
element itself, along with all its children.
</DL>
</P><P>

<A NAME="IDX58"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_load_unselect</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>)</I>
<DD>mark the element <VAR>elem</VAR> as "not selected."
</DL>
</P><P>

<A NAME="IDX59"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_load_is_selected</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>)</I>
<DD>query about the selection status of the element <VAR>elem</VAR>, return
<CODE>TRUE</CODE> if <VAR>elem</VAR> is selected, <CODE>FALSE</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX60"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_get_element_coords</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>, gint* <VAR>x</VAR>, gint* <VAR>y</VAR>)</I>
<DD>return the coordinates of the upper-left corner of the rectangular
area covered by the element <VAR>elem</VAR>. If <VAR>elem</VAR> does not belong
to the rendered document, or if it has no corresponding visual object,
the method returns <CODE>FALSE</CODE> and <VAR>x</VAR> and <VAR>y</VAR> are left
unchanged.
</DL>
</P><P>

<A NAME="IDX61"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_get_element_rectangle</B> <I>(GtkMathView* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>, GdkRectangle* <VAR>rect</VAR>)</I>
<DD>return the position and the extents of the rectangular area covered by
the element <VAR>elem</VAR>. If <VAR>elem</VAR> does not belong to the rendered
document, or if it has no corresponding visual object, the method
returns <CODE>FALSE</CODE> and <VAR>rect</VAR> is left unchanged.
</DL>
</P><P>

<A NAME="IDX62"></A>
<DL>
<DT><U>Method:</U> guint <B>gtk_math_view_get_width</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return the width of the drawable area of the <VAR>widget</VAR>. Note that
this is not necessarily equal to the whole <VAR>widget</VAR> width, due to
the inner frame.
</DL>
</P><P>

<A NAME="IDX63"></A>
<DL>
<DT><U>Method:</U> guint <B>gtk_math_view_get_height</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return the height of the drawable area of the <VAR>widget</VAR>. Same
remark as for <CODE>gtk_math_view_get_width</CODE>.
</DL>
</P><P>

<A NAME="IDX64"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_get_top</B> <I>(GtkMathView* <VAR>widget</VAR>, guint* <VAR>top_x</VAR>, guint* <VAR>top_y</VAR>)</I>
<DD>return in <VAR>top_x</VAR> and <VAR>top_y</VAR> the coordinates (in pixels) of
the upper left displayed corner of the document. Either <VAR>top_x</VAR> or
<VAR>top_y</VAR> may be <CODE>NULL</CODE>, if you are interested in only one of
the two values.
</DL>
</P><P>

<A NAME="IDX65"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_set_top</B> <I>(GtkMathView* <VAR>widget</VAR>, guint <VAR>top_x</VAR>, guint <VAR>top_y</VAR>)</I>
<DD>set the coordinates (in pixels) of the upper left displayed corner of
the document.
</DL>
</P><P>

<A NAME="IDX66"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_set_adjustments</B> <I>(GtkMathView* <VAR>widget</VAR>, GtkAdjustment* <VAR>h_adj</VAR>, GtkAdjustment* <VAR>v_adj</VAR>)</I>
<DD>set the horizontal and vertical adjustments for the <VAR>widget</VAR>.
</DL>
</P><P>

<A NAME="IDX67"></A>
<DL>
<DT><U>Method:</U> GtkAdjustment* <B>gtk_math_view_get_hadjustment</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return a pointer to the horizontal adjustment of the <VAR>widget</VAR>.
</DL>
</P><P>

<A NAME="IDX68"></A>
<DL>
<DT><U>Method:</U> GtkAdjustment* <B>gtk_math_view_get_vadjustment</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return a pointer to the vertical adjustment of the <VAR>widget</VAR>.
</DL>
</P><P>

<A NAME="IDX69"></A>
<DL>
<DT><U>Method:</U> GdkPixmap* <B>gtk_math_view_get_buffer</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return a pointer to the internal <CODE>GdkPixmap</CODE> used by the
<VAR>widget</VAR> as the backbuffer.
</DL>
</P><P>

<A NAME="IDX70"></A>
<DL>
<DT><U>Method:</U> GtkFrame* <B>gtk_math_view_get_frame</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return a pointer to the <CODE>GtkFrame</CODE> used by the <VAR>widget</VAR> to
draw the border around the drawable area.
</DL>
</P><P>

<A NAME="IDX71"></A>
<DL>
<DT><U>Method:</U> GtkDrawingArea* <B>gtk_math_view_get_drawing_area</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>Returns the GTK+ widget representing the drawing area that the widget
uses for rendering on the screen. The returned widget can be used for
setting signal handlers other than those generated directly by
GtkMathView.
</DL>
</P><P>

<A NAME="IDX72"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_set_font_size</B> <I>(GtkMathView* <VAR>widget</VAR>, guint <VAR>size</VAR>)</I>
<DD>set the default font <VAR>size</VAR> (in points) for displaying documents.
</DL>
</P><P>

<A NAME="IDX73"></A>
<DL>
<DT><U>Method:</U> guint <B>gtk_math_view_get_font_size</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return the default font size (in points) for displaying documents.
</DL>
</P><P>

<A NAME="IDX74"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_set_anti_aliasing</B> <I>(GtkMathView* <VAR>widget</VAR>, gboolean <VAR>b</VAR>)</I>
<DD>enable or disable anti-aliasing according to the value of
<VAR>flag</VAR>. Anti-aliasing of characters is only available when Type1
fonts are used.
</DL>
</P><P>

<A NAME="IDX75"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_get_anti_aliasing</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return <CODE>TRUE</CODE> if anti-aliasing is enabled (even if it is not
supported), <CODE>FALSE</CODE> otherwise.
</DL>
</P><P>

<A NAME="IDX76"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_set_transparency</B> <I>(GtkMathView* <VAR>widget</VAR>, gboolean <VAR>b</VAR>)</I>
<DD>enable/disable transparency. This is available for Type1 fonts
only. Transparency can be enabled for documents containing combining
or otherwise overlapping characters. When transparency is enabled,
only coloured pixels are drawn, leaving the background untouched. This
prevents from glyphs overwriting one each other when they
overlap. Since transparent mode is heavier than opaque mode, it is
disabled by default.
</DL>
</P><P>

<A NAME="IDX77"></A>
<DL>
<DT><U>Method:</U> gboolean <B>gtk_math_view_get_transparency</B> <I>(GtkMathView* <VAR>widget</VAR>, gboolean <VAR>b</VAR>)</I>
<DD>retrieve the current state of transparency.
</DL>
</P><P>

<A NAME="IDX78"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_log_set_verbosity</B> <I>(GtkMathView* <VAR>widget</VAR>, gint <VAR>level</VAR>)</I>
<DD>set the level of verbosity for displayed messages. <VAR>level</VAR> can be
an integer from <CODE>0</CODE> (very few messages, in case of error only) to
<CODE>3</CODE> (all messages). Useful for debugging purposes.
</DL>
</P><P>

<A NAME="IDX79"></A>
<DL>
<DT><U>Method:</U> gint <B>gtk_math_view_log_get_verbosity</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>return the current level of verbosity.
</DL>
</P><P>

<A NAME="IDX80"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_export_to_postscript</B> <I>(GtkMathView* <VAR>widget</VAR>, gint <VAR>width</VAR>, gint <VAR>height</VAR>, gint <VAR>x0</VAR>, gint <VAR>y0</VAR>, gboolean <VAR>disable_colors</VAR>, FILE* <VAR>f</VAR>)</I>
<DD>write a rendered document to the file <VAR>f</VAR> in PostScript
format. <VAR>width</VAR>, <VAR>height</VAR>, <VAR>x0</VAR> and <VAR>y0</VAR> give the size
and the margins (in pixels) of the rendering area used by this
method. <VAR>disable_colors</VAR> can be set to <CODE>TRUE</CODE> if you don't
want to render colors in PostScript (this may be useful to print the
document on a black-and-white printer).
</DL>
</P><P>

<A NAME="IDX81"></A>
<DL>
<DT><U>Method:</U> void <B>gtk_math_view_set_font_manager_type</B> <I>(GtkMathview* <VAR>widget</VAR>, FontManagerId <VAR>id</VAR>)</I>
<DD>Set the font manager used by the <VAR>widget</VAR> to retrieve fonts. Up
'till now, there are two valid values for <VAR>id</VAR>: use
<CODE>FONT_MANAGER_GTK</CODE> to use the GTK font manager (actually, this is
just a wrapper for the X font manager). This is the default.
Alternatively, use <CODE>FONT_MANAGER_T1</CODE> to use <CODE>t1lib</CODE> and
Type1 fonts. This font manager is availabe only if you have installed
the <CODE>t1lib</CODE> library.
</DL>
</P><P>

<A NAME="IDX82"></A>
<DL>
<DT><U>Method:</U> FontManagerId <B>gtk_math_view_get_font_manager_type</B> <I>(GtkMathView* <VAR>widget</VAR>)</I>
<DD>Return the current font manager id.
</DL>
</P><P>

<A NAME="IDX83"></A>
<DL>
<DT><U>Signal:</U> void <B>"click"</B> <I>(GdomeElement* <VAR>elem</VAR>, gint <VAR>state</VAR>)</I>
<DD>emitted whenever the user click on the displaying window. <VAR>elem</VAR>
is the reference to the DOM element on which the used clicked, or
<CODE>NULL</CODE> if the area clicked does not correspond to any MathML
element. <VAR>state</VAR> represents the status of the control keys at the
moment of the click event. Its possible values are the same as for the
<CODE>GdkModifier</CODE> type.
</DL>
</P><P>

<A NAME="IDX84"></A>
<DL>
<DT><U>Signal:</U> void <B>"select_begin"</B> <I>(GdomeElement* <VAR>elem</VAR>, gint <VAR>state</VAR>)</I>
<DD>emitted when the user starts a selection, that is the first mouse
button is pressed and the mouse is moved a bit from the original
location. The <VAR>elem</VAR> and <VAR>state</VAR> arguments have the same
meaning as for the <CODE>click</CODE> signal.
</DL>
</P><P>

<A NAME="IDX85"></A>
<DL>
<DT><U>Signal:</U> void <B>select_over</B> <I>(GtkWidget* <VAR>widget</VAR>, GdomeElement* <VAR>elem</VAR>, int <VAR>state</VAR>)</I>
<DD>emitted when the user moves the mouse while keeping the first button
pressed. <VAR>elem</VAR> is the element which the mouse pointer is
currently on.
</DL>
</P><P>

<A NAME="IDX86"></A>
<DL>
<DT><U>Signal:</U> void <B>"select_end"</B> <I>(GdomeElement* <VAR>node</VAR>, gint <VAR>state</VAR>)</I>
<DD>emitted when the user finally releases the mouse button after a
selection.
</DL>
</P><P>

<A NAME="IDX87"></A>
<DL>
<DT><U>Signal:</U> void <B>"select_abort"</B> <I>()</I>
<DD>emitted when the user presses the second mouse button when selection
is progress, to notify that selection is aborted.
</DL>
</P><P>

<A NAME="IDX88"></A>
<DL>
<DT><U>Signal:</U> void <B>"element_over"</B> <I>(GdomeElement* <VAR>elem</VAR>, gint <VAR>state</VAR>)</I>
<DD>emitted as the user moves the mouse on the document, no matter of the
state of the mouse buttons.
</DL>
</P><P>

<A NAME="Tools"></A>
<HR SIZE="6">
<A NAME="SEC23"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC22"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC24"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC22"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC26"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 7. Tools </H1>
<!--docid::SEC23::-->
<P>

There are some tools provided along the widget. We will shortly describe them
in the following two sections.
</P><P>

<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> 
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC24">7.1 <CODE>mathmlviewer</CODE></A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A simple viewer application.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gtkmathview.html#SEC25">7.2 <CODE>mathml2ps</CODE></A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A MathML =&#62; PostScript conversion utility.</TD></TR>
</TABLE></BLOCKQUOTE>
<P>

<A NAME="mathmlviewer"></A>
<HR SIZE="6">
<A NAME="SEC24"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC25"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC26"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 7.1 <CODE>mathmlviewer</CODE> </H2>
<!--docid::SEC24::-->
This is a simple browsing application whose purpose is twofold. First,
it is an example of application using the GtkMathView widget. Second,
it allows viewing MathML documents. A document is referenced by means
of a URL or just a file name.
<P>

<A NAME="mathml2ps"></A>
<HR SIZE="6">
<A NAME="SEC25"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC24"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC26"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC26"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 7.2 <CODE>mathml2ps</CODE> </H2>
<!--docid::SEC25::-->
This is a simple utility which allows to render a MathML document to
PostScript. In addition to this, it shows how the widget's rendering
engine can be exploited in a non-GTK+ application.
<P>

<A NAME="Bugs"></A>
<HR SIZE="6">
<A NAME="SEC26"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC25"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC23"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 8. Bugs and Contributions </H1>
<!--docid::SEC26::-->
I appreciate any kind of contribution. The most basic (and, maybe,
frequent) one is bug report. You can either send me an email
(<A HREF="mailto:luca.padovani at cs.unibo.it">luca.padovani at cs.unibo.it</A>) with a short description of the
problem encountered, a list of the error messages or failed assertions
and the simplest MathML document that causes the trouble, or use the
Bugzilla Web interface at <A HREF="http://bugs.mowgli.cs.unibo.it">http://bugs.mowgli.cs.unibo.it</A>, the
module name is obviously GtkMathView.
<P>

If you think that the problem may be of interest for other people too,
then I encourage to subscribe and post the report on the mailing
list. You can subscribe by sending an empty email to the address
<A HREF="mailto:gtkmathview-subscribe at cs.unibo.it">gtkmathview-subscribe at cs.unibo.it</A>.
</P><P>

<HR SIZE="6">
<A NAME="gtkmathview.html"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>Footnotes</H1>
<H3><A NAME="FOOT1" HREF="gtkmathview.html#DOCF1">(1)</A></H3>
<P>See
url{http://www.w3.org/TR/MathML2
<H3><A NAME="FOOT2" HREF="gtkmathview.html#DOCF2">(2)</A></H3>
<P>See
<A HREF="http://www.unicode.org">http://www.unicode.org</A>
<HR SIZE=1>
<A NAME="SEC_Contents"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>Table of Contents</H1>
<BLOCKQUOTE>
<A NAME="TOC1" HREF="gtkmathview.html#SEC1">1. Overview</A>
<BR>
<A NAME="TOC2" HREF="gtkmathview.html#SEC2">2. Usage</A>
<BR>
<BLOCKQUOTE>
<A NAME="TOC3" HREF="gtkmathview.html#SEC3">2.1 Download</A>
<BR>
<A NAME="TOC4" HREF="gtkmathview.html#SEC4">2.2 Requirements</A>
<BR>
<A NAME="TOC5" HREF="gtkmathview.html#SEC5">2.3 Installing</A>
<BR>
<A NAME="TOC6" HREF="gtkmathview.html#SEC6">2.4 Compile and Link</A>
<BR>
<A NAME="TOC7" HREF="gtkmathview.html#SEC7">2.5 Configuration</A>
<BR>
<BLOCKQUOTE>
<A NAME="TOC8" HREF="gtkmathview.html#SEC8">2.5.1 Main Configuration File</A>
<BR>
<A NAME="TOC9" HREF="gtkmathview.html#SEC9">2.5.2 Operator Dictionary</A>
<BR>
<A NAME="TOC10" HREF="gtkmathview.html#SEC10">2.5.3 Font Setup</A>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<A NAME="TOC11" HREF="gtkmathview.html#SEC11">3. Interactivity Support</A>
<BR>
<BLOCKQUOTE>
<A NAME="TOC12" HREF="gtkmathview.html#SEC12">3.1 Selection</A>
<BR>
<A NAME="TOC13" HREF="gtkmathview.html#SEC13">3.2 Point-and-click Functionalities</A>
<BR>
<A NAME="TOC14" HREF="gtkmathview.html#SEC14">3.3 Editing</A>
<BR>
</BLOCKQUOTE>
<A NAME="TOC15" HREF="gtkmathview.html#SEC15">4. Sample Application</A>
<BR>
<A NAME="TOC16" HREF="gtkmathview.html#SEC16">5. C++ Interface</A>
<BR>
<BLOCKQUOTE>
<A NAME="TOC17" HREF="gtkmathview.html#SEC17">5.1 Lengths</A>
<BR>
<A NAME="TOC18" HREF="gtkmathview.html#SEC18">5.2 Boxes and Rectangles</A>
<BR>
<BLOCKQUOTE>
<A NAME="TOC19" HREF="gtkmathview.html#SEC19">5.2.1 Rectangles</A>
<BR>
<A NAME="TOC20" HREF="gtkmathview.html#SEC20">5.2.2 Bounding Boxes</A>
<BR>
</BLOCKQUOTE>
<A NAME="TOC21" HREF="gtkmathview.html#SEC21">5.3 The MathMLRenderingEngine Class</A>
<BR>
</BLOCKQUOTE>
<A NAME="TOC22" HREF="gtkmathview.html#SEC22">6. GTK+ Interface</A>
<BR>
<A NAME="TOC23" HREF="gtkmathview.html#SEC23">7. Tools</A>
<BR>
<BLOCKQUOTE>
<A NAME="TOC24" HREF="gtkmathview.html#SEC24">7.1 <CODE>mathmlviewer</CODE></A>
<BR>
<A NAME="TOC25" HREF="gtkmathview.html#SEC25">7.2 <CODE>mathml2ps</CODE></A>
<BR>
</BLOCKQUOTE>
<A NAME="TOC26" HREF="gtkmathview.html#SEC26">8. Bugs and Contributions</A>
<BR>
</BLOCKQUOTE>
<HR SIZE=1>
<A NAME="SEC_OVERVIEW"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>Short Table of Contents</H1>
<BLOCKQUOTE>
<A NAME="TOC1" HREF="gtkmathview.html#SEC1">1. Overview</A>
<BR>
<A NAME="TOC2" HREF="gtkmathview.html#SEC2">2. Usage</A>
<BR>
<A NAME="TOC11" HREF="gtkmathview.html#SEC11">3. Interactivity Support</A>
<BR>
<A NAME="TOC15" HREF="gtkmathview.html#SEC15">4. Sample Application</A>
<BR>
<A NAME="TOC16" HREF="gtkmathview.html#SEC16">5. C++ Interface</A>
<BR>
<A NAME="TOC22" HREF="gtkmathview.html#SEC22">6. GTK+ Interface</A>
<BR>
<A NAME="TOC23" HREF="gtkmathview.html#SEC23">7. Tools</A>
<BR>
<A NAME="TOC26" HREF="gtkmathview.html#SEC26">8. Bugs and Contributions</A>
<BR>

</BLOCKQUOTE>
<HR SIZE=1>
<A NAME="SEC_About"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gtkmathview.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
This document was generated 
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>  
The buttons in the navigation panels have the following meaning:
<P></P>
<table border = "1">
<TR>
<TH> Button </TH>
<TH> Name </TH>
<TH> Go to </TH>
<TH> From 1.2.3 go to</TH>
</TR>
<TR>
<TD ALIGN="CENTER">
 [ &lt; ] </TD>
<TD ALIGN="CENTER">
Back
</TD>
<TD>
previous section in reading order
</TD>
<TD>
1.2.2
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [ &gt; ] </TD>
<TD ALIGN="CENTER">
Forward
</TD>
<TD>
next section in reading order
</TD>
<TD>
1.2.4
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [ &lt;&lt; ] </TD>
<TD ALIGN="CENTER">
FastBack
</TD>
<TD>
previous or up-and-previous section 
</TD>
<TD>
1.1
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [ Up ] </TD>
<TD ALIGN="CENTER">
Up
</TD>
<TD>
up section
</TD>
<TD>
1.2
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [ &gt;&gt; ] </TD>
<TD ALIGN="CENTER">
FastForward
</TD>
<TD>
next or up-and-next section
</TD>
<TD>
1.3
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [Top] </TD>
<TD ALIGN="CENTER">
Top
</TD>
<TD>
cover (top) of document
</TD>
<TD>
 &nbsp; 
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [Contents] </TD>
<TD ALIGN="CENTER">
Contents
</TD>
<TD>
table of contents
</TD>
<TD>
 &nbsp; 
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [Index] </TD>
<TD ALIGN="CENTER">
Index
</TD>
<TD>
concept index
</TD>
<TD>
 &nbsp; 
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
 [ ? ] </TD>
<TD ALIGN="CENTER">
About
</TD>
<TD>
this page
</TD>
<TD>
 &nbsp; 
</TD>
</TR>
</TABLE>
<P></P>
where the <STRONG> Example </STRONG> assumes that the current position 
is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of 
the following structure:
<UL>
<LI> 1. Section One  </LI>
<UL>
<LI>1.1 Subsection One-One</LI>
<UL>
<LI> ... </LI>
</UL>
<LI>1.2 Subsection One-Two</LI>
<UL>
<LI>1.2.1 Subsubsection One-Two-One
</LI><LI>1.2.2 Subsubsection One-Two-Two
</LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
&lt;== Current Position </STRONG>
</LI><LI>1.2.4 Subsubsection One-Two-Four
</LI></UL>
<LI>1.3 Subsection One-Three</LI>
<UL>
<LI> ... </LI>
</UL>
<LI>1.4 Subsection One-Four</LI>
</UL>
</UL>

<HR SIZE=1>
<BR>  
<FONT SIZE="-1">
This document was generated
by <I>Luca Padovani</I> on <I>March, 24  2003</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</FONT>

</BODY>
</HTML>