Skip to content

Commit

Permalink
Fl_Counter didn't use a thin down box for the text field if the
Browse files Browse the repository at this point in the history
box type was set to FL_THIN_UP_BOX (STR #467)

Fl_Help_View now resets the scrollbars if they go outside the
current view (STR #464)

fl_dir_chooser() did not show the previous selection as
documented (STR #443)

Fl_Text_Display used delete[] instead of free() in some places
(STR #466)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3691 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Jul 23, 2004
1 parent b33b5ff commit 8f4fa00
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 18 deletions.
13 changes: 10 additions & 3 deletions CHANGES
@@ -1,6 +1,15 @@
CHANGES IN FLTK 1.1.5rc2

- Documentation updates (STR #365, STR #399, STR #412)
- Fl_Counter didn't use a thin down box for the text
field if the box type was set to FL_THIN_UP_BOX (STR
#467)
- Fl_Help_View now resets the scrollbars if they go
outside the current view (STR #464)
- fl_dir_chooser() did not show the previous selection
as documented (STR #443)
- Fl_Text_Display used delete[] instead of free() in
some places (STR #466)
- FLTK now includes copies of the PNG, JPEG, and ZLIB
libraries for platforms that do not have them (STR
#441)
Expand All @@ -16,9 +25,7 @@ CHANGES IN FLTK 1.1.5rc2
FL_Menu and FL_Delete keys on external (PC) keyboards
(STR #445)
- Fl_File_Icon::draw() did not support drawing of complex
polygons in icon descriptions (STR #???)
- Fl_File_Icon::draw() did not support drawing of complex
polygons in icon descriptions (STR #???)
polygons in icon descriptions (STR #474)
- The configure script now offers options for JPEG, PNG,
and ZLIB libraries (STR #416)
- The first menu item in a list would not go invisible
Expand Down
5 changes: 3 additions & 2 deletions src/Fl_Counter.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.14 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.15 2004/07/23 21:12:24 easysw Exp $"
//
// Counter widget for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -33,6 +33,7 @@ void Fl_Counter::draw() {

boxtype[0] = box();
if (boxtype[0] == FL_UP_BOX) boxtype[0] = FL_DOWN_BOX;
if (boxtype[0] == FL_THIN_UP_BOX) boxtype[0] = FL_THIN_DOWN_BOX;
for (i=1; i<5; i++)
if (mouseobj == i)
boxtype[i] = fl_down(box());
Expand Down Expand Up @@ -188,5 +189,5 @@ Fl_Counter::Fl_Counter(int X, int Y, int W, int H, const char* l)
}

//
// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.14 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.15 2004/07/23 21:12:24 easysw Exp $".
//
19 changes: 15 additions & 4 deletions src/Fl_Help_View.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Help_View.cxx,v 1.1.2.50 2004/07/04 23:27:48 easysw Exp $"
// "$Id: Fl_Help_View.cxx,v 1.1.2.51 2004/07/23 21:12:24 easysw Exp $"
//
// Fl_Help_View widget routines.
//
Expand Down Expand Up @@ -1568,8 +1568,19 @@ Fl_Help_View::format()
}
}

topline(topline_);
leftline(leftline_);
// Reset scrolling if it needs to be...
if (scrollbar_.visible()) {
int hh = h() - 8;
if (hscrollbar_.visible()) hh -= 16;
if ((topline_ + hh) > size_) topline(size_ - hh);
else topline(topline_);
} else topline(0);

if (hscrollbar_.visible()) {
int ww = w() - 24;
if ((leftline_ + ww) > hsize_) leftline(hsize_ - ww);
else leftline(leftline_);
} else leftline(0);
}


Expand Down Expand Up @@ -2795,5 +2806,5 @@ hscrollbar_callback(Fl_Widget *s, void *)


//
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.50 2004/07/04 23:27:48 easysw Exp $".
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.51 2004/07/23 21:12:24 easysw Exp $".
//
9 changes: 5 additions & 4 deletions src/Fl_Text_Display.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.54 2004/05/26 02:42:10 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.55 2004/07/23 21:12:24 easysw Exp $"
//
// Copyright 2001-2004 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
Expand Down Expand Up @@ -793,7 +793,7 @@ int Fl_Text_Display::position_to_xy( int pos, int* X, int* Y ) {
outIndex += charLen;
}
*X = xStep;
delete [] (char *)lineStr;
free((char *)lineStr);
return 1;
}

Expand Down Expand Up @@ -1851,9 +1851,10 @@ int Fl_Text_Display::xy_to_position( int X, int Y, int posType ) {
outIndex += charLen;
}

free((char *)lineStr);

/* If the X position was beyond the end of the line, return the position
of the newline at the end of the line */
delete [] (char *)lineStr;
return lineStart + lineLen;
}

Expand Down Expand Up @@ -3087,5 +3088,5 @@ int Fl_Text_Display::handle(int event) {


//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.54 2004/05/26 02:42:10 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.55 2004/07/23 21:12:24 easysw Exp $".
//
10 changes: 5 additions & 5 deletions src/fl_file_dir.cxx
@@ -1,5 +1,5 @@
//
// "$Id: fl_file_dir.cxx,v 1.1.2.15 2004/04/11 04:39:00 easysw Exp $"
// "$Id: fl_file_dir.cxx,v 1.1.2.16 2004/07/23 21:12:24 easysw Exp $"
//
// File chooser widget for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -114,16 +114,16 @@ fl_dir_chooser(const char *message, // I - Message for titlebar
{
static char retname[1024]; // Returned directory name

if (!fname || !*fname) fname = ".";

if (!fc) {
if (!fname || !*fname) fname = ".";

fc = new Fl_File_Chooser(fname, "*", Fl_File_Chooser::CREATE |
Fl_File_Chooser::DIRECTORY, message);
fc->callback(callback, 0);
} else {
fc->type(Fl_File_Chooser::CREATE | Fl_File_Chooser::DIRECTORY);
fc->filter("*");
fc->value(fname);
if (fname && *fname) fc->value(fname);
fc->label(message);
}

Expand All @@ -142,5 +142,5 @@ fl_dir_chooser(const char *message, // I - Message for titlebar


//
// End of "$Id: fl_file_dir.cxx,v 1.1.2.15 2004/04/11 04:39:00 easysw Exp $".
// End of "$Id: fl_file_dir.cxx,v 1.1.2.16 2004/07/23 21:12:24 easysw Exp $".
//

0 comments on commit 8f4fa00

Please sign in to comment.