| 1 | <refentry id="programlistingco.element"> |
| 2 | <?dbhtml filename="programlistingco.html"?> |
| 3 | <refentryinfo> |
| 4 | <pubdate>$Date$</pubdate> |
| 5 | <releaseinfo>$Revision$</releaseinfo> |
| 6 | </refentryinfo> |
| 7 | |
| 8 | <refmeta> |
| 9 | <indexterm><primary>elements</primary> |
| 10 | <secondary>programlistingco</secondary></indexterm> |
| 11 | <refentrytitle>programlistingco</refentrytitle> |
| 12 | <refmiscinfo>Element</refmiscinfo> |
| 13 | </refmeta> |
| 14 | <refnamediv> |
| 15 | <refname>programlistingco</refname> |
| 16 | <refpurpose>&programlistingco.purpose;</refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | &programlistingco.synopsis.gen; |
| 20 | <refsect1 condition='ref.description'><title>Description</title> |
| 21 | |
| 22 | <para> |
| 23 | Callouts, such as numbered bullets, are an annotation mechanism. In an |
| 24 | online system, these bullets are frequently <quote>hot,</quote> and clicking on |
| 25 | them sends you to the corresponding annotation. |
| 26 | </para> |
| 27 | <para> |
| 28 | A <sgmltag>ProgramListingCO</sgmltag> is a wrapper around an <sgmltag>AreaSpec</sgmltag> and |
| 29 | a <sgmltag>ProgramListing</sgmltag>. An <sgmltag>AreaSpec</sgmltag> identifies the locations |
| 30 | (coordinates) |
| 31 | in the <sgmltag>ProgramListing</sgmltag> where the callouts occur. |
| 32 | The <sgmltag>ProgramListingCO</sgmltag> may also contain the list of annotations in |
| 33 | a <sgmltag>CalloutList</sgmltag>, although the <sgmltag>CalloutList</sgmltag> may also |
| 34 | occur outside of the wrapper, elsewhere in the document. |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | It is also possible to embed <sgmltag>CO</sgmltag> elements directly in the |
| 39 | verbatim text, in order to avoid having to calculate the |
| 40 | correct coordinates. If you decided to go this route, use a |
| 41 | <sgmltag>ProgramListing</sgmltag> and a <sgmltag>CalloutList</sgmltag> without the |
| 42 | <sgmltag>ProgramListingCO</sgmltag> wrapper. A <sgmltag>ProgramListingCO</sgmltag> |
| 43 | must specify at least one coordinate. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | For a complete description of callouts, see <sgmltag>Callout</sgmltag>. |
| 48 | </para> |
| 49 | |
| 50 | <refsect2><title>Processing expectations</title> |
| 51 | <para> |
| 52 | &format.block; &pexp.linespecific; |
| 53 | </para> |
| 54 | <para> |
| 55 | The mandatory processing expectations of a <sgmltag>ProgramListingCO</sgmltag> are |
| 56 | minimal: a system is expected to render the program listing and the |
| 57 | callout list, if present. |
| 58 | </para> |
| 59 | <para> |
| 60 | If explicit <sgmltag>CO</sgmltag> elements are embedded in a |
| 61 | <sgmltag>ProgramListing</sgmltag>, they must generate appropriate |
| 62 | callout marks. |
| 63 | </para> |
| 64 | <para> |
| 65 | In online environments, the processing system may be able to instantiate |
| 66 | the linking relationships between the callout marks in the program listing and |
| 67 | the annotations. |
| 68 | Some systems may even be able to go a step further and generate |
| 69 | the callout marks automatically from the coordinate information, |
| 70 | but this level of sophistication is not mandatory. |
| 71 | </para> |
| 72 | </refsect2> |
| 73 | |
| 74 | |
| 75 | &programlistingco.parents.gen; |
| 76 | &programlistingco.children.gen; |
| 77 | </refsect1> |
| 78 | <refsect1 condition='ref.elem.seealso'><title>See Also</title> |
| 79 | &programlistingco.seealso.gen; |
| 80 | </refsect1> |
| 81 | <refsect1><title>Examples</title> |
| 82 | |
| 83 | <informalexample role="example-source"> |
| 84 | <programlisting>&programlistingco.example.1.txt;</programlisting> |
| 85 | </informalexample> |
| 86 | |
| 87 | <anchor id="ex.os.programlistingco.1" role="HACK-ex.out.start"/> |
| 88 | &programlistingco.example.1.gen; |
| 89 | <anchor id="ex.oe.programlistingco.1" role="HACK-ex.out.end"/> |
| 90 | |
| 91 | &programlistingco.example.seealso.gen; |
| 92 | </refsect1> |
| 93 | </refentry> |
| 94 |