Go to the first, previous, next, last section, table of contents.


table_widget1 (library)

Author(s): Isabel Martín García.

Version: 1.11#222 (2004/5/24, 13:8:7 CEST)

Version of last change: 1.9#166 (2003/12/4, 17:39:45 CET)

In addition to the features explained in the introduction, the predicates exported by this module depict tables in which the font weight for the table elements is bold.

If the arguments are not in a correct format the exception error8 will be thrown.

Usage and interface (table_widget1)

Documentation on exports (table_widget1)

PREDICATE: tablewidget1/4:

tablewidget1(Title, Header, ElementTable, Footer)

Shows a regular table in a window. The user does not choose a background image.

Example:

tablewidget1('This is the title',
	     'Header text',
	     [['Number of processors','8'],['Average processors','95'],
	         ['Average Tasks per fork','7.5']],
	     'Footer text').

Usage:

PREDICATE: tablewidget1/5:

tablewidget1(Title, Header, ElementTable, Footer, BackgroundImage)

Shows a regular table in a window. The user must set a background image. See the image/1 type definition.

Example:

tablewidget1('This is the title',
	     'Header text',
	     [['Number of processors','8'],['Average processors','95'],
	         ['Average Tasks per fork','7.5']],
	     'Footer text',
	     './images/rain.gif')

Usage:

REGTYPE: table/1:

A table is a list of rows, each row must contain the same number of elements, otherwise the table wouldn't be regular and an exception will be thrown by the library. The rows list may not be empty.

table([X]) :-
        row(X).
table([X|Xs]) :-
        row(X),
        table(Xs).

REGTYPE: image/1:

Some predicates allow the user to set the widget background image, whose is what this type is intended for. The user has to take into account the following restrictions:

Documentation on internals (table_widget1)

REGTYPE: row/1:
row([X]) :-
        cell_value(X).
row([X|Xs]) :-
        cell_value(X),
        row(Xs).

Each row is a list of elements whose type is cell_value/1. A row cannot be an empty list, as you can see in the definition type.

REGTYPE: row/1:
row([X]) :-
        cell_value(X).
row([X|Xs]) :-
        cell_value(X),
        row(Xs).

Each row is a list of elements whose type is cell_value/1. A row cannot be an empty list, as you can see in the definition type.

REGTYPE: cell_value/1:

This type defines the possible values that a table element have. If any cell value is ", the cell will be displayed empty.

cell_value(X) :-
        atomic(X).


Go to the first, previous, next, last section, table of contents.