mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
FLUID crashed if you did layout with a window widget (STR #317)
Fl_Scroll::clear() didn't remove the child widget from the Fl_Scroll widget (STR #327) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3297 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -2,6 +2,10 @@ CHANGES IN FLTK 1.1.5rc1
|
|||||||
|
|
||||||
- Documentation updates (STR #245, STR #250, STR #277,
|
- Documentation updates (STR #245, STR #250, STR #277,
|
||||||
STR #281)
|
STR #281)
|
||||||
|
- FLUID crashed if you did layout with a window widget
|
||||||
|
(STR #317)
|
||||||
|
- Fl_Scroll::clear() didn't remove the child widget from
|
||||||
|
the Fl_Scroll widget (STR #327)
|
||||||
- Fl_Value_Slider::draw_bg() didn't always apply the
|
- Fl_Value_Slider::draw_bg() didn't always apply the
|
||||||
clipping rectangle (STR #235)
|
clipping rectangle (STR #235)
|
||||||
- fl_filename_relative() returned the wrong string if
|
- fl_filename_relative() returned the wrong string if
|
||||||
|
|||||||
+15
-15
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: align_widget.cxx,v 1.1.2.3 2003/08/02 21:17:30 easysw Exp $"
|
// "$Id: align_widget.cxx,v 1.1.2.4 2004/04/06 02:47:25 easysw Exp $"
|
||||||
//
|
//
|
||||||
// alignment code for the Fast Light Tool Kit (FLTK).
|
// alignment code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -59,7 +59,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize(left, w->y(), w->w(), w->h());
|
w->resize(left, w->y(), w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 11: // align h.center
|
case 11: // align h.center
|
||||||
@@ -83,7 +83,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize((center2-w->w())/2, w->y(), w->w(), w->h());
|
w->resize((center2-w->w())/2, w->y(), w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -104,7 +104,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize(right-w->w(), w->y(), w->w(), w->h());
|
w->resize(right-w->w(), w->y(), w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 13: // align top
|
case 13: // align top
|
||||||
@@ -124,7 +124,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize(w->x(), top, w->w(), w->h());
|
w->resize(w->x(), top, w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 14: // align v.center
|
case 14: // align v.center
|
||||||
@@ -148,7 +148,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize(w->x(), (center2-w->h())/2, w->w(), w->h());
|
w->resize(w->x(), (center2-w->h())/2, w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -169,7 +169,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize( w->x(), bot-w->h(), w->w(), w->h());
|
w->resize( w->x(), bot-w->h(), w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//---- space evently
|
//---- space evently
|
||||||
@@ -197,7 +197,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h());
|
w->resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
cnt++;
|
cnt++;
|
||||||
wsum += w->w();
|
wsum += w->w();
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h());
|
w->resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
cnt++;
|
cnt++;
|
||||||
hsum += w->h();
|
hsum += w->h();
|
||||||
}
|
}
|
||||||
@@ -251,7 +251,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize( w->x(), w->y(), wdt, w->h());
|
w->resize( w->x(), w->y(), wdt, w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 31: // same height
|
case 31: // same height
|
||||||
@@ -271,7 +271,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize( w->x(), w->y(), w->w(), hgt);
|
w->resize( w->x(), w->y(), w->w(), hgt);
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 32: // same size
|
case 32: // same size
|
||||||
@@ -293,7 +293,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||||
w->resize( w->x(), w->y(), wdt, hgt);
|
w->resize( w->x(), w->y(), wdt, hgt);
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//---- center in group
|
//---- center in group
|
||||||
@@ -306,7 +306,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
int center2 = 2*p->x()+p->w();
|
int center2 = 2*p->x()+p->w();
|
||||||
w->resize((center2-w->w())/2, w->y(), w->w(), w->h());
|
w->resize((center2-w->w())/2, w->y(), w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 41: // center vert
|
case 41: // center vert
|
||||||
@@ -318,7 +318,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
int center2 = 2*p->y()+p->h();
|
int center2 = 2*p->y()+p->h();
|
||||||
w->resize(w->x(), (center2-w->h())/2, w->w(), w->h());
|
w->resize(w->x(), (center2-w->h())/2, w->w(), w->h());
|
||||||
w->redraw();
|
w->redraw();
|
||||||
w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -326,6 +326,6 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: align_widget.cxx,v 1.1.2.3 2003/08/02 21:17:30 easysw Exp $".
|
// End of "$Id: align_widget.cxx,v 1.1.2.4 2004/04/06 02:47:25 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.6 2004/03/11 05:17:12 easysw Exp $"
|
// "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.7 2004/04/06 02:47:26 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Scroll widget for the Fast Light Tool Kit (FLTK).
|
// Scroll widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -31,7 +31,10 @@
|
|||||||
void Fl_Scroll::clear() {
|
void Fl_Scroll::clear() {
|
||||||
for (int i=children() - 1; i >= 0; i --) {
|
for (int i=children() - 1; i >= 0; i --) {
|
||||||
Fl_Widget* o = child(i);
|
Fl_Widget* o = child(i);
|
||||||
if (o != &hscrollbar && o != &scrollbar) delete o;
|
if (o != &hscrollbar && o != &scrollbar) {
|
||||||
|
remove(o);
|
||||||
|
delete o;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,5 +271,5 @@ int Fl_Scroll::handle(int event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.6 2004/03/11 05:17:12 easysw Exp $".
|
// End of "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.7 2004/04/06 02:47:26 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user