summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-08-12 19:42:55 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-08-12 19:42:55 +0000
commit1860641362c65ccb7442c294bb81bcd2c08eea75 (patch)
tree38807c9ce376c1109f535e9b300a119e1877c3e9
parentf78c91e372d77cdd2ffbce2ca367a42001604ddd (diff)
Fix more compile errors.
Redraw Fl_Input_ background using the box() function + clipping. Bump to 1.1.0rc6. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2575 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES5
-rw-r--r--configure.in6
-rw-r--r--fltk.spec6
-rw-r--r--src/Fl_Input_.cxx18
-rw-r--r--src/fl_set_fonts_x.cxx10
5 files changed, 25 insertions, 20 deletions
diff --git a/CHANGES b/CHANGES
index 172612ad8..862dd67ab 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-CHANGES IN FLTK 1.1.0
+CHANGES IN FLTK 1.1.0rc6
- Documentation updates.
+ - Fl_Input_ now draws the box function to erase the
+ background. This fixes redraw problems noticed with
+ the plastic scheme.
- More snprintf/strlcpy/strlcat changes where needed.
- Fl::get_font_name() would leak 128 bytes.
- Eliminated most of the "shadowed" variables to avoid
diff --git a/configure.in b/configure.in
index 1f61bbb83..43913a19e 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
-dnl "$Id: configure.in,v 1.33.2.31.2.84 2002/08/09 22:56:59 easysw Exp $"
+dnl "$Id: configure.in,v 1.33.2.31.2.85 2002/08/12 19:42:54 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@@ -35,7 +35,7 @@ dnl FLTK library versions...
FL_MAJOR_VERSION=1
FL_MINOR_VERSION=1
FL_PATCH_VERSION=0
-FL_RELEASE_VERSION=rc5
+FL_RELEASE_VERSION=rc6
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
AC_SUBST(FL_MAJOR_VERSION)
@@ -785,5 +785,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config
dnl
-dnl End of "$Id: configure.in,v 1.33.2.31.2.84 2002/08/09 22:56:59 easysw Exp $".
+dnl End of "$Id: configure.in,v 1.33.2.31.2.85 2002/08/12 19:42:54 easysw Exp $".
dnl
diff --git a/fltk.spec b/fltk.spec
index fc0964144..3809a5615 100644
--- a/fltk.spec
+++ b/fltk.spec
@@ -1,5 +1,5 @@
#
-# "$Id: fltk.spec,v 1.1.2.9.2.14 2002/07/20 23:39:08 easysw Exp $"
+# "$Id: fltk.spec,v 1.1.2.9.2.15 2002/08/12 19:42:54 easysw Exp $"
#
# RPM spec file for FLTK.
#
@@ -23,7 +23,7 @@
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
-%define version 1.1.0rc5
+%define version 1.1.0rc6
%define release 0
%define prefix /usr
@@ -97,5 +97,5 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/doc/fltk/*
#
-# End of "$Id: fltk.spec,v 1.1.2.9.2.14 2002/07/20 23:39:08 easysw Exp $".
+# End of "$Id: fltk.spec,v 1.1.2.9.2.15 2002/08/12 19:42:54 easysw Exp $".
#
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index 766037b70..b20301f4f 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.21 2002/08/09 03:17:30 easysw Exp $"
+// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.22 2002/08/12 19:42:54 easysw Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -152,8 +152,8 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
if (Fl::focus()!=this && !size()) {
if (do_mu) { // we have to erase it if cursor was there
- fl_color(color());
- fl_rectf(X, Y, W, H);
+ draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
+ W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
}
return;
}
@@ -248,9 +248,9 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
else if (readonly()) xx -= 3;
}
// clip to and erase it:
- fl_color(color());
- fl_rectf(xx, Y+ypos, r-xx, height);
fl_push_clip(xx, Y+ypos, r-xx, height);
+ draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
+ W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
// it now draws entire line over it
// this should not draw letters to left of erased area, but
// that is nyi.
@@ -312,8 +312,10 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
if (input_type()==FL_MULTILINE_INPUT && do_mu && ypos<H
&& (!erase_cursor_only || p <= value()+mu_p)) {
if (ypos < 0) ypos = 0;
- fl_color(this->color());
- fl_rectf(X, Y+ypos, W, H-ypos);
+ fl_push_clip(X, Y+ypos, W, H-ypos);
+ draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
+ W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
+ fl_pop_clip();
}
fl_pop_clip();
@@ -848,5 +850,5 @@ Fl_Input_::~Fl_Input_() {
}
//
-// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.21 2002/08/09 03:17:30 easysw Exp $".
+// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.22 2002/08/12 19:42:54 easysw Exp $".
//
diff --git a/src/fl_set_fonts_x.cxx b/src/fl_set_fonts_x.cxx
index 644736138..ad8512789 100644
--- a/src/fl_set_fonts_x.cxx
+++ b/src/fl_set_fonts_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_set_fonts_x.cxx,v 1.1.2.4 2002/08/09 01:09:49 easysw Exp $"
+// "$Id: fl_set_fonts_x.cxx,v 1.1.2.5 2002/08/12 19:42:55 easysw Exp $"
//
// X11 font utilities for the Fast Light Tool Kit (FLTK).
//
@@ -116,7 +116,7 @@ const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
return p;
}
const char *e = fl_font_word(x,1);
- if ((e - x) < (sizeof(f->fontname) - 1)) {
+ if ((e - x) < (int)(sizeof(f->fontname) - 1)) {
// MRS: we want strncpy here, not strlcpy...
strncpy(o,x,e-x);
o += e-x;
@@ -132,8 +132,8 @@ const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
if (*e) e++; x = e; e = fl_font_word(x,1);
int t = attribute(n,x);
if (t < 0) {
- if (o < (f->fontname + sizeof(f->fontname) - 1) *o++ = ' ';
- if ((e - x) < (sizeof(f->fontname) - (o - f->fontname) - 1)) {
+ if (o < (f->fontname + sizeof(f->fontname) - 1)) *o++ = ' ';
+ if ((e - x) < (int)(sizeof(f->fontname) - (o - f->fontname) - 1)) {
// MRS: we want strncpy here, not strlcpy...
strncpy(o,x,e-x);
o += e-x;
@@ -342,5 +342,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
}
//
-// End of "$Id: fl_set_fonts_x.cxx,v 1.1.2.4 2002/08/09 01:09:49 easysw Exp $".
+// End of "$Id: fl_set_fonts_x.cxx,v 1.1.2.5 2002/08/12 19:42:55 easysw Exp $".
//