Whole document tree
    

Whole document tree

LineAnnotation

LineAnnotation

Name

LineAnnotation -- Writer's or editor's comment on a line of program code within an Example, ProgramListing, or Screen

Description

Writer's or editor's comment on a line of program code within an Example, ProgramListing, or Screen. LineAnnotations are a document author's comments on the code, not the comments written into the code itself by the code's author. LineAnnotation may contain plain text and in-line elements. It has common attributes.

Parents

These elements contain LineAnnotation: FuncSynopsisInfo, LiteralLayout, ProgramListing, Screen, Synopsis.

Examples

<EXAMPLE ID="EX-1002-5-4">
<TITLE>Example of switching graphics contexts
</TITLE>
<PROGRAMLISTING>GC gc1, gc2;
XGCValues values;<LINEANNOTATION>Note capitalization</LINEANNOTATION>
unsigned long valuemask;
        .
        .
        .
/* Open display, create window, etc. */
values.foreground = BlackPixel(display,screen_num);
values.background = WhitePixel(display,screen_num);
gc1 = XCreateGC(display, RootWindow(display, screen_num),
        (GCForeground | GCBackground), &amp;values);
values.foreground = WhitePixel(display,screen_num);
values.background = BlackPixel(display,screen_num);
gc2 = XCreateGC(display, RootWindow(display, screen_num),
        (GCForeground | GCBackground), &amp;values);
/* Now you can use either gc in drawing routines, thereby
 * quickly swapping the foreground and background colors */
</PROGRAMLISTING>
</EXAMPLE>