Simple Minded Table Interface

A table defintion is created by the pseudo tag $table. The very first row, however, describes the format of what each successive row that htbindtable use to format up the data.
      <$table name="Aname">

       <tr>
         <td name=hotflesh>
         <td>
         <td name=hotflesh>
         <td>
         <td name=hotflesh>
         <td>
       <tr>
      </$table>
      
Note: I'm not entirely happy about the state of affairs here. One default row seems sort of cheesy, and the ability to create interesting tables is... well limited. Future versions will probably modify the paradigm here, but I'll wait till I have more experience to see the way it ought to look.
htelm * htgettabledef (char * name)

Fetch the table definition namefrom the current page.

void httablestart (htelm * tb)

Start a table given the table definition in tb

void htbindtable (htelm * tb, hrec * r, int (* callback) (char *, char *, hrec *))

This function operates much like htbindform(). The hrec is emitted given the format of the table record as specified above. Left to its druthers, htbindtable will just added the text of into each cell from the hrec, but you can control its behaviour by specifying a callback function. The callback function is sent the name of the field it is working on, and the whole hrec it's currently working on. It is then up to the callback function to do what it wants to do with the contents of that cell. The return value of the callback instructs htbindform where to place any additional text that is in the cell's template: -1 for before, 1 for after, and 0 to ignore the cell data.

void httableend ()

End the table.


© (copyright) 1997 MTCC
Last modified: Fri Apr 25 19:28:47 PDT 1997