From f7c57a37300a434e946b91034fda9731656543dd Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Mon, 7 Jun 1999 07:03:34 +0000 Subject: Replaced remaining malloc.h's with stdlib.h Added ctype.h to win32 file Patch for Fl_Browser_ looping indefinately git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@596 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 6 +++--- src/Fl_Browser_.cxx | 38 +++++++++++++++++++++----------------- src/Fl_win32.cxx | 5 +++-- 3 files changed, 27 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/Fl.cxx b/src/Fl.cxx index bc2eba49d..61bd94d1d 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.8 1999/05/24 14:03:45 mike Exp $" +// "$Id: Fl.cxx,v 1.24.2.9 1999/06/07 07:03:31 bill Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include // @@ -698,5 +698,5 @@ int fl_old_shortcut(const char* s) { } // -// End of "$Id: Fl.cxx,v 1.24.2.8 1999/05/24 14:03:45 mike Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.9 1999/06/07 07:03:31 bill Exp $". // diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx index 8558eebda..895e306dd 100644 --- a/src/Fl_Browser_.cxx +++ b/src/Fl_Browser_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Browser_.cxx,v 1.10.2.1 1999/05/01 15:08:22 mike Exp $" +// "$Id: Fl_Browser_.cxx,v 1.10.2.2 1999/06/07 07:03:32 bill Exp $" // // Base Browser widget class for the Fast Light Tool Kit (FLTK). // @@ -235,6 +235,7 @@ void Fl_Browser_::draw() { int full_width_ = full_width(); int full_height_ = full_height(); int X, Y, W, H; bbox(X, Y, W, H); + int dont_repeat = 0; J1: // see if scrollbar needs to be switched on/off: if ((has_scrollbar_ & VERTICAL) && ( @@ -303,21 +304,24 @@ J1: fl_pop_clip(); redraw1 = redraw2 = 0; - // see if changes to full_height caused by calls to slow_height - // caused scrollbar state to change, in which case we have to redraw: - full_height_ = full_height(); - full_width_ = full_width(); - if ((has_scrollbar_ & VERTICAL) && ( - (has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) { - if (!scrollbar.visible()) goto J1; - } else { - if (scrollbar.visible()) goto J1; - } - if ((has_scrollbar_ & HORIZONTAL) && ( - (has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_>W)) { - if (!hscrollbar.visible()) goto J1; - } else { - if (hscrollbar.visible()) goto J1; + if (!dont_repeat) { + dont_repeat = 1; + // see if changes to full_height caused by calls to slow_height + // caused scrollbar state to change, in which case we have to redraw: + full_height_ = full_height(); + full_width_ = full_width(); + if ((has_scrollbar_ & VERTICAL) && + ((has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) { + if (!scrollbar.visible()) goto J1; + } else { + if (scrollbar.visible()) goto J1; + } + if ((has_scrollbar_ & HORIZONTAL) && + ((has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_>W)) { + if (!hscrollbar.visible()) goto J1; + } else { + if (hscrollbar.visible()) goto J1; + } } // update the scrollbars and redraw them: @@ -643,5 +647,5 @@ void Fl_Browser_::item_select(void*, int) {} int Fl_Browser_::item_selected(void* l) const {return l==selection_;} // -// End of "$Id: Fl_Browser_.cxx,v 1.10.2.1 1999/05/01 15:08:22 mike Exp $". +// End of "$Id: Fl_Browser_.cxx,v 1.10.2.2 1999/06/07 07:03:32 bill Exp $". // diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 678ab196b..9b13fa008 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.11 1999/05/24 14:03:46 mike Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.12 1999/06/07 07:03:32 bill Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -37,6 +37,7 @@ #include #include #include +#include // // WM_SYNCPAINT is an "undocumented" message, which is finally defined in @@ -940,5 +941,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.11 1999/05/24 14:03:46 mike Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.12 1999/06/07 07:03:32 bill Exp $". // -- cgit v1.2.3