mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
Remove obsolete/disabled "boxcheat" code
Windows platform: Remove comments about obsolete code and one exported declaration of the variable 'fl_background_pixel' which is used only on the X11 platform. X11 platform: Remove comments. Other platforms: not affected.
This commit is contained in:
+2
-3
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Windows system header file for the Fast Light Tool Kit (FLTK).
|
// Windows platform header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
// Copyright 1998-2022 by Bill Spitzak and others.
|
||||||
//
|
//
|
||||||
// This library is free software. Distribution and use rights are outlined in
|
// This library is free software. Distribution and use rights are outlined in
|
||||||
// the file "COPYING" which should have been included with this file. If this
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
@@ -41,7 +41,6 @@ typedef HWND Window;
|
|||||||
|
|
||||||
extern FL_EXPORT UINT fl_wake_msg;
|
extern FL_EXPORT UINT fl_wake_msg;
|
||||||
extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid()
|
extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid()
|
||||||
extern FL_EXPORT int fl_background_pixel; // hack into Fl_Window::make_xid()
|
|
||||||
extern FL_EXPORT HPALETTE fl_palette; // non-zero only on 8-bit displays!
|
extern FL_EXPORT HPALETTE fl_palette; // non-zero only on 8-bit displays!
|
||||||
extern void fl_release_dc(HWND w, HDC dc);
|
extern void fl_release_dc(HWND w, HDC dc);
|
||||||
extern FL_EXPORT void fl_save_dc( HWND w, HDC dc);
|
extern FL_EXPORT void fl_save_dc( HWND w, HDC dc);
|
||||||
|
|||||||
@@ -1977,7 +1977,6 @@ private:
|
|||||||
|
|
||||||
void fl_fix_focus(); // in Fl.cxx
|
void fl_fix_focus(); // in Fl.cxx
|
||||||
|
|
||||||
// int fl_background_pixel = -1; // color to use for background
|
|
||||||
UINT fl_wake_msg = 0;
|
UINT fl_wake_msg = 0;
|
||||||
int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
|
int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
|
||||||
|
|
||||||
@@ -2612,20 +2611,8 @@ int Fl_WinAPI_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
|
|||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// Implement the virtual functions for the base Fl_Window class:
|
// Implement the virtual functions for the base Fl_Window class:
|
||||||
|
|
||||||
// If the box is a filled rectangle, we can make the redisplay *look*
|
|
||||||
// faster by using X's background pixel erasing. We can make it
|
|
||||||
// actually *be* faster by drawing the frame only, this is done by
|
|
||||||
// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
|
|
||||||
// For Windows it looks like all windows share a background color, so
|
|
||||||
// I use FL_GRAY for this and only do this cheat for windows that are
|
|
||||||
// that color.
|
|
||||||
// Actually it is totally disabled.
|
|
||||||
// Fl_Widget *fl_boxcheat;
|
|
||||||
// static inline int can_boxcheat(uchar b) {return (b == 1 || (b & 2) && b <= 15);}
|
|
||||||
|
|
||||||
void Fl_WinAPI_Window_Driver::show() {
|
void Fl_WinAPI_Window_Driver::show() {
|
||||||
if (!shown()) {
|
if (!shown()) {
|
||||||
// if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color());
|
|
||||||
makeWindow();
|
makeWindow();
|
||||||
} else {
|
} else {
|
||||||
// Once again, we would lose the capture if we activated the window.
|
// Once again, we would lose the capture if we activated the window.
|
||||||
|
|||||||
+3
-10
@@ -3198,16 +3198,9 @@ void Fl_X11_Window_Driver::label(const char *name, const char *iname) {
|
|||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// Implement the virtual functions for the base Fl_Window class:
|
// Implement the virtual functions for the base Fl_Window class:
|
||||||
|
|
||||||
// If the box is a filled rectangle, we can make the redisplay *look*
|
// If the box is a filled rectangle, we can make the redisplay
|
||||||
// faster by using X's background pixel erasing. We can make it
|
// *look* faster by using X's background pixel erasing.
|
||||||
// actually *be* faster by drawing the frame only, this is done by
|
|
||||||
// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
|
|
||||||
//
|
|
||||||
// On XFree86 (and prehaps all X's) this has a problem if the window
|
|
||||||
// is resized while a save-behind window is atop it. The previous
|
|
||||||
// contents are restored to the area, but this assumes the area
|
|
||||||
// is cleared to background color. So this is disabled in this version.
|
|
||||||
// Fl_Window *fl_boxcheat;
|
|
||||||
static inline int can_boxcheat(uchar b) {return (b==1 || ((b&2) && b<=15));}
|
static inline int can_boxcheat(uchar b) {return (b==1 || ((b&2) && b<=15));}
|
||||||
|
|
||||||
void Fl_X11_Window_Driver::show() {
|
void Fl_X11_Window_Driver::show() {
|
||||||
|
|||||||
@@ -438,7 +438,6 @@ void fl_draw_box(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) {
|
|||||||
if (t && fl_box_table[t].f) fl_box_table[t].f(x,y,w,h,c);
|
if (t && fl_box_table[t].f) fl_box_table[t].f(x,y,w,h,c);
|
||||||
}
|
}
|
||||||
|
|
||||||
//extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.cxx
|
|
||||||
/** Draws the widget box according its box style */
|
/** Draws the widget box according its box style */
|
||||||
void Fl_Widget::draw_box() const {
|
void Fl_Widget::draw_box() const {
|
||||||
if (box_) draw_box((Fl_Boxtype)box_, x_, y_, w_, h_, color_);
|
if (box_) draw_box((Fl_Boxtype)box_, x_, y_, w_, h_, color_);
|
||||||
|
|||||||
Reference in New Issue
Block a user