Possible side effect: programs that relied upon inclusion of unrelated
system headers by FL/Fl_Table.H or FL/Fl_Table_Row.H may fail to compile.
Removed include files (some only on certain platforms, list may be incomplete):
#include <FL/Fl.H> // moved to implementation (.cxx)
#include <FL/Fl_Box.H> // moved to implementation (.cxx)
#include <FL/Fl_Scrollbar.H> // moved to implementation (.cxx)
#include <sys/types.h>
#include <string.h> // memcpy
#include <malloc.h> // WINDOWS only: malloc/realloc
#include <stdlib.h> // UNIX: malloc/realloc
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Currently src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx wouldn't
contribute any code to the lib, but it is kept for future extensions.
This file is no longer compiled (see src/CMakeLists.txt and src/Makefile).
Tested (only) under Windows and Linux.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The widget's handle method may change the value of Fl::e_text.
This occurs for instance if this method calls fl_choice().
So, memorize the value of Fl::e_text before, to delete the correct array after the call to the handle method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12371 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_Text_Selection got a new method length() and returns 0 in length()
and in all offsets (start(), end(), position()) if no text is selected
(selected() == false).
The behavior in FLTK 1.3 and earlier versions (returning undefined
values if !selected()) was confusing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The blocks demo was unintentionally intercepting ctrl/+ which was
introduced in FLTK 1.4.0 to change scaling for HiDPI screens. Now this
is separated: use ctrl/+/-/0 to change scaling, use '+' alone to change
the game level.
The new keyboard shortcut ALT+SHIFT+H allows users to reset their high
scores without editing the preferences file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Bug #1: When entering the next level an _additional_ timeout was started,
hence multiple timers would run in parallel and increase the game's speed
more than (supposedly) intended.
Bug #2: When the game was over, these additional timers were not stopped,
hence level 1 was never again as slow as it should be.
This is fixed in this commit. Additionally the timer values are defined
as preprocessor macros (constants) for easier fine tuning. To compensate
for the lower speed in higher levels the LEVEL_FACTOR was reduced from
0.95 to 0.90 so the higher levels are slightly faster than without this
fix.
Note: the result of this fix (generally less speed increase per level)
may result in higher scores.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12353 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit does not change operative code but adds the ability to test
the timer callback under Windows and improves the timer statistics.
The code has been formatted in some parts, but not "everywhere".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Windows are now rescaled with a call to Fl_Window::resize() which has been slightly modified.
Static member variable bool Fl_Window_Driver::in_resize_after_scale_change is created,
and is true if and only if Fl_Window::resize() is called by Fl_Window_Driver::resize_after_scale_change().
This new flag allows Fl_Window::resize() to perform correctly the rescaling of the window.
Fl_Gl_Window::resize() and Fl_Double_Window::resize() also consult the value of
the Fl_Window_Driver::in_resize_after_scale_change flag.
The platform-specific Fl_WinAPI_Window_Driver::resize() and Fl_X11_Window_Driver::resize()
also use the Fl_Window_Driver::in_resize_after_scale_change flag.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Clarify that all variants of do_callback() call clear_changed() after
the callback and that 'long Fl_Widget::argument()' may truncate the
user_data value on some (particularly Windows 64-bit) platforms.
Some code has been reformatted and refactored with better variable names,
but there are no effective code changes.
Obsolete, inactive code was removed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121