1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
\section{\module{MaskTools} --- Simple HTML patterns.}
\declaremodule{standard}{MaskTools}
This module is a simple module that contains a few commonly used HTML patterns. Its main purpose
is to show you that it ease very easy to create your own masks and reuse them all over your website.
\begin{funcdesc}{mask: x}{}
Returns the code for a transparent pixel. This is very useful when you want to draw 1-pixel wide lines.
The way it is used is the following:
\begin{verbatim}
# Draw a 1px by 100px blue line
<table border=0 cellspacing=0 cellpadding=0><tr><td width=100 height=1 bgColor=blue py-eval="maskTools.x()"></td></tr></table>
\end{verbatim}
\end{funcdesc}
\begin{funcdesc}{mask: displayByColumn}{dataList, numberOfColumns=2, columnWidth=0, gapWidth=50, tdClass=''}
This function displays a list of data on several columns.
\var{dataList} is a list of strings that you want to display
\var{numberOfColumns} is the number of columns that you want to use to display the data
\var{columnWidth} is used if you want to use a specific with for the columns (in pixels)
\var{gapWidth} is the number of pixels between each column
\var{tdClass} is the style sheet class to use to display the strings
Example:
\begin{verbatim}
# Display integers from 1 to 102 in 7 columns with 20 pixels between each column:
<py-eval="maskTools.displayByColumn(map(str,range(1,103)), 7, 0, 20)">
\end{verbatim}
\end{funcdesc}
\begin{funcdesc}{mask: displayByLine}{dataList, numberOfLines=2, lineHeight=0, gapHeight=50}
This function displays a list of data on several lines.
\var{dataList} is a list of strings that you want to display
\var{numberOfLines} is the number of lines that you want to use to display the data
\var{lineHeight} is used if you want to use a specific height for the lines (in pixels)
\var{gapHeight} is the number of pixels between each line
\var{tdClass} is the style sheet class to use to display the strings
Example:
\begin{verbatim}
# Display integers from 1 to 102 in 7 lines with 5 pixels between each line:
<py-eval="maskTools.displayByLine(map(str,range(1,103)), 7, 0, 5)">
\end{verbatim}
\end{funcdesc}
\begin{funcdesc}{mask: textInBox}{text, boxColor="black", insideColor="white"}
This function displays a text in a box
\var{text} is the text to display inside the box
\var{boxColor} is the color of the border of the box
\var{insideColor} is the color of the background of the box
Example:
\begin{verbatim}
<py-eval="maskTools.textInBox('This is some text displayed in a red box filled with yellow', boxColor='red', insideColor='yellow')">
\end{verbatim}
\end{funcdesc}
|