Fixes from Matthew Morrise.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-09-04 20:33:18 +00:00
parent 0196542a09
commit 32b9640e1c
6 changed files with 28 additions and 13 deletions

View File

@ -1,5 +1,9 @@
CHANGES IN FLTK 1.1.0
- Small bug fixes for Fl_Chart, Fl_Scrollbar, Fl_Tabs,
and FLUID from Matthew Morrise.
- Fl_Chart didn't have its own destructor, so data in
the chart wasn't freed.
- Fl_Menu_Button no longer responds to focus or keyboard
events when box() is FL_NO_BOX.
- FLTK convenience dialogs put the buttons in the wrong

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Chart.H,v 1.6.2.3.2.3 2002/08/14 16:49:37 easysw Exp $"
// "$Id: Fl_Chart.H,v 1.6.2.3.2.4 2002/09/04 20:33:17 easysw Exp $"
//
// Forms chart header file for the Fast Light Tool Kit (FLTK).
//
@ -63,6 +63,7 @@ protected:
void draw();
public:
Fl_Chart(int,int,int,int,const char * = 0);
~Fl_Chart();
void clear();
void add(double, const char * =0, unsigned=0);
void insert(int, double, const char * =0, unsigned=0);
@ -85,5 +86,5 @@ public:
#endif
//
// End of "$Id: Fl_Chart.H,v 1.6.2.3.2.3 2002/08/14 16:49:37 easysw Exp $".
// End of "$Id: Fl_Chart.H,v 1.6.2.3.2.4 2002/09/04 20:33:17 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.17 2002/08/09 22:57:00 easysw Exp $"
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.18 2002/09/04 20:33:17 easysw Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
@ -1493,7 +1493,9 @@ void Fl_Widget_Type::write_code1() {
if (is_window()) {
// Handle special case of Fl_Group class type within a window -
// output constructor using x, y, w, h...
if (strcmp(t, "Fl_Group") == 0)
if (strcmp(t, "Fl_Group") == 0 ||
strcmp(t, "Fl_Tabs") == 0 ||
strcmp(t, "Fl_Tile") == 0)
write_c("new %s(0, 0, %d, %d", t, o->w(), o->h());
else
write_c("new %s(%d, %d", t, o->w(), o->h());
@ -1970,5 +1972,5 @@ int Fl_Widget_Type::read_fdesign(const char* propname, const char* value) {
}
//
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.17 2002/08/09 22:57:00 easysw Exp $".
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.18 2002/09/04 20:33:17 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.9 2002/08/09 01:09:48 easysw Exp $"
// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.10 2002/09/04 20:33:18 easysw Exp $"
//
// Forms-compatible chart widget for the Fast Light Tool Kit (FLTK).
//
@ -298,6 +298,10 @@ Fl_Widget(X,Y,W,H,l) {
entries = (FL_CHART_ENTRY *)calloc(sizeof(FL_CHART_ENTRY), FL_CHART_MAX + 1);
}
Fl_Chart::~Fl_Chart() {
free(entries);
}
void Fl_Chart::clear() {
numb = 0;
redraw();
@ -380,5 +384,5 @@ void Fl_Chart::maxsize(int m) {
}
//
// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.9 2002/08/09 01:09:48 easysw Exp $".
// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.10 2002/09/04 20:33:18 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.10 2002/08/13 15:42:44 easysw Exp $"
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.11 2002/09/04 20:33:18 easysw Exp $"
//
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
//
@ -43,9 +43,11 @@ void Fl_Scrollbar::increment_cb() {
break;
case 5:
i = -int((maximum()-minimum())*slider_size()/(1.0-slider_size())) + ls;
if (i > -ls) i = -ls;
break;
case 6:
i = int((maximum()-minimum())*slider_size()/(1.0-slider_size())) - ls;
if (i < ls) i = ls;
break;
}
handle_drag(clamp(value() + i));
@ -246,5 +248,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L)
}
//
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.10 2002/08/13 15:42:44 easysw Exp $".
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.11 2002/09/04 20:33:18 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.11 2002/08/09 03:17:30 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.12 2002/09/04 20:33:18 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@ -78,8 +78,10 @@ int Fl_Tabs::tab_positions(int* p, int* wp) {
if (wp[i] > W) wp[i] = W;
}
// adjust edges according to visiblity:
for (i = children(); i > selected; i--) {
p[i] = p[i-1]+wp[i-1];
if (selected >= 0) {
for (i = children(); i > selected; i--) {
p[i] = p[i-1]+wp[i-1];
}
}
return selected;
}
@ -300,5 +302,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.11 2002/08/09 03:17:30 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.12 2002/09/04 20:33:18 easysw Exp $".
//