Author: jsundman
Date: 2007-05-17 09:04:25 -0700 (Thu, 17 May 2007)
New Revision: 5067

Modified:
   openlaszlo/branches/legals/docs/src/developers/constraints.dbk
   openlaszlo/branches/legals/docs/src/developers/fonts.dbk
Log:
updating constraints chapter to new example markup

Modified: openlaszlo/branches/legals/docs/src/developers/constraints.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/constraints.dbk      
2007-05-17 15:44:13 UTC (rev 5066)
+++ openlaszlo/branches/legals/docs/src/developers/constraints.dbk      
2007-05-17 16:04:25 UTC (rev 5067)
@@ -42,7 +42,14 @@
 runtime. You'll see that the <literal>setConstraint</literal> method has the 
same effect as the simple expression <literal>y=${m.y}</literal>
 </para>
 
-<example role="live-example"><title>Runtime constraints with 
applyConstraint</title><programlisting 
role="lzx-embednew"><filename>constraints-$1.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Runtime constraintes with applyConstraint</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="constraints-$1.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Runtime constraints with 
applyConstraint</title><programlisting 
role="lzx-embednew"><filename>constraints-$1.lzx</filename><parameter/><code>
 &lt;canvas&gt;
   &lt;view x="250" width="20" height="20" bgcolor="red"
         y="${m.y}"/&gt;
@@ -78,7 +85,7 @@
   &lt;window id="m" x="10" title="Drag me" width="160" height="20"/&gt;  
 &lt;/canvas&gt;
 
-</programlisting><?lzx-edit programs/constraints-$1.lzx?></example>
+</programlisting><?lzx-edit programs/constraints-$1.lzx></example?>
 
 <para><literal>f</literal> is a callback function that is required for the 
<indexterm><primary><literal>applyConstraint()</literal> 
method</primary></indexterm><methodname>applyConstraint()</methodname> method. 
<varname>d</varname> 
 is an array consisting of a pointer to a reference node, and the attribute to 
bind to.</para>
@@ -165,7 +172,13 @@
 the visibility of the blue square automatically switches as
 well.</para>
 
-<example role="live-example" id="ex.constraints.1"><title>An element appears 
when a checkbox is set</title><programlisting 
role="lzx-embednew"><filename>ex.constraints.1.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>An element appears when a checkbox is set</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="ex.constraints.1.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example" id="ex.constraints.1"><title>An element appears 
when a checkbox is set</title><programlisting 
role="lzx-embednew"><filename>ex.constraints.1.lzx</filename><parameter/><code>
 &lt;canvas height="120"&gt;
   &lt;checkbox id="cb" text="Show Blue Square"/&gt;
   &lt;view visible="${cb.value}"
@@ -179,7 +192,7 @@
         width="30" height="30" bgcolor="blue"/&gt;
   &lt;simplelayout/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/ex.constraints.1.lzx?></example>
+</programlisting><?lzx-edit programs/ex.constraints.1.lzx></example?>
 
 <para>In the example below, the position of the blue square is connected
 to the position of the mouse.  If you move the mouse inside the
@@ -188,7 +201,13 @@
 expression includes a method call, but it works in the same way as the
 simple attribute expression in <xref linkend="ex.constraints.1"/>.</para>
 
-<example role="live-example" id="ex.constraints.2"><title>Constrain to Mouse 
Position</title><programlisting 
role="lzx-embednew"><filename>ex.constraints.2.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Constrain to mouse position</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="ex.constraints.2.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example" id="ex.constraints.2"><title>Constrain to Mouse 
Position</title><programlisting 
role="lzx-embednew"><filename>ex.constraints.2.lzx</filename><parameter/><code>
 &lt;canvas height="120"&gt;
   &lt;view bgcolor="blue" width="40" height="40"
         x="${parent.getMouse('x')}"
@@ -200,7 +219,7 @@
         x="${parent.getMouse('x')}"
         y="${parent.getMouse('y')}"/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/ex.constraints.2.lzx?></example>
+</programlisting><?lzx-edit programs/ex.constraints.2.lzx></example?>
 
 <para>The constraint expression may be almost any Javascript expression.  For
 example, you could change the y value in example <xref 
linkend="ex.constraints.1"/> to
@@ -250,7 +269,13 @@
 <para>Experiment with the working example below to see multiple dependencies 
in action.  Resizing the window
 will resize the blue bar.  You can also move the slider to adjust the border 
size.</para>
 
-<example role="live-example"><title>Multiple 
Dependencies</title><programlisting 
role="lzx-embednew"><filename>constraints-$10.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Multiple Dependencies</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="constraints-$10.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Multiple 
Dependencies</title><programlisting 
role="lzx-embednew"><filename>constraints-$10.lzx</filename><parameter/><code>
 &lt;canvas height="300" width="700"&gt;
   &lt;window width="400" height="200" resizable="true"&gt;
     &lt;attribute name="bordersize" value="${editor.bordersize.value}"/&gt;
@@ -284,7 +309,7 @@
     
   &lt;/window&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/constraints-$10.lzx?></example>
+</programlisting><?lzx-edit programs/constraints-$10.lzx></example?>
 
 <para/></section><section><title>Circular Constraints</title> 
 
@@ -293,7 +318,13 @@
 For example, in the Laszlo application below, the <literal>y</literal> values 
of the red and blue squares are constrained to each other.
 </para>
 
-<example role="live-example"><title>Circular 
Constraints</title><programlisting 
role="lzx-embednew"><filename>constraints-$11.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Circular constraints</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="constraints-$11.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Circular 
Constraints</title><programlisting 
role="lzx-embednew"><filename>constraints-$11.lzx</filename><parameter/><code>
 &lt;canvas height="120"&gt;
   &lt;view name="redview" bgcolor="red"
         onmousedown="gragger.apply()" onmouseup="gragger.remove()"
@@ -321,7 +352,7 @@
   &lt;/view&gt;
   &lt;simplelayout spacing="40" axis="x"/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/constraints-$11.lzx?></example>
+</programlisting><?lzx-edit programs/constraints-$11.lzx></example?>
 
 <para>
 How does it work?  When you drag
@@ -512,4 +543,4 @@
 <para>
 The bottom line is that the constraint calculator is not really designed to be 
used in functions. It
 works for many situations, but not for anything complex.</para>
-<para/></section></chapter>
\ No newline at end of file
+<para/></section></chapter>

Modified: openlaszlo/branches/legals/docs/src/developers/fonts.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/fonts.dbk    2007-05-17 
15:44:13 UTC (rev 5066)
+++ openlaszlo/branches/legals/docs/src/developers/fonts.dbk    2007-05-17 
16:04:25 UTC (rev 5067)
@@ -82,7 +82,14 @@
 <para>
 By default, OpenLaszlo applications use the device fonts.
 </para>
-<example role="live-example"><title>using device fonts</title><programlisting 
role="lzx-embednew"><filename>fonts-$1.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Using device fonts</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$1.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>using device fonts</title><programlisting 
role="lzx-embednew"><filename>fonts-$1.lzx</filename><parameter/><code>
 &lt;canvas&gt; 
   &lt;window title="Fonts are fun!" width="400" height="400" 
resizable="true"&gt;
   &lt;view width="500"&gt;
@@ -198,7 +205,7 @@
     &lt;scrollbar axis="y"/&gt;
   &lt;/window&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$1.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$1.lzx></example?>
 <para>  You can override the default font by redefining the default font on 
the <indexterm><primary>canvas tag</primary></indexterm><sgmltag 
class="element">&lt;canvas&gt;</sgmltag><remark role="fixme">[unknown 
tag]</remark>
 <!--unknown tag: canvas-->
 .
@@ -206,7 +213,14 @@
 <!--unknown tag: canvas-->
  itself—you cannot do it using an attribute tag.  
 </para>
-<example role="live-example"><title>setting default tag on the 
canvas</title><programlisting 
role="lzx-embednew"><filename>fonts-$2.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>setting the default font on the canvas</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$2.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>setting default tag on the 
canvas</title><programlisting 
role="lzx-embednew"><filename>fonts-$2.lzx</filename><parameter/><code>
 &lt;canvas width="500" height="100" bgcolor="gray" font="default" 
fontsize="8"&gt;
      &lt;font name="default" src="verity/verityplus11.ttf"/&gt;
      &lt;text &gt;default Foobar the quick brown frotz jumped over the bad 
music&lt;/text&gt; 
@@ -222,7 +236,7 @@
      &lt;text font="Verdana"&gt;Verdana Foobar the quick brown frotz jumped 
over the bad music&lt;/text&gt;
      &lt;simplelayout /&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$2.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$2.lzx></example?>
 
 <para/></section></section><section><title condition="swf">OpenLaszlo 
"pseudo-pixel" fonts</title>
 
@@ -256,7 +270,13 @@
 <para>
 For example,
 </para>
-<example role="live-example"><title>Using the font 
attribute</title><programlisting 
role="lzx-embednew"><filename>fonts-$3.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Using the font attribute</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$3.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Using the font 
attribute</title><programlisting 
role="lzx-embednew"><filename>fonts-$3.lzx</filename><parameter/><code>
 &lt;canvas&gt;
   &lt;simplelayout/&gt;
   &lt;view font="helvetica"&gt;
@@ -276,7 +296,7 @@
     &lt;text&gt;Howdy back!&lt;/text&gt;
   &lt;/view&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$3.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$3.lzx></example?>
 <para/><section><title>Specifying more than one font</title>
 <para>
 You can supply more than one font name as argument to the font attribute. At 
runtime, the system will try the font list from left to right and use the first 
one it finds. This can come in handy if you have an application that you would 
like to compile to both SWF and DHTML.
@@ -316,7 +336,14 @@
 <para>OpenLaszlo does not implement generic font family definitions, but it 
does not preclude them nor is it incompatible with them 
 (as described below).
 </para>
-<example role="live-example"><title>Default font</title><programlisting 
role="lzx-embednew"><filename>fonts-$4.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Default font</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$4.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Default font</title><programlisting 
role="lzx-embednew"><filename>fonts-$4.lzx</filename><parameter/><code>
 &lt;canvas height="40"&gt;
      &lt;text&gt;Hello World&lt;/text&gt;
 &lt;/canvas&gt;
@@ -324,11 +351,18 @@
 &lt;canvas height="40"&gt;
      &lt;text&gt;Hello World&lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$4.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$4.lzx></example?>
 <para>
  This renders Hello World in a client font.
 </para>
-<example role="live-example"><title>Default font with non-default font 
size</title><programlisting 
role="lzx-embednew"><filename>fonts-$5.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Default font with non-default font size</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$5.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Default font with non-default font 
size</title><programlisting 
role="lzx-embednew"><filename>fonts-$5.lzx</filename><parameter/><code>
 &lt;canvas height="100"&gt;
    &lt;text fontsize="24"&gt;Hello World&lt;/text&gt;
 &lt;/canvas&gt;
@@ -336,11 +370,18 @@
 &lt;canvas height="100"&gt;
    &lt;text fontsize="24"&gt;Hello World&lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$5.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$5.lzx></example?>
 <para>
 This renders Hello World in a larger client font, with no jaggies.
 </para>
-<example role="live-example"><title>Equivalence of generic and defite 
names</title><programlisting 
role="lzx-embednew"><filename>fonts-$6.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Equivalence of generic and definite names</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$6.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Equivalence of generic and defite 
names</title><programlisting 
role="lzx-embednew"><filename>fonts-$6.lzx</filename><parameter/><code>
 &lt;canvas height="100"&gt;
    &lt;simplelayout axis="y"/&gt;
    &lt;text font="sans-serif"&gt;Some text&lt;/text&gt;
@@ -360,11 +401,17 @@
    &lt;text font="Courier"&gt;Some text&lt;/text&gt;
    &lt;text font="monospace"&gt;Some text&lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$6.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$6.lzx></example?>
 <para>
  This displays three pairs of items. The items in each pair may be rendered in 
the same font, depending on the default fonts on the client.
 </para>
-<example role="live-example"><title>"nofont" attribute</title><programlisting 
role="lzx-embednew"><filename>fonts-$7.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>"nofont" attribute</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$7.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>"nofont" attribute</title><programlisting 
role="lzx-embednew"><filename>fonts-$7.lzx</filename><parameter/><code>
  &lt;canvas height="100"&gt;
      &lt;simplelayout axis="y"/&gt;
      &lt;text font="nofont, nofont, sans-serif"&gt;Some text&lt;/text&gt;
@@ -378,7 +425,7 @@
      &lt;text font="nofont, sans-serif"&gt;Some text&lt;/text&gt;
      &lt;text font="sans-serif"&gt;Some text&lt;/text&gt;
  &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$7.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$7.lzx></example?>
 <para>
  This displays three lines in the same font.
 </para>
@@ -487,8 +534,14 @@
         Because of the way that font attributes cascade, the values of these 
attributes on the canvas
         are essentially the defaults for the entire application.  Below are 
some examples of using
         font attributes. </para>
-        
-<example role="live-example"><title>Using a font</title><programlisting 
role="lzx-embednew"><filename>fonts-$11.lzx</filename><parameter/><code>
+ 
+<example role="live-example">
+   <title>Using a font</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$11.lzx"/></textobject> 
+   </programlisting>
+</example>       
+<?example role="live-example"><title>Using a font</title><programlisting 
role="lzx-embednew"><filename>fonts-$11.lzx</filename><parameter/><code>
 &lt;canvas height="70"&gt;
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;text font="helmet" fontsize="20"&gt;Hello Helmet&lt;/text&gt;
@@ -498,7 +551,7 @@
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;text font="helmet" fontsize="20"&gt;Hello Helmet&lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$11.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$11.lzx></example?>
         <para>
         As you can see below, The HTML text rendering tags, 
<indexterm><primary>b tag</primary></indexterm><sgmltag 
class="element">&lt;b&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
 <!--unknown tag: b-->
@@ -508,7 +561,13 @@
  (for italic) instruct the OpenLaszlo application to look for and use
         the bold, italic, or bold italic version of the current font.</para>
 
-<example role="live-example"><title>Using font styles and HTML 
text</title><programlisting 
role="lzx-embednew"><filename>fonts-$12.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Using font styles and html text</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$12.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Using font styles and HTML 
text</title><programlisting 
role="lzx-embednew"><filename>fonts-$12.lzx</filename><parameter/><code>
 &lt;canvas height="70"&gt;
   &lt;font name="myfont"&gt;
     &lt;face src="helmetr.ttf" style="plain"        /&gt;
@@ -538,14 +597,20 @@
     &lt;b&gt;&lt;i&gt;bold italic&lt;/i&gt;&lt;/b&gt;
   &lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$12.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$12.lzx></example?>
 
     <para> In the example below, we use the HTML text <indexterm><primary>font 
tag</primary></indexterm><sgmltag class="element">&lt;font&gt;</sgmltag><remark 
role="fixme">[unknown tag]</remark>
 <!--unknown tag: font-->
  tag to
     change fonts inside a single piece of text.</para>
 
-<example role="live-example"><title>Using mulitple fonts in HTML 
text</title><programlisting 
role="lzx-embednew"><filename>fonts-$13.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Using multiple fonts in HTML text</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$13.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Using mulitple fonts in HTML 
text</title><programlisting 
role="lzx-embednew"><filename>fonts-$13.lzx</filename><parameter/><code>
 &lt;canvas height="70"&gt;
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;font name="arioso" src="ariosor.ttf"/&gt;
@@ -563,12 +628,18 @@
     &lt;font face="arioso"&gt;arioso&lt;/font&gt;
   &lt;/text&gt;
   &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$13.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$13.lzx></example?>
 
     <para>In the example below, you can see that setting the 
<indexterm><primary>fontsize attribute</primary></indexterm><sgmltag 
class="attribute">fontsize</sgmltag>
     can get you very big text.</para>
 
-<example role="live-example"><title>Using the fontsize 
attribute</title><programlisting 
role="lzx-embednew"><filename>fonts-$14.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Using the fontsize attribute</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$14.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Using the fontsize 
attribute</title><programlisting 
role="lzx-embednew"><filename>fonts-$14.lzx</filename><parameter/><code>
 &lt;canvas height="100"&gt;
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;text resize="true" fontsize="100" font="helmet"&gt;BIG&lt;/text&gt;
@@ -578,11 +649,17 @@
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;text resize="true" fontsize="100" font="helmet"&gt;BIG&lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$14.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$14.lzx></example?>
 
         <para>Many of the fonts look too small at the default fontsize of 
8.</para>
 
-<example role="live-example"><title>Omitting the fontsize 
attribute.</title><programlisting 
role="lzx-embednew"><filename>fonts-$15.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Omitting the fontsize attribute</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$15.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Omitting the fontsize 
attribute.</title><programlisting 
role="lzx-embednew"><filename>fonts-$15.lzx</filename><parameter/><code>
 &lt;canvas height="70"&gt;
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;text font="helmet"&gt;Helmet at default size(8) is very hard to 
read!&lt;/text&gt;
@@ -592,10 +669,17 @@
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;text font="helmet"&gt;Helmet at default size(8) is very hard to 
read!&lt;/text&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$15.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$15.lzx></example?>
 
     <para>You can specify the font for inputtext, too.</para>
-<example role="live-example"><title>Specifying the font for 
inputtext.</title><programlisting 
role="lzx-embednew"><filename>fonts-$16.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Specifying the font for inputtext</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$16.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Specifying the font for 
inputtext.</title><programlisting 
role="lzx-embednew"><filename>fonts-$16.lzx</filename><parameter/><code>
 &lt;canvas fontsize="20" height="70"&gt;
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;inputtext bgcolor="red" font="helmet"&gt;Type your text 
here&lt;/inputtext&gt;
@@ -605,7 +689,7 @@
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;inputtext bgcolor="red" font="helmet"&gt;Type your text 
here&lt;/inputtext&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$16.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$16.lzx></example?>
 
 <para>Note that HTML text does <emphasis role="b"><emphasis 
role="i">not</emphasis></emphasis> work in <indexterm><primary>inputtext 
tag</primary></indexterm><sgmltag 
class="element">&lt;inputtext&gt;</sgmltag><remark role="fixme">[unknown 
tag]</remark>
 <!--unknown tag: inputtext-->
@@ -627,7 +711,13 @@
         Each of the three font attributes cascade separately.
         </para>
 
-<example role="live-example"><title>Using cascaded font 
attributes</title><programlisting 
role="lzx-embednew"><filename>fonts-$17.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Using cascaded font attributes</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$17.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Using cascaded font 
attributes</title><programlisting 
role="lzx-embednew"><filename>fonts-$17.lzx</filename><parameter/><code>
 &lt;canvas height="250"&gt;
   &lt;font name="conga" src="congar.ttf"/&gt;
   &lt;font name="conga" src="congab.ttf" style="bold"/&gt;
@@ -659,11 +749,17 @@
     &lt;/view&gt;
   &lt;/view&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$17.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$17.lzx></example?>
 
-        <para>You can even specify font attributes on the canvas</para>
+        <para>You can even specify font attributes on the canvas:</para>
 
-<example role="live-example"><title>Specifying a canvas 
font</title><programlisting 
role="lzx-embednew"><filename>fonts-$18.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Specifying a canvas font</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$18.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Specifying a canvas 
font</title><programlisting 
role="lzx-embednew"><filename>fonts-$18.lzx</filename><parameter/><code>
 &lt;canvas font="tahoe" height="70" width="200"&gt;
   &lt;font name="tahoe" src="lztahoe8.ttf"/&gt;
   &lt;text text="hello"/&gt;
@@ -673,7 +769,7 @@
   &lt;font name="tahoe" src="lztahoe8.ttf"/&gt;
   &lt;text text="hello"/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$18.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$18.lzx></example?>
 
         <para/></section><section><title>Font attributes and classes</title>
         <para>Specifying a font attribute on a class definition:</para>
@@ -690,7 +786,14 @@
         the implementation (design, layout, positioning) of that class to that 
specific font.  In general,
         you should only do this when absolutely necessary.</para>
 
-<example role="live-example"><title>Using font attributes in a class 
definition</title><programlisting 
role="lzx-embednew"><filename>fonts-$19.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Using font attributes in a class definition</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$19.lzx"/></textobject> 
+   </programlisting>
+</example>
+
+<?example role="live-example"><title>Using font attributes in a class 
definition</title><programlisting 
role="lzx-embednew"><filename>fonts-$19.lzx</filename><parameter/><code>
 &lt;canvas height="100"&gt;
   &lt;font name="helmet" src="helmetr.ttf"/&gt;
   &lt;font name="tahoe" src="lztahoe8.ttf"/&gt;
@@ -720,7 +823,7 @@
     &lt;text text="use cascaded font"/&gt;
   &lt;/view&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$19.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$19.lzx></example?>
 
 <para role="fixme"><remark role="fixme"><emphasis role="para-label">FIXME: 
</emphasis>Note: sometime in these examples we set the text to be resizable.  
Ask Adam or Sarah why</remark></para>
      
@@ -743,7 +846,14 @@
         files provided for 9 point text or you can use the <code>vera*</code> 
for arbitrary sizes.
         </p>
 ?>
-<example role="live-example"><title>Verity and vera 
fonts</title><programlisting 
role="lzx-embednew"><filename>fonts-$20.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Verity and vera fonts</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$20.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Verity and vera 
fonts</title><programlisting 
role="lzx-embednew"><filename>fonts-$20.lzx</filename><parameter/><code>
 &lt;canvas height="120"&gt;
   &lt;font name="vera" src="bitstream-vera-1.10/vera.ttf"/&gt;
   &lt;font name="verity9" src="verity/verity9.ttf"/&gt;
@@ -785,7 +895,7 @@
   &lt;text pixellock="true" fontsize="14" font="vera" text="vera 14 
abcdefghi"/&gt;
   &lt;text pixellock="true" fontsize="20" font="vera" text="vera 20 
abcdefghi"/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$20.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$20.lzx></example?>
 
         <para>
         The OpenLaszlo compiler also knows to automatically include the bold, 
italic, or bold italic
@@ -794,7 +904,14 @@
 
         <para>
         You may redefine the default font if you'd like.</para>
-<example role="live-example"><title>Redefining the default 
font</title><programlisting 
role="lzx-embednew"><filename>fonts-$21.lzx</filename><parameter/><code>
+
+<example role="live-example">
+   <title>Redefining the default font</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$21.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Redefining the default 
font</title><programlisting 
role="lzx-embednew"><filename>fonts-$21.lzx</filename><parameter/><code>
 &lt;canvas height="70"&gt;
   &lt;font name="default" src="bitstream-vera-1.10/vera.ttf"/&gt;
   &lt;simplelayout axis="y" spacing="2"/&gt;
@@ -808,7 +925,7 @@
   &lt;text text="vera"/&gt;
   &lt;button text="vera button"/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$21.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$21.lzx></example?>
 
         <para>Note that when you redefine the default font, the compiler no 
longer can automatically
         include the bold, italic, or bold italic styles for you.</para>
@@ -842,7 +959,13 @@
         <para>Another way to get components to use a font other than 'default' 
is to
         actually redefine the default font.</para>
 
-<example role="live-example"><title>Redefining the default font for Laszlo 
components</title><programlisting 
role="lzx-embednew"><filename>fonts-$23.lzx</filename><parameter/><code>
+<example role="live-example">
+   <title>Redefining the default font for OpenLaszlo components</title>
+   <programlisting language="lzx">
+   <textobject><textdata fileref="fonts-$23.lzx"/></textobject> 
+   </programlisting>
+</example>
+<?example role="live-example"><title>Redefining the default font for Laszlo 
components</title><programlisting 
role="lzx-embednew"><filename>fonts-$23.lzx</filename><parameter/><code>
 &lt;canvas height="80"&gt;
   &lt;font name="default" src="helmetr.ttf"/&gt;
   &lt;button text="hello"/&gt;
@@ -852,7 +975,7 @@
   &lt;font name="default" src="helmetr.ttf"/&gt;
   &lt;button text="hello"/&gt;
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/fonts-$23.lzx?></example>
+</programlisting><?lzx-edit programs/fonts-$23.lzx></example?>
 
 
     <para/></section><section><title>Fonts provided with the OpenLaszlo 
Server</title>
@@ -932,4 +1055,4 @@
        TTF Details: <itemizedlist spacing="compact"><listitem><para>LZX only 
supports TTF that are encoded as outline 
fonts.</para></listitem><listitem><para>LZX does not import kerning information 
from TTFs.</para></listitem></itemizedlist>
        </para></listitem><listitem><para>LZX does not use kerning information. 
</para></listitem></itemizedlist>
 </remark></para>
-<para/></section></chapter>
\ No newline at end of file
+<para/></section></chapter>


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to