Component index
Section index

Component sample


Search

Type

Function

Summary

Define a code sample in a box

Description

You enter the text of the code sample in the body functag and it is displayed in a box with the title under it.

void body ()

Examples

editrecords / sample
editrecords / sample / sorted

Prototypes

void sample (const char *title)

Functags

void body () Mandatory

You enter the text of the sample code here

Fhelpers

void htmlout (const char *s)

Send more text to the box

This function is not generally used directly, but the tlmpwebcc transform any text line into a call to fputs. The sample component intercept these calls and format them appropriatly.

void include (const char *path)

Include a text document and place each line in the sample box

The document is generally a code sample or any ascii document.

void include (const char *fpath, const char *prefix)

Include a text document and place each line in the sample box

The document is generally a code sample or any ascii document.

void printf (const char *ctl, ...)

Add one one to the sample box

void setnbtab (int nbtab)

Select the number of tabs to insert in front of each line

The default is 0.

void settableopt (const char *opt)

Set the HTML table statement option

The default is border=1. You can set something else. If you pass a NULL parameter, no table statement is use. The output is simple a bunch of lines in a "pre" HTML statement.

void setwidth (int width)

Select the width (percent of the width of tha page) of the sample box

A table is normally used to hold the sample. You control the width in percent. The default is 60.