Range check input in Fl_Browser::make_visible()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1677 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2001-11-02 20:59:07 +00:00
parent 5338ba6d1e
commit 7495dff247
2 changed files with 18 additions and 3 deletions

11
CHANGES
View File

@ -1,3 +1,14 @@
CHANGES IN FLTK 1.1.0
- Now use -lsupc++ for Red Hat's GCC 2.96.
- Removed the "Microsoft" mode button from the menubar
demo.
- The browser demo now makes sure that the input field
contains a number.
- The Fl_Browser::make_visible() method now range checks
the input.
CHANGES IN FLTK 1.1.0b5 CHANGES IN FLTK 1.1.0b5
**** NOTE: DUE TO CHANGES IN THE WIDGET CLASSES, **** **** NOTE: DUE TO CHANGES IN THE WIDGET CLASSES, ****

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Browser.H,v 1.8.2.7 2001/01/22 15:13:37 easysw Exp $" // "$Id: Fl_Browser.H,v 1.8.2.7.2.1 2001/11/02 20:59:07 easysw Exp $"
// //
// Browser header file for the Fast Light Tool Kit (FLTK). // Browser header file for the Fast Light Tool Kit (FLTK).
// //
@ -109,7 +109,11 @@ public:
void column_widths(const int* l) {column_widths_ = l;} void column_widths(const int* l) {column_widths_ = l;}
int displayed(int n) const {return Fl_Browser_::displayed(find_line(n));} int displayed(int n) const {return Fl_Browser_::displayed(find_line(n));}
void make_visible(int n) {Fl_Browser_::display(find_line(n));} void make_visible(int n) {
if (n < 1) Fl_Browser_::display(find_line(1));
else if (n > lines) Fl_Browser_::display(find_line(lines));
else Fl_Browser_::display(find_line(n));
}
// for back compatability only: // for back compatability only:
void replace(int a, const char* b) {text(a, b);} void replace(int a, const char* b) {text(a, b);}
@ -119,5 +123,5 @@ public:
#endif #endif
// //
// End of "$Id: Fl_Browser.H,v 1.8.2.7 2001/01/22 15:13:37 easysw Exp $". // End of "$Id: Fl_Browser.H,v 1.8.2.7.2.1 2001/11/02 20:59:07 easysw Exp $".
// //