\hypertarget{txt__table_8h}{
\section{textscreen/txt\_\-table.h File Reference}
\label{d9/ddc/txt__table_8h}\index{textscreen/txt\_\-table.h@{textscreen/txt\_\-table.h}}
}


Table widget.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structtxt__table__s}{txt\_\-table\_\-s}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{structtxt__table__s}{txt\_\-table\_\-s} \hyperlink{txt__table_8h_a9001d2874aa251fdff0a4ae97de6f1d7}{txt\_\-table\_\-t}
\begin{DoxyCompactList}\small\item\em Table widget. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{txt__table_8h_a3f29d7b83106e36ba301591905512a56}{TXT\_\-InitTable} (\hyperlink{structtxt__table__s}{txt\_\-table\_\-t} $\ast$table, int columns)
\item 
\hyperlink{structtxt__table__s}{txt\_\-table\_\-t} $\ast$ \hyperlink{txt__table_8h_a002c84b55dc6771f912fbe330af5f12c}{TXT\_\-NewTable} (int columns)
\begin{DoxyCompactList}\small\item\em Create a new table. \end{DoxyCompactList}\item 
\hyperlink{structtxt__table__s}{txt\_\-table\_\-t} $\ast$ \hyperlink{txt__table_8h_aa9baafa88af05c76556e0ee998d61346}{TXT\_\-NewHorizBox} (TXT\_\-UNCAST\_\-ARG(first\_\-widget),...)
\begin{DoxyCompactList}\small\item\em Create a table containing the specified widgets packed horizontally, from left to right. \end{DoxyCompactList}\item 
\hyperlink{structtxt__widget__s}{txt\_\-widget\_\-t} $\ast$ \hyperlink{txt__table_8h_ab9d7db08525016613a2e8d361f39c240}{TXT\_\-GetSelectedWidget} (TXT\_\-UNCAST\_\-ARG(table))
\begin{DoxyCompactList}\small\item\em Get the currently selected widget within a table. \end{DoxyCompactList}\item 
void \hyperlink{txt__table_8h_adab03b94fc25424754df514b6d6d360e}{TXT\_\-AddWidget} (TXT\_\-UNCAST\_\-ARG(table), TXT\_\-UNCAST\_\-ARG(widget))
\begin{DoxyCompactList}\small\item\em Add a widget to a table. \end{DoxyCompactList}\item 
void \hyperlink{txt__table_8h_a1f6da20f52f144070f904defb34b1ea5}{TXT\_\-AddWidgets} (TXT\_\-UNCAST\_\-ARG(table),...)
\begin{DoxyCompactList}\small\item\em Add multiple widgets to a table. \end{DoxyCompactList}\item 
int \hyperlink{txt__table_8h_a8e3e07157bda663c174206423a55fc4c}{TXT\_\-SelectWidget} (TXT\_\-UNCAST\_\-ARG(table), TXT\_\-UNCAST\_\-ARG(widget))
\begin{DoxyCompactList}\small\item\em Select the given widget that is contained within the specified table. \end{DoxyCompactList}\item 
void \hyperlink{txt__table_8h_ad3eaeb14a61474ef73dba15cfac0fbe8}{TXT\_\-SetColumnWidths} (TXT\_\-UNCAST\_\-ARG(table),...)
\begin{DoxyCompactList}\small\item\em Set the widths of the columns of the table. \end{DoxyCompactList}\item 
void \hyperlink{txt__table_8h_a8f76b49d7ad57ef21f5650d75f74a99e}{TXT\_\-ClearTable} (TXT\_\-UNCAST\_\-ARG(table))
\begin{DoxyCompactList}\small\item\em Remove all widgets from a table. \end{DoxyCompactList}\item 
int \hyperlink{txt__table_8h_a326052f45b09491ab7e2173b1f5f5e59}{TXT\_\-PageTable} (TXT\_\-UNCAST\_\-ARG(table), int pagex, int pagey)
\begin{DoxyCompactList}\small\item\em Hack to move the selection in a table by a 'page', triggered by the scrollpane. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structtxt__widget__class__s}{txt\_\-widget\_\-class\_\-t} \hyperlink{txt__table_8h_a27912fdda507e61b9a48704a757aa8af}{txt\_\-table\_\-class}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Table widget. 

\subsection{Typedef Documentation}
\hypertarget{txt__table_8h_a9001d2874aa251fdff0a4ae97de6f1d7}{
\index{txt\_\-table.h@{txt\_\-table.h}!txt\_\-table\_\-t@{txt\_\-table\_\-t}}
\index{txt\_\-table\_\-t@{txt\_\-table\_\-t}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{txt\_\-table\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf txt\_\-table\_\-s} {\bf txt\_\-table\_\-t}}}
\label{d9/ddc/txt__table_8h_a9001d2874aa251fdff0a4ae97de6f1d7}


Table widget. 

A table is a widget that contains other widgets. It may have multiple columns, in which case the child widgets are laid out in a grid. Columns automatically grow as necessary, although minimum column widths can be set using \hyperlink{txt__table_8h_ad3eaeb14a61474ef73dba15cfac0fbe8}{TXT\_\-SetColumnWidths}.

To create a new table, use \hyperlink{txt__table_8h_a002c84b55dc6771f912fbe330af5f12c}{TXT\_\-NewTable}. It is also possible to use \hyperlink{txt__table_8h_aa9baafa88af05c76556e0ee998d61346}{TXT\_\-NewHorizBox} to create a table, specifying widgets to place inside a horizontal list. A vertical list is possible simply by creating a table containing a single column. 

\subsection{Function Documentation}
\hypertarget{txt__table_8h_adab03b94fc25424754df514b6d6d360e}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-AddWidget@{TXT\_\-AddWidget}}
\index{TXT\_\-AddWidget@{TXT\_\-AddWidget}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-AddWidget}]{\setlength{\rightskip}{0pt plus 5cm}void TXT\_\-AddWidget (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{, }
\item[{TXT\_\-UNCAST\_\-ARG(widget)}]{}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_adab03b94fc25424754df514b6d6d360e}


Add a widget to a table. 

Widgets are added to tables horizontally, from left to right. For example, for a table with three columns, the first call to this function will add a widget to the first column, the second call to the second column, the third call to the third column, and the fourth will return to the first column, starting a new row.

For adding many widgets, it may be easier to use \hyperlink{txt__table_8h_a1f6da20f52f144070f904defb34b1ea5}{TXT\_\-AddWidgets}.


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
{\em widget} & The widget to add. \\
\hline
\end{DoxyParams}
\hypertarget{txt__table_8h_a1f6da20f52f144070f904defb34b1ea5}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-AddWidgets@{TXT\_\-AddWidgets}}
\index{TXT\_\-AddWidgets@{TXT\_\-AddWidgets}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-AddWidgets}]{\setlength{\rightskip}{0pt plus 5cm}void TXT\_\-AddWidgets (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_a1f6da20f52f144070f904defb34b1ea5}


Add multiple widgets to a table. 

Widgets are added as described in the documentation for the \hyperlink{txt__table_8h_adab03b94fc25424754df514b6d6d360e}{TXT\_\-AddWidget} function. This function adds multiple widgets. The number of arguments is variable, and the argument list must be terminated by a NULL pointer.


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
\end{DoxyParams}
\hypertarget{txt__table_8h_a8f76b49d7ad57ef21f5650d75f74a99e}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-ClearTable@{TXT\_\-ClearTable}}
\index{TXT\_\-ClearTable@{TXT\_\-ClearTable}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-ClearTable}]{\setlength{\rightskip}{0pt plus 5cm}void TXT\_\-ClearTable (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_a8f76b49d7ad57ef21f5650d75f74a99e}


Remove all widgets from a table. 


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
\end{DoxyParams}
\hypertarget{txt__table_8h_ab9d7db08525016613a2e8d361f39c240}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-GetSelectedWidget@{TXT\_\-GetSelectedWidget}}
\index{TXT\_\-GetSelectedWidget@{TXT\_\-GetSelectedWidget}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-GetSelectedWidget}]{\setlength{\rightskip}{0pt plus 5cm}{\bf txt\_\-widget\_\-t}$\ast$ TXT\_\-GetSelectedWidget (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_ab9d7db08525016613a2e8d361f39c240}


Get the currently selected widget within a table. 

This function will recurse through subtables if necessary.


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the widget that is currently selected. 
\end{DoxyReturn}
\hypertarget{txt__table_8h_a3f29d7b83106e36ba301591905512a56}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-InitTable@{TXT\_\-InitTable}}
\index{TXT\_\-InitTable@{TXT\_\-InitTable}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-InitTable}]{\setlength{\rightskip}{0pt plus 5cm}void TXT\_\-InitTable (
\begin{DoxyParamCaption}
\item[{{\bf txt\_\-table\_\-t} $\ast$}]{table, }
\item[{int}]{columns}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_a3f29d7b83106e36ba301591905512a56}
\hypertarget{txt__table_8h_aa9baafa88af05c76556e0ee998d61346}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-NewHorizBox@{TXT\_\-NewHorizBox}}
\index{TXT\_\-NewHorizBox@{TXT\_\-NewHorizBox}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-NewHorizBox}]{\setlength{\rightskip}{0pt plus 5cm}{\bf txt\_\-table\_\-t}$\ast$ TXT\_\-NewHorizBox (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(first\_\-widget)}]{, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_aa9baafa88af05c76556e0ee998d61346}


Create a table containing the specified widgets packed horizontally, from left to right. 

The arguments to this function are variable. Each argument must be a pointer to a widget, and the list is terminated with a NULL.

\begin{DoxyReturn}{Returns}
Pointer to the new table structure. 
\end{DoxyReturn}
\hypertarget{txt__table_8h_a002c84b55dc6771f912fbe330af5f12c}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-NewTable@{TXT\_\-NewTable}}
\index{TXT\_\-NewTable@{TXT\_\-NewTable}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-NewTable}]{\setlength{\rightskip}{0pt plus 5cm}{\bf txt\_\-table\_\-t}$\ast$ TXT\_\-NewTable (
\begin{DoxyParamCaption}
\item[{int}]{columns}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_a002c84b55dc6771f912fbe330af5f12c}


Create a new table. 


\begin{DoxyParams}{Parameters}
{\em columns} & The number of columns in the new table. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the new table structure. 
\end{DoxyReturn}
\hypertarget{txt__table_8h_a326052f45b09491ab7e2173b1f5f5e59}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-PageTable@{TXT\_\-PageTable}}
\index{TXT\_\-PageTable@{TXT\_\-PageTable}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-PageTable}]{\setlength{\rightskip}{0pt plus 5cm}int TXT\_\-PageTable (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{, }
\item[{int}]{pagex, }
\item[{int}]{pagey}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_a326052f45b09491ab7e2173b1f5f5e59}


Hack to move the selection in a table by a 'page', triggered by the scrollpane. 

This acts as per the keyboard events for the arrows, but moves the selection by at least the specified number of characters.


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
{\em pagex} & Minimum distance to move the selection horizontally. \\
\hline
{\em pagey} & Minimum distance to move the selection vertically. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Non-\/zero if the selection has been changed. 
\end{DoxyReturn}
\hypertarget{txt__table_8h_a8e3e07157bda663c174206423a55fc4c}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-SelectWidget@{TXT\_\-SelectWidget}}
\index{TXT\_\-SelectWidget@{TXT\_\-SelectWidget}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-SelectWidget}]{\setlength{\rightskip}{0pt plus 5cm}int TXT\_\-SelectWidget (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{, }
\item[{TXT\_\-UNCAST\_\-ARG(widget)}]{}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_a8e3e07157bda663c174206423a55fc4c}


Select the given widget that is contained within the specified table. 

This function will recursively search through subtables if necessary.


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
{\em widget} & The widget to select. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Non-\/zero (true) if it has been selected, or zero (false) if it was not found within this table. 
\end{DoxyReturn}
\hypertarget{txt__table_8h_ad3eaeb14a61474ef73dba15cfac0fbe8}{
\index{txt\_\-table.h@{txt\_\-table.h}!TXT\_\-SetColumnWidths@{TXT\_\-SetColumnWidths}}
\index{TXT\_\-SetColumnWidths@{TXT\_\-SetColumnWidths}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{TXT\_\-SetColumnWidths}]{\setlength{\rightskip}{0pt plus 5cm}void TXT\_\-SetColumnWidths (
\begin{DoxyParamCaption}
\item[{TXT\_\-UNCAST\_\-ARG(table)}]{, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}
\label{d9/ddc/txt__table_8h_ad3eaeb14a61474ef73dba15cfac0fbe8}


Set the widths of the columns of the table. 

The arguments to this function are variable, and correspond to the number of columns in the table. For example, if a table has five columns, the width of each of the five columns must be specified.

The width values are in number of characters.

Note that this function only sets the minimum widths for columns; if the columns contain widgets that are wider than the widths specified, they will be larger.


\begin{DoxyParams}{Parameters}
{\em table} & The table. \\
\hline
\end{DoxyParams}


\subsection{Variable Documentation}
\hypertarget{txt__table_8h_a27912fdda507e61b9a48704a757aa8af}{
\index{txt\_\-table.h@{txt\_\-table.h}!txt\_\-table\_\-class@{txt\_\-table\_\-class}}
\index{txt\_\-table\_\-class@{txt\_\-table\_\-class}!txt_table.h@{txt\_\-table.h}}
\subsubsection[{txt\_\-table\_\-class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf txt\_\-widget\_\-class\_\-t} {\bf txt\_\-table\_\-class}}}
\label{d9/ddc/txt__table_8h_a27912fdda507e61b9a48704a757aa8af}
