summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-06-15 04:41:16 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-06-15 04:41:16 +0000
commitaa88761194fd54f89d66ddf8fd90865d7ebae805 (patch)
tree0ccd51ae2c0f74f1a61e7ec46c27bf23f08e8022 /src
parent29019ade40831dab5549a21fd0b1fd35ce9d51aa (diff)
Add clear() method to Fl_Scroll so that the scrollbars don't get deleted.
(STR #75) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Scroll.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx
index 6cfdfc98e..7d09eb8ae 100644
--- a/src/Fl_Scroll.cxx
+++ b/src/Fl_Scroll.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.4 2003/01/30 21:42:37 easysw Exp $"
+// "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.5 2003/06/15 04:41:16 easysw Exp $"
//
// Scroll widget for the Fast Light Tool Kit (FLTK).
//
@@ -27,6 +27,14 @@
#include <FL/Fl_Scroll.H>
#include <FL/fl_draw.H>
+// Clear all but the scrollbars...
+void Fl_Scroll::clear() {
+ for (int i=children() - 1; i >= 0; i --) {
+ Fl_Widget* o = child(i);
+ if (o != &hscrollbar && o != &scrollbar) delete o;
+ }
+}
+
// Insure the scrollbars are the last children:
void Fl_Scroll::fix_scrollbar_order() {
Fl_Widget** a = (Fl_Widget**)array();
@@ -258,5 +266,5 @@ int Fl_Scroll::handle(int event) {
}
//
-// End of "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.4 2003/01/30 21:42:37 easysw Exp $".
+// End of "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.5 2003/06/15 04:41:16 easysw Exp $".
//