Commit Graph

7514 Commits

Author SHA1 Message Date
Manolo Gouy
c88466928d Replace static protected bool Fl_Window_Driver::is_a_rescale by a private static variable and a public getter.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28 15:51:05 +00:00
Manolo Gouy
879c4df5bd Fix Fl_Native_File_Chooser::filter_value()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12363 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28 14:06:18 +00:00
Manolo Gouy
60567b12ef Rewrite Fl_X11_Window_Driver::resize_after_screen_change() to call Fl_Window_Driver::resize_after_scale_change()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28 07:46:33 +00:00
Manolo Gouy
bf033e7191 Remove temporary code used for development only.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12361 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28 07:23:03 +00:00
Manolo Gouy
7bd24a428d IsIconic() is the adequate WINAPI function to detect a minimised window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27 15:11:33 +00:00
Manolo Gouy
4a85b82ffe Simpler initialisation of the 'scale' local variable in WndProc().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27 14:48:27 +00:00
Manolo Gouy
3f572e327f Rename Fl_Window_Driver::in_resize_after_scale_change to 'is_a_rescale' which is more expressive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27 14:38:35 +00:00
Manolo Gouy
813bc06b19 Fix window iconize/deiconize when multiple screens with distinct scaling factors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27 08:30:20 +00:00
Albrecht Schlosser
6b24b20966 Fix confusing behavior of class Fl_Text_Selection.
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
2017-07-26 12:32:13 +00:00
Manolo Gouy
4c999258f1 X11 platform, resize window when moved across screens: remove hide()/show() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-26 07:45:59 +00:00
Albrecht Schlosser
463b3e5d9d Fix blocks demo keyboard handling, add new shortcut.
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
2017-07-25 18:44:19 +00:00
Albrecht Schlosser
768ba675b0 Fix test/blocks "runaway timer" bug.
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
2017-07-25 18:15:52 +00:00
Albrecht Schlosser
7aea5b50a0 test/blocks: improve timer test code.
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
2017-07-25 17:25:51 +00:00
Manolo Gouy
5a8a2e1ee5 Remove virtual Fl_Window_Driver::reuse_icons() no longer useful after r.12349.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 15:28:43 +00:00
Manolo Gouy
9c47bc322c Remove Fl_Window_Driver::reuse_cursor() that is no longer used since commit r12349.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 11:31:19 +00:00
Manolo Gouy
225c3d6da3 Rewrite Fl_Window_Driver::resize_after_scale_change() removing calls to Fl_Window::hide() and Fl_Window::show().
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
2017-07-25 10:57:24 +00:00
Manolo Gouy
2b529dc25d Remove useless statement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-24 15:20:59 +00:00
Manolo Gouy
649a68dc0c Fix incorrect difference between branches 1.3 and 1.4 in an Fl_Overlay_Window constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-24 06:32:26 +00:00
Albrecht Schlosser
8047691006 Update list of files excluded from documentation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12346 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-22 08:43:14 +00:00
Albrecht Schlosser
a8c4f77d50 Improve docs of Fl_Widget::callback() and do_callback().
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
2017-07-20 15:16:37 +00:00
Albrecht Schlosser
db1f29fdb5 Update Fl_Widget_Tracker docs with better example code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 15:06:11 +00:00
Manolo Gouy
94c9d70f7c Make Fl_Widget_Surface::draw(Fl_Widget *wid, int, int) draw also the overlay if 'wid' is an Fl_Overlay_Window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12343 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 11:04:59 +00:00
Manolo Gouy
ae2cc54519 Remove unnecessary local variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12342 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 09:25:49 +00:00
Manolo Gouy
e1972d2868 Remove Fl_Cocoa_Window_Driver::flush_double() because it is equal to Fl_Window_Driver::flush_double()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12341 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 08:54:01 +00:00
Manolo Gouy
4764b9bc2e Fl_Window_Driver::flush_single() needs not be a virtual member function.
It is really an accessor to protected method Fl_Window::flush().
Rename it to Fl_Window_Driver::flush_Fl_Window to reflect that.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 08:10:45 +00:00
Manolo Gouy
864c7609c7 Remove unwanted difference in one Fl_Double_Window constructor between branches 1.3 and 1.4.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12339 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-19 16:19:15 +00:00
Albrecht Schlosser
9d10d08ed0 [CMake] Add an option to use High-DPI support (Windows only).
This option can be used with CMake to configure the experimental
high-DPI support under Windows. The option may be removed once high-DPI
support under Windows is complete.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12338 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 20:15:02 +00:00
Albrecht Schlosser
7dda366286 Remove documentation of STR #3374 from CHANGES.
We don't need to document STR fixes of bugs that have been introduced
and fixed in FLTK 1.4.0 svn since this is not a regression since 1.3.x.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12328 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 15:34:12 +00:00
Manolo Gouy
cfe6e8e4b6 Simplify handling of the windowDidMove notification since MacOS 10.10
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12327 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 14:35:05 +00:00
Manolo Gouy
65b334777f Added support for MacOS 10.13 "High Sierra".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 05:54:25 +00:00
Albrecht Schlosser
bd1ba631fb Add script to update bundled config files, and update files.
The bundled scripts misc/config.guess and misc/config.sub should be
updated from time to time to get support for new platforms.

The new script 'misc/update_config_scripts' can be used to download
the latest versions of config.guess and config.sub.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12323 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-17 17:08:37 +00:00
Greg Ercolano
38f134c1ed Some compilers probably need string.h for strcmp()..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12322 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-17 01:20:00 +00:00
Greg Ercolano
0173358351 Added new example program 'nativefilechooser-simple.cxx'
(Simpler than the application example)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-17 01:13:28 +00:00
Manolo Gouy
e9741d01f0 X11 platform: Fix bug in test/overlay where overlay is clipped when using button shortcuts.
In branch 1.3, file src/Fl_Overlay_Window.cxx, function Fl_Overlay_Window::flush(),
part of line 49 was not reproduced in branch 1.4.
This fix reproduces in branch 1.4 the equivalent of the code in branch 1.3.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12320 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-16 17:42:28 +00:00
Manolo Gouy
a74cca3219 Support of MacOS 10.13 to appear soon: fix handling of window moves in presence of subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-14 19:58:28 +00:00
Manolo Gouy
872406c871 FLDropTarget::DragEnter() replace call to Fl_Screen_Driver::get_mouse(int&, int&) by call to GetCursorPos(POINT*)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12317 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-14 06:56:20 +00:00
Manolo Gouy
196d0a73b4 Fix for STR#3390 Drop to FLTK widget fails when desktop is scaled - new solution.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12315 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-13 11:42:45 +00:00
Albrecht Schlosser
c92fee897b Fix Visual Studio shared library build (STR #3389).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-12 21:51:42 +00:00
Albrecht Schlosser
b7851fac8e Add missing #include in fltk-versions example program.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-12 21:49:19 +00:00
Manolo Gouy
f84b9040f7 WIN32 platform: Fix drag-n-drop to FLTK widget when the desktop is scaled and FLTK_HIDPI_SUPPORT is not defined.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-11 17:19:25 +00:00
Manolo Gouy
b601e9558d Add missing definition of the 'uchar' type in FL/x.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-11 13:22:56 +00:00
Manolo Gouy
9276dad42f End of fix for STR#3387 "Bug of timer implementation on macosx"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-11 12:03:05 +00:00
Matthias Melcher
a8f4fbc2ef STR #2823.2/2: Improved Fl_Preferences "dirty" flag handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12305 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 21:00:17 +00:00
Matthias Melcher
7542e8cb16 STR #2823.1/2: avoiding setting "dirty" flag in a read operation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12304 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 20:34:28 +00:00
Albrecht Schlosser
d9460d787b Update dependencies (makedepend).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 19:42:12 +00:00
Albrecht Schlosser
0c210ae867 Introduce Fl_Group::bounds(), deprecate Fl_Group::sizes().
The new method Fl_Group::bounds() replaces Fl_Group::sizes() whose
internal array structure was not documented.

Fl_Group::bounds() uses the new and documented class Fl_Rect for its
internal structure.

src/Fl_Tile.cxx now uses bounds() instead of sizes().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12302 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 19:16:40 +00:00
Albrecht Schlosser
27d7736475 Fix some typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12301 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 18:28:10 +00:00
Matthias Melcher
bec74afb39 More logical data path name
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12300 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 16:23:22 +00:00
Matthias Melcher
1a7dc77851 STR #2034: Fl_Preferences::getUserdataPath() is much more careful when creating a pathname based on the preferences filename. Among other things, remove a possible buffer overflow.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 16:19:26 +00:00
Manolo Gouy
9f69df923f Define Fl_WinAPI_Screen_Driver::DWM_scaling_factor() only without FLTK_HIDPI_SUPPORT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12298 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 15:06:51 +00:00