Fixed from Teun.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-01-07 20:40:02 +00:00
parent a55363086d
commit bccdafdaef
7 changed files with 46 additions and 25 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0b9 CHANGES IN FLTK 1.1.0b9
- Better FL_LEAVE event handling for WIN32.
- The alpha mask was bit-reversed.
- Fl::scheme() applied the scheme tile image to overlay - Fl::scheme() applied the scheme tile image to overlay
and menu windows, which caused problems when the and menu windows, which caused problems when the
overlay planes were in use. overlay planes were in use.

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Image.H,v 1.5.2.3.2.10 2002/01/01 15:11:27 easysw Exp $" // "$Id: Fl_Image.H,v 1.5.2.3.2.11 2002/01/07 20:40:02 easysw Exp $"
// //
// Image header file for the Fast Light Tool Kit (FLTK). // Image header file for the Fast Light Tool Kit (FLTK).
// //
@ -35,6 +35,10 @@ class FL_EXPORT Fl_Image {
int w_, h_, d_, ld_, count_; int w_, h_, d_, ld_, count_;
const char * const *data_; const char * const *data_;
// Forbid use of copy contructor and assign operator
Fl_Image & operator=(const Fl_Image &);
Fl_Image(const Fl_Image &);
protected: protected:
void w(int W) {w_ = W;} void w(int W) {w_ = W;}
@ -91,5 +95,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
#endif #endif
// //
// End of "$Id: Fl_Image.H,v 1.5.2.3.2.10 2002/01/01 15:11:27 easysw Exp $". // End of "$Id: Fl_Image.H,v 1.5.2.3.2.11 2002/01/07 20:40:02 easysw Exp $".
// //

View File

@ -1,7 +1,7 @@
dnl -*- sh -*- dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf" dnl the "configure" script is made from this by running GNU "autoconf"
dnl dnl
dnl "$Id: configure.in,v 1.33.2.31.2.46 2002/01/06 13:40:27 easysw Exp $" dnl "$Id: configure.in,v 1.33.2.31.2.47 2002/01/07 20:40:02 easysw Exp $"
dnl dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl dnl
@ -135,7 +135,7 @@ AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [defau
DSOLINK="-Wl,-rpath,$libdir" DSOLINK="-Wl,-rpath,$libdir"
fi fi
;; ;;
FreeBSD* | NetBSD* | OpenBSD* | Linux*) Linux*)
DSONAME="libfltk.so.$FL_API_VERSION" DSONAME="libfltk.so.$FL_API_VERSION"
GLDSONAME="libfltk_gl.so.$FL_API_VERSION" GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
@ -546,7 +546,7 @@ if test -n "$GXX"; then
AC_MSG_RESULT(no)) AC_MSG_RESULT(no))
fi fi
else else
case `(uname) 2>/dev/null` in case "$uname" in
IRIX*) IRIX*)
# Running some flavor of IRIX; see which version and # Running some flavor of IRIX; see which version and
# set things up according... # set things up according...
@ -634,5 +634,5 @@ AC_OUTPUT(makeinclude fltk.list fltk-config FL/Makefile)
chmod +x fltk-config chmod +x fltk-config
dnl dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.46 2002/01/06 13:40:27 easysw Exp $". dnl End of "$Id: configure.in,v 1.33.2.31.2.47 2002/01/07 20:40:02 easysw Exp $".
dnl dnl

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_GIF_Image.cxx,v 1.1.2.9 2002/01/01 15:11:30 easysw Exp $" // "$Id: Fl_GIF_Image.cxx,v 1.1.2.10 2002/01/07 20:40:02 easysw Exp $"
// //
// Fl_GIF_Image routines. // Fl_GIF_Image routines.
// //
@ -173,7 +173,8 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
Interlace = ((ch & 0x40) != 0); Interlace = ((ch & 0x40) != 0);
if (ch&0x80) { if (ch&0x80) {
// read local color map // read local color map
int n = 1<<((ch&7)+1); // does this replace ColorMapSize ?? int n = 2<<(ch&7);
if (n > ColorMapSize) ColorMapSize = n;
for (i=0; i < n; i++) { for (i=0; i < n; i++) {
Red[i] = NEXTBYTE; Red[i] = NEXTBYTE;
Green[i] = NEXTBYTE; Green[i] = NEXTBYTE;
@ -261,7 +262,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];} while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];}
*tp++ = FinChar = i; *tp++ = FinChar = i;
while (tp > OutCode) { do {
*p++ = *--tp; *p++ = *--tp;
if (p >= eol) { if (p >= eol) {
if (!Interlace) YC++; if (!Interlace) YC++;
@ -275,7 +276,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
p = Image + YC*Width; p = Image + YC*Width;
eol = p+Width; eol = p+Width;
} }
} } while (tp > OutCode);
if (OldCode != ClearCode) { if (OldCode != ClearCode) {
Prefix[FreeCode] = OldCode; Prefix[FreeCode] = OldCode;
@ -373,5 +374,5 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
// //
// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.9 2002/01/01 15:11:30 easysw Exp $". // End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.10 2002/01/07 20:40:02 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.14 2002/01/03 08:08:21 matthiaswm Exp $" // "$Id: Fl_Image.cxx,v 1.5.2.3.2.15 2002/01/07 20:40:02 easysw Exp $"
// //
// Image drawing code for the Fast Light Tool Kit (FLTK). // Image drawing code for the Fast Light Tool Kit (FLTK).
// //
@ -69,6 +69,7 @@ void Fl_Image::label(Fl_Menu_Item* m) {
Fl_RGB_Image::~Fl_RGB_Image() { Fl_RGB_Image::~Fl_RGB_Image() {
if (id) fl_delete_offscreen((Fl_Offscreen)id); if (id) fl_delete_offscreen((Fl_Offscreen)id);
if (mask) fl_delete_bitmask(mask);
if (alloc_array) delete[] (uchar *)array; if (alloc_array) delete[] (uchar *)array;
} }
@ -319,12 +320,12 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
memset(bitmap, 0, bmw * h()); memset(bitmap, 0, bmw * h());
for (dataptr = array + d() - 1, y = 0; y < h(); y ++, dataptr += ld()) for (dataptr = array + d() - 1, y = 0; y < h(); y ++, dataptr += ld())
for (bitptr = bitmap + y * bmw, bit = 128, x = 0; x < w(); x ++, dataptr += d()) { for (bitptr = bitmap + y * bmw, bit = 1, x = 0; x < w(); x ++, dataptr += d()) {
if (*dataptr > dither[x & 15][y & 15]) if (*dataptr > dither[x & 15][y & 15])
*bitptr |= bit; *bitptr |= bit;
if (bit > 1) bit >>= 1; if (bit < 128) bit <<= 1;
else { else {
bit = 128; bit = 1;
bitptr ++; bitptr ++;
} }
} }
@ -378,5 +379,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
// //
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.14 2002/01/03 08:08:21 matthiaswm Exp $". // End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.15 2002/01/07 20:40:02 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.13 2002/01/01 15:11:31 easysw Exp $" // "$Id: Fl_Widget.cxx,v 1.5.2.4.2.14 2002/01/07 20:40:02 easysw Exp $"
// //
// Base widget class for the Fast Light Tool Kit (FLTK). // Base widget class for the Fast Light Tool Kit (FLTK).
// //
@ -126,7 +126,7 @@ extern void fl_throw_focus(Fl_Widget*); // in Fl_x.cxx
// However, it is only legal to destroy a "root" such as an Fl_Window, // However, it is only legal to destroy a "root" such as an Fl_Window,
// and automatic destructors may be called. // and automatic destructors may be called.
Fl_Widget::~Fl_Widget() { Fl_Widget::~Fl_Widget() {
if (parent_) parent_ = 0; parent_ = 0; // Don't throw focus to a parent widget.
fl_throw_focus(this); fl_throw_focus(this);
} }
@ -248,5 +248,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const {
} }
// //
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.13 2002/01/01 15:11:31 easysw Exp $". // End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.14 2002/01/07 20:40:02 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.13 2002/01/03 18:28:36 easysw Exp $" // "$Id: Fl_win32.cxx,v 1.33.2.37.2.14 2002/01/07 20:40:02 easysw Exp $"
// //
// WIN32-specific code for the Fast Light Tool Kit (FLTK). // WIN32-specific code for the Fast Light Tool Kit (FLTK).
// //
@ -41,6 +41,7 @@
# include <unistd.h> # include <unistd.h>
#else #else
# include <winsock.h> # include <winsock.h>
//# include <winuser.h>
#endif #endif
#include <ctype.h> #include <ctype.h>
@ -527,13 +528,25 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
case WM_RBUTTONDOWN: mouse_event(window, 0, 3, wParam, lParam); return 0; case WM_RBUTTONDOWN: mouse_event(window, 0, 3, wParam, lParam); return 0;
case WM_RBUTTONDBLCLK:mouse_event(window, 1, 3, wParam, lParam); return 0; case WM_RBUTTONDBLCLK:mouse_event(window, 1, 3, wParam, lParam); return 0;
case WM_RBUTTONUP: mouse_event(window, 2, 3, wParam, lParam); return 0; case WM_RBUTTONUP: mouse_event(window, 2, 3, wParam, lParam); return 0;
case WM_MOUSEMOVE: mouse_event(window, 3, 0, wParam, lParam); return 0;
#ifdef WM_MOUSELEAVE case WM_MOUSEMOVE:
if (Fl::belowmouse() != window) {
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = hWnd;
TrackMouseEvent(&tme);
}
mouse_event(window, 3, 0, wParam, lParam);
return 0;
case WM_MOUSELEAVE: case WM_MOUSELEAVE:
Fl::handle(FL_LEAVE, window); Fl::belowmouse(0);
// Fl::handle(FL_LEAVE, window);
break; break;
#endif /* WM_MOUSELEAVE */
case WM_SETFOCUS: case WM_SETFOCUS:
Fl::handle(FL_FOCUS, window); Fl::handle(FL_FOCUS, window);
@ -1035,5 +1048,5 @@ void Fl_Window::make_current() {
} }
// //
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.13 2002/01/03 18:28:36 easysw Exp $". // End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.14 2002/01/07 20:40:02 easysw Exp $".
// //