summaryrefslogtreecommitdiff
path: root/src/Fl_Pack.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-06-20 05:47:38 +0000
committerBill Spitzak <spitzak@gmail.com>2000-06-20 05:47:38 +0000
commitf7e4caec2575619b6578b866bb59630bb513049c (patch)
treec236ea95955da7e11f5269cbaeb48b41ccfcd664 /src/Fl_Pack.cxx
parentbe106a097747ddd5c0e05e7662b66c8859d4aa12 (diff)
Whoops, I screwed up the timeout callbacks a bit.
add_timeout will now do the callback at time t after the call to add_timeout, like before. add_interval_timeout is a new call that measures time from when the last timeout was called. This has slightly less overhead and allows accurate spacing of timeouts. Patch from Stuart Levy so the *last* widget in an Fl_Pack may be resizable. This should be compatable because resizable didn't do anything before so there was no reason to set it. Makefiles for no-cygwin from Paul Baxter (see README.win32 for info). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1222 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Pack.cxx')
-rw-r--r--src/Fl_Pack.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Fl_Pack.cxx b/src/Fl_Pack.cxx
index d3818c10c..dac8e4501 100644
--- a/src/Fl_Pack.cxx
+++ b/src/Fl_Pack.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Pack.cxx,v 1.6.2.2 2000/06/05 21:20:55 mike Exp $"
+// "$Id: Fl_Pack.cxx,v 1.6.2.3 2000/06/20 05:47:37 bill Exp $"
//
// Packing widget for the Fast Light Tool Kit (FLTK).
//
@@ -63,6 +63,13 @@ void Fl_Pack::draw() {
Y = current_position;
H = o->h();
}
+ // Last child, if resizable, takes all remaining room
+ if(i == 0 && o == this->resizable()) {
+ if(horizontal())
+ W = this->w() - Fl::box_dw(box()) - maximum_position;
+ else
+ H = this->h() - Fl::box_dh(box()) - maximum_position;
+ }
if (spacing_ && current_position>maximum_position &&
(X != o->x() || Y != o->y() || d&FL_DAMAGE_ALL)) {
fl_color(color());
@@ -105,5 +112,5 @@ void Fl_Pack::draw() {
}
//
-// End of "$Id: Fl_Pack.cxx,v 1.6.2.2 2000/06/05 21:20:55 mike Exp $".
+// End of "$Id: Fl_Pack.cxx,v 1.6.2.3 2000/06/20 05:47:37 bill Exp $".
//