When creating a table widget is is often convenient to be able to create
and populate it in a single function call. It's possible to do this with
"horizontal boxes" already but there wasn't a more generic mechanism for
making a table. So add one as TXT_MakeTable().
I think this is valid ANSI C, but it seems to cause problems with MSVC
compilation. As the initializer isn't strictly necessary, let's just
get rid of it.
The table widget has special case handling for separator widgets, but
this doesn't work if the window the separator is being added to has
more than one column. Now that multiple columns are permitted, improve
how separators are handled in a way that is convenient.
It's common to want to divide a window into columns, but this has
until now only been possible by adding an inner table with multiple
columns. To simplify laying out windows, this function allows the
number of columns in a window (or any table) to be changed after it
is allocated.
Add TXT_TABLE_EMPTY to work around the inability to add a NULL cell
using TXT_AddWidgets(), and TXT_TABLE_EOL to immediately start a new
row, padding appropriately.
It's a common pattern in the setup tool that widgets are laid out in
a grid, except there inevitably end up being widgets that do not
conform to this grid. This become ugly to code around, as it ends up
requiring packing tables inside tables to get the desired result, when
all that is really wanted is a widget that can take up more than one
cell in the table. Overflowing allows cells in the table to be
designated as "overflows" of neighboring cells, to facilitate this.
This change rewrites and simplifies the copyright headers at the top
of all source files:
* Remove "Emacs style mode select" line; this line was included in
the headers for the originally released source files and appears
to be to set the file type for old versions of Emacs. I'm not sure
entirely why it was required but I don't think it is any more.
* Remove "You should have received a copy of..." text from copyright
header. This refers to the old 59 Temple Place address where the
FSF headquarters used to be located and is no longer correct.
Rather than change to the new address, just remove the paragraph
as it is superfluous anyway. This fixes#311.
* Remove ---- separator lines so that the file headers are barer
and more simplified.
whether the widget is selectable. This stops the table code from
selecting things that aren't really selectable - eg. empty tables,
scrollpanes containing unselectable widgets, etc.
Fixes a bug with the warp menu (thanks Proteh).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2207
layout method that assigns the position and size of widgets for the whole
window before drawing. Add another method that responds to mouse button
presses. Allow windows to have no title bar by specifying NULL as the
title.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 547
Adjust txt_table_t to expand tables to their maximum width when they
only have one column (ensures separators reach the window edges).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 515