Listboxes now automatically have scrollbars as required.
commit8f55517f21d1353e50bd3b379cb2179f9eb1e4f4
authordwk <dwks@theprogrammingsite.com>
Tue, 17 Jun 2008 03:46:44 +0000 (16 20:46 -0700)
committerdwk <dwks@theprogrammingsite.com>
Tue, 17 Jun 2008 03:46:44 +0000 (16 20:46 -0700)
treeb854f94df43712ad4c2007b0b46e7777698cb045
parent32871799f5ab78b8d69317e8062650db49fa999c
Listboxes now automatically have scrollbars as required.

This is implemented very inefficiently -- all of the items in the
listbox are stepped through to determine whether a horizontal scrollbar
is required or not. To make this work, init_widget_pos() was changed
slightly so that it can now be called more than once.

Having scrollbars suddenly pop into existence resizes the listbox, so
the position that the listbox is scrolled to shifts. This might be
difficult to work around.

In addition, right after a scrollbar has been added or removed, the
listbox does not always rescale properly, leading to the horizontal
scrollbar overlapping the box, or the text spilling out of the box. (In
other words, the listbox box is not the proper size.)

Note that two scrollbars are allocated for every listbox, even if that
listbox can never have a certain scrollbar (i.e., the bit is unset in
both force and allow).

Other changes:
- The path is stripped from source file names in log_message(), to cut
  down on error message length.
- An error message is no longer printed when trying to load a function
  from a NULL object, cutting down on the error messages when a shared
  library could not be loaded.
- A very useful function, set_bit_p(), was introduced. It's sort of like
  a generic set_widget_visibility() (which is now virtually obsolete).
README
TODO
src/error.c
src/loadso.c
src/test/help.c
src/utility.c
src/utility.h
src/version.h
src/widget/listbox.c
src/widget/widgets.c