Commit Graph

8698 Commits

Author SHA1 Message Date
Albrecht Schlosser
2a9cdbf252 Add convenience options to glpuzzle demo
The demo exhibits a sometimes annoying /feature/ to spin the entire
puzzle if a user happens to click and/or drag the mouse somewhere on
the puzzle's background rather than on a puzzle piece.

A new command line option '-n' disables this feature entirely.

The extended menu and keyboard commands learned a new option and
keyboard shortcut 'n' => "Normal Position" to stop spinning and
to reset the puzzle to its original position.

The space key is another (hidden) shortcut for 'n'.
2020-01-18 14:40:53 +01:00
Albrecht Schlosser
088eedb0ad Update CMake instructions for cross compilation
Add CMAKE_RC_COMPILER variable, switch to 64-bit toolchain, add
a note to replace the toolchain location as required, fix typos.
2020-01-18 14:29:01 +01:00
ManoloFLTK
ef48a0ddb9 Use cross-platform code to set the window icon. 2020-01-18 13:03:29 +01:00
ManoloFLTK
ae29e4d0e4 Remove temporary CMake option OPTION_HIDPI no longer used. 2020-01-18 09:14:51 +01:00
ManoloFLTK
0a7b5b19bf Make Fl::screen_scale(int, float) functional also after initial window display. 2020-01-17 15:07:06 +01:00
Albrecht Schlosser
3e4baae6fc Fix DND in read-only Fl_Input (Fl_Output)
See report in fltk.coredev as of today (Jan 16, 2020):
  "Fl_Input in readonly mode - wrong behaviour".

Summary: Drag and drop within a read-only Fl_Input (i.e. Fl_Output)
  widget would not insert the dragged text (correct) but removed
  the dragged text from the widget (error). This is now fixed.
2020-01-16 17:12:24 +01:00
OKAMURA, Yasunobu
dd3bf0791e Fix JIS Keyboard dead keys 2020-01-16 16:17:36 +01:00
Albrecht Schlosser
33825df108 Don't include 'src/flstring.h' in menubar demo
src/flstring.h should only be used in library code because it
  includes <config.h>.

Document this fact in src/flstring.h.
2020-01-16 15:59:00 +01:00
Albrecht Schlosser
dfaab4ae90 Fix uninitialized vars in calls to fl_clip_box() (issue #6)
The main fixes are only to avoid static code analyzer warnings reported
in issue #5, but there are also minor bug fixes included. These bug
fixes are more of theoretical concerns though.

Close #6.
2020-01-15 21:23:26 +01:00
ManoloFLTK
3265d439f3 Slightly improve Fl_Quartz_Graphics_Driver::copy_offscreen() when macOS ≥ 10.4 2020-01-15 18:18:59 +01:00
Matthias Melcher
afcc79c3f7 Merge remote-tracking branch 'refs/remotes/origin/master' 2020-01-14 19:22:03 +01:00
Matthias Melcher
ed80d9cef0 Fixed some documentation for Fl_Preferences and fl_make_path. 2020-01-14 19:21:58 +01:00
ManoloFLTK
d598f9ea06 Fix typo in comment 2020-01-14 16:31:47 +01:00
Albrecht Schlosser
2437a75d5f Add missing Fl_Image_Reader files
Forgot to add these files. Sorry for the noise.
2020-01-13 23:15:00 +01:00
Albrecht Schlosser
115a6025f6 Fix Doxygen warnings and errors 2020-01-13 23:11:35 +01:00
Albrecht Schlosser
1e2b0af443 Combine image readers in class Fl_Image_Reader
This new class is explicitly internal and undocumented. We can
rename and/or redefine or extend it as we need.

This work is based on Matt's recent update with separate internal
classes BMPReader and GIFReader which have been replaced by
Fl_Image_Reader.
2020-01-13 22:41:13 +01:00
ManoloFLTK
c90baf9492 Bring main window to front when it's not there. 2020-01-13 18:01:29 +01:00
ManoloFLTK
2990717d6e Implement Fl_Window::icon() and default_icon() for macOS
The implementation is effective for macOS 10.10 and above.
Demo program test/device uses the new implementation.
2020-01-11 14:57:58 +01:00
Matthias Melcher
006d71c663 Improved documentation of Fl_Preferences.
Detailed information on how preference file paths are generated, and preliminary docs what happens if that fails. Documentation, on what FLTK die pre 1.4 when any of this failed. Also, a little TODO list for me that I will hopefully get to in the next days.
2020-01-11 00:19:58 +01:00
Matthias Melcher
7e0c82637d Updated image readers.
Removed duplicate code from Fl_JPEG_Image, updated and unified Doxygen comments. Avoiding name conflict in new protected functions.
2020-01-10 18:46:45 +01:00
Albrecht Schlosser
82d279c234 Upgrade bundled libjpeg from jpeg-9a to jpeg-9c
Release: 9a - Jan 14, 2018

For further details see README.bundled-libs.txt.
2020-01-09 19:57:49 +01:00
Albrecht Schlosser
8c4930a7d7 Upgrade bundled libpng from 1.6.16 to 1.6.37
Release: 1.6.37 - April 14, 2019

For further details see README.bundled-libs.txt.
2020-01-09 19:26:29 +01:00
Albrecht Schlosser
2411336e84 Fix X11 RTL text clipping (STR 2798) - part 2
Yet another fix for RTL text...
2020-01-09 00:35:42 +01:00
Albrecht Schlosser
2df013931b Improve X11 coordinate clipping for text (STR 2798)
Text outside the 16-bit X11 coordinate space must be clipped before
calling X11 draw functions, otherwise text might appear anywhere
in the window because X11 would "truncate" the coordinates instead
of proper clipping (X11 handles only 16-bit coordinates).
2020-01-08 19:50:35 +01:00
Albrecht Schlosser
3f1f871585 Drop 1.0 compatibility; document 1.4 migration
The FLTK 1.0 compatibility support by defining macro 'FLTK_1_0_COMPAT'
did no longer work since FLTK 1.3.x and nobody complained. Hence we
can safely remove this "feature".

Documentation changes:

 - Drop chapter 'Migrating Code from FLTK 1.0 to 1.1'
 - Drop chapter 'Migrating Code from FLTK 1.1 to 1.3'
 - Add  chapter 'Migrating Code from FLTK 1.3 to 1.4'

The removed chapters are still available in FLTK 1.3 docs.
2020-01-08 18:41:50 +01:00
ManoloFLTK
4197c2616d Use pkg-config to support --enable-pango under Darwin 2020-01-06 17:53:45 +01:00
ManoloFLTK
d2e2077544 Fix Doxygen description of the constructors. 2020-01-05 15:51:47 +01:00
Albrecht Schlosser
97e30260ec Update dependencies and .gitignore 2020-01-04 01:54:30 +01:00
Albrecht Schlosser
62cdfbcfa2 Upgrade bundled zlib from 1.2.8 to 1.2.11
Release: 1.2.11 - January 15, 2017

For further details see README.bundled-libs.txt.
2020-01-04 01:38:10 +01:00
Albrecht Schlosser
bebb116a06 Update test/Makefile for checkers build with fluid 2020-01-04 01:33:06 +01:00
Matthias Melcher
9c5888aa34 MacOS: Added the original code to the Fl_Preferences path that would search $HOME first, and only if that fails, we try other ways to find the home directory. This should be highly compatible with what we had first. 2020-01-04 00:51:22 +01:00
Matthias Melcher
ebec2629a2 I will revers my change. 2020-01-04 00:26:19 +01:00
Matthias Melcher
5bb880dfa2 Creating hires version of Checkers.
PNGs are just scaled but should be replaced with crispier graphics from the original vector files.
2020-01-03 23:12:23 +01:00
Matthias Melcher
7e5d6df711 Added Fluid file to Checkers as a tool to inline the PNG images. 2020-01-03 22:53:56 +01:00
Matthias Melcher
618024827e Merge remote-tracking branch 'refs/remotes/origin/master' 2020-01-03 21:38:18 +01:00
Matthias Melcher
1ba9e64ba9 Added code to read GIF files from memory (GitHub issue #33, 2/2) 2020-01-03 21:37:52 +01:00
Matthias Melcher
86893a90cb Added code to read BMP files from memory (GitHub issue #33, 1/2) 2020-01-03 21:10:00 +01:00
MatthiasM
27d22aeed6 Fixed previous commit for MSWindows. 2020-01-03 18:13:14 +01:00
MatthiasWM
c82d3878a4 Linux build: typos and stupidities to prev. commit 2020-01-03 17:55:08 +01:00
Matthias Melcher
462b681679 Linux/MSWindows: improved Fl_Preferences file path checking 2020-01-03 17:42:22 +01:00
Matthias Melcher
8147199a41 macOS: checking Fl_Preferences file path improved
zlib: removed warning
2020-01-03 17:05:52 +01:00
Matthias Melcher
db6fa8bf86 Merge remote-tracking branch 'refs/remotes/origin/master' 2019-12-31 18:33:01 +01:00
Matthias Melcher
df9eb443f0 Commented out some silly code in the preferences test. 2019-12-31 18:32:30 +01:00
Matthias Melcher
c0237a1f04 Limiting file access for Fl_Preferences.
Added Fl_Preferences::file_access() and various flags that make it possible to limit or completely deny file access to the preferences system, either for the core library or for the application or both.
2019-12-31 18:30:04 +01:00
Greg Ercolano
a624d9be2d Small docs addition for issue#45. 2019-12-30 07:25:06 -08:00
ManoloFLTK
a234ba7f33 Merge branch 'master' of https://github.com/fltk/fltk 2019-12-27 12:27:33 +01:00
ManoloFLTK
07c2ba56da Have Fl_Pack::draw() call Fl_Group::init_sizes() on its parent group.
Fl_Pack::draw() sometimes resizes itself. This must be followed
by a call to Fl_Group::init_sizes() as indicated in that function's doc:
"If you rearrange the widgets in your group, call this method to register
the new arrangement with the Fl_Group that contains them."
2019-12-27 12:14:26 +01:00
Albrecht Schlosser
3701950a90 Fix rare early timeouts in Fl_Clock (STR 3516).
This is the main patch for Fl_Clock discussed in STR 3516. Although
the root cause under Linux (in Fl::add_timeout()) has been fixed
in a previous commit (35a3e7cc1) early timeouts may still occur,
e.g. under Windows in a Virtualbox environment.

This commit reverts bab61a93d and replaces it with the patch proposed
by Manolo and further discussed in STR 3516.
2019-12-26 18:13:03 +01:00
Albrecht Schlosser
35a3e7cc16 Fix Fl::add_timeout() under Linux (STR 3516)
See comment 14 (excerpt):

"The current implementation basically handles add_timeout() the same
way as repeat_timeout(), i.e. add_timeout() *calls* repeat_timeout().
However, repeat_timeout() intentionally *corrects* the timeout value
by the value found in the global variable 'missed_timeout_by' which
is set when the timer expires, directly before the timer callback
is called. This variable is never reset."

This commit resets the variable as necessary in Fl::add_timeout().
2019-12-26 17:19:05 +01:00
Matthias Melcher
0a23d7fe6e Fluid needs to include text and binary files from within the .fl source directory.
Fixed including binaries and text to use the same path as the source code. This is consistent with the way the file is selected in the corresponding dialog box. Since the old behavior was false, I don't think this will break any existing projects.
2019-12-24 00:19:23 +01:00