summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-12 20:16:07 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-12 20:16:07 +0000
commit9e2f36201612e978f2f518ed7220af42d06264cd (patch)
tree2b48c0e01c7212fdde803f6d9382ea0f32f55ec4
parentaab290b5039910e59ce7aaf0196b4e03aa061600 (diff)
Move ENTER/LEAVE handling to Fl_Box so that the default event handler
in Fl_Widget doesn't interfere with existing widgets. Remove unnecessary strcasecmp defines. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES8
-rw-r--r--FL/Fl_Box.H12
-rw-r--r--src/Fl_Box.cxx10
-rw-r--r--src/Fl_File_Icon.cxx9
-rw-r--r--src/Fl_Widget.cxx7
5 files changed, 28 insertions, 18 deletions
diff --git a/CHANGES b/CHANGES
index dedd18d16..4efc1a522 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,13 @@
CHANGES IN FLTK 1.1.0
+ - Fl_Widget::handle() returned 1 for FL_ENTER and
+ FL_LEAVE events, which caused some compatibility
+ problems with 1.0 code.
+ - Fl_Box::handle() now returns 1 for FL_ENTER and
+ FL_LEAVE events so that tooltips will work with Fl_Box
+ widgets.
+ - Some source files still defined strcasecmp and
+ strncasecmp under WIN32.
- Some source files still used the "false" and "true"
C++ keywords, even though several of our "supported"
C++ compilers don't support them. Using 0 and 1 until
diff --git a/FL/Fl_Box.H b/FL/Fl_Box.H
index 3425a6a7e..82aa32b1f 100644
--- a/FL/Fl_Box.H
+++ b/FL/Fl_Box.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Box.H,v 1.5.2.4.2.1 2002/01/01 15:11:27 easysw Exp $"
+// "$Id: Fl_Box.H,v 1.5.2.4.2.2 2002/04/12 20:16:07 easysw Exp $"
//
// Box header file for the Fast Light Tool Kit (FLTK).
//
@@ -32,16 +32,18 @@
class Fl_Box : public Fl_Widget {
protected:
- FL_EXPORT void draw();
+ FL_EXPORT void draw();
public:
- FL_EXPORT Fl_Box(int x, int y, int w, int h, const char *l=0)
+ FL_EXPORT Fl_Box(int x, int y, int w, int h, const char *l=0)
: Fl_Widget(x,y,w,h,l) {}
- FL_EXPORT Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const char *l)
+ FL_EXPORT Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const char *l)
: Fl_Widget(x,y,w,h,l) {box(b);}
+
+ virtual FL_EXPORT int handle(int);
};
#endif
//
-// End of "$Id: Fl_Box.H,v 1.5.2.4.2.1 2002/01/01 15:11:27 easysw Exp $".
+// End of "$Id: Fl_Box.H,v 1.5.2.4.2.2 2002/04/12 20:16:07 easysw Exp $".
//
diff --git a/src/Fl_Box.cxx b/src/Fl_Box.cxx
index e8ab59998..fd2b70793 100644
--- a/src/Fl_Box.cxx
+++ b/src/Fl_Box.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Box.cxx,v 1.4.2.3.2.2 2002/04/09 17:20:23 easysw Exp $"
+// "$Id: Fl_Box.cxx,v 1.4.2.3.2.3 2002/04/12 20:16:07 easysw Exp $"
//
// Box widget for the Fast Light Tool Kit (FLTK).
//
@@ -31,6 +31,12 @@ void Fl_Box::draw() {
draw_label();
}
+int Fl_Box::handle(int event) {
+ if (event == FL_ENTER || event == FL_LEAVE) return 1;
+ else return 0;
+}
+
+
//
-// End of "$Id: Fl_Box.cxx,v 1.4.2.3.2.2 2002/04/09 17:20:23 easysw Exp $".
+// End of "$Id: Fl_Box.cxx,v 1.4.2.3.2.3 2002/04/12 20:16:07 easysw Exp $".
//
diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx
index 4d0622a08..fd1dc5769 100644
--- a/src/Fl_File_Icon.cxx
+++ b/src/Fl_File_Icon.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon.cxx,v 1.1.2.10 2002/04/11 11:52:41 easysw Exp $"
+// "$Id: Fl_File_Icon.cxx,v 1.1.2.11 2002/04/12 20:16:07 easysw Exp $"
//
// Fl_File_Icon routines.
//
@@ -43,9 +43,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "flstring.h"
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif // HAVE_STRINGS_H
#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
@@ -53,8 +50,6 @@
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
# include <io.h>
# define F_OK 0
-# define strcasecmp stricmp
-# define strncasecmp strnicmp
#else
# include <unistd.h>
#endif /* WIN32 || __EMX__ */
@@ -471,5 +466,5 @@ Fl_File_Icon::labeltype(const Fl_Label *o, // I - Label data
//
-// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.10 2002/04/11 11:52:41 easysw Exp $".
+// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.11 2002/04/12 20:16:07 easysw Exp $".
//
diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx
index 190018434..b4fc8dd42 100644
--- a/src/Fl_Widget.cxx
+++ b/src/Fl_Widget.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.15 2002/04/09 17:20:24 easysw Exp $"
+// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.16 2002/04/12 20:16:07 easysw Exp $"
//
// Base widget class for the Fast Light Tool Kit (FLTK).
//
@@ -69,8 +69,7 @@ Fl_Widget *Fl::readqueue() {
////////////////////////////////////////////////////////////////
int Fl_Widget::handle(int event) {
- if (event == FL_ENTER || event == FL_LEAVE) return 1;
- else return 0;
+ return 0;
}
int FL_NORMAL_SIZE = 14;
@@ -251,5 +250,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const {
}
//
-// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.15 2002/04/09 17:20:24 easysw Exp $".
+// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.16 2002/04/12 20:16:07 easysw Exp $".
//