Commit Graph

9066 Commits

Author SHA1 Message Date
Michael R Sweet d2d5d4371e
Add autoconf cross-compilation support files. 2021-02-13 17:17:43 -05:00
Michael R Sweet e3c3b9b39f
Save work on configure.ac modernization. 2021-02-13 17:17:43 -05:00
ManoloFLTK 9fad601401 Remove compilation warnings issued by Visual Studio 2019. 2021-02-13 21:13:04 +01:00
ManoloFLTK 5ade8fcb09 Fix for issue #185 "Shared Image reload() loses initial dimensions" 2021-02-12 07:32:49 +01:00
Albrecht Schlosser c7dc112d2e Fix missing export of fl_scroll() (issue #186) 2021-02-12 00:45:25 +01:00
Albrecht Schlosser 67bd27a2be Fix comments and documentation 2021-02-12 00:39:13 +01:00
Albrecht Schlosser ff0543524b Fix X11 copy-paste and drag-and-drop target selection (#182)
Select the "best" target rather than a random one out of a list of
suitable targets. The old target selection algorithm would sometimes
select the wrong target and hence retrieve unexpected data.

This could happen in both copy-paste and drag-and-drop operations.

Note: backported to 1.3.6 (git current) as well
      (commit 7ce6d2cf5d).

Closes #182.
2021-02-11 15:51:37 +01:00
ManoloFLTK ed5854d65a Fix for issue #185 in Fl_Shared_Image::reload()
This fix updates Fl_Shared_Image::reload() to account for the data_w() and data_h()
image members.
2021-02-11 09:12:12 +01:00
Albrecht Schlosser d53d6f3bce Fix potential NULL pointer dereference 2021-02-10 14:11:04 +01:00
Albrecht Schlosser 086396ca54 Fix output and screen_num() in handle_events demo
Output was incorrect, partly to stdout and stderr, resp.

As Manolo noted in fltk.general, Fl_Window::screen_num() is the
correct API to retrieve the screen number of a window rather than
Fl::screen_num(...).
2021-02-10 14:10:13 +01:00
ManoloFLTK 818a2ab838 Windows scaling support: fix after WM_MOVE and in mouse_event()
The fix in mouse_event() makes sure the scale factor of the receiving window is correct
when distinct screens have distinct scale factor values.

The fix after WM_MOVE event makes sure a subwindow-containing window in a
multiple-screen desktop having distinct scale factor values is correctly rescaled.
2021-02-10 10:19:08 +01:00
Albrecht Schlosser b4c464f71b Add event handling test and demo program
This is intended to be used as
  (a) an example of event handling and
  (b) a test program to visualize many event related variables

This first version is compatible with FLTK 1.3.x but lacks the screen
scaling factor under 1.3.x (which is always assumed to be 100%).

Note: this does not reflect any system or monitor related settings.
2021-02-08 15:46:35 +01:00
ManoloFLTK 8eed8b9600 Scaling support under Windows: fix fullscreen window mode.
When scale was > 1, fullscreen window did not cover the task bar,
as seen with test/fullscreen.
2021-02-01 13:25:39 +01:00
Albrecht Schlosser 246291fe51 Make Fl_Gl_Window::gl_driver() private (#184)
The driver stuff should be private. The only usage I found was in
class _Fl_Gl_Overlay which is now a 'friend class'.
2021-01-29 14:11:19 +01:00
Albrecht Schlosser a2a026ed74 Remove debug output from test/fullscreen demo
Output statements commented out and modified to go to stderr if used.
2021-01-29 13:56:09 +01:00
ManoloFLTK 871e7063a2 Windows: restore "checkers" app that was damaged after handling of issue #155. 2021-01-25 18:58:05 +01:00
ManoloFLTK 7fdac3790a Windows: fix scaling problem in Fl_Tile.
The problem was visible with test/tile for fractional scaling values when
moving the vertical division.
2021-01-25 08:01:42 +01:00
Albrecht Schlosser d7af409f42 Remove "Figure x.y: " from html image captions
... as discussed in fltk.coredev for easier maintenance.

Also edit some minor issues.
2021-01-13 22:52:33 +01:00
Albrecht Schlosser 3d53548cfb Documentation: enhance chapter "FLTK Basics"
basics.dox: Some minor edits, clarifications and reordering for
  better readability.

drawing.dox: minor edits, remove "Figure x.y:" etc. (to be continued)

enumerations.dox: change chapter title
2021-01-13 21:15:10 +01:00
Albrecht Schlosser 7ef23153df Update test/hello.cxx and related image
Improve CMP compatibility and use a better (anti-aliased) image for
the docs.
2021-01-13 15:12:26 +01:00
Albrecht Schlosser fba4d58509 Fix Fl_Help_View::find() (issue #179)
Fix search (string comparison) which had a few different issues.
Document the function, arguments, and details about string matching.

To do: correctly match complex HTML entities like "€" with
Unicode code points >= U+0080 (UTF-8 multi byte encoding).
2021-01-08 14:57:34 +01:00
erco77 d86358870d
Merge pull request #175 from ComputerNerd/wrong-err-fix
[FLTK 1.4] Fix the errmsg for the native file chooser. We should be using exterr instead of err which is always zero.
2020-12-13 19:30:05 -08:00
ComputerNerd 34da17cd85 Set errmsg to exterr instead of err which will always be zero. 2020-12-13 21:15:47 -06:00
ManoloFLTK 4f29313a80 Windows scaling: fix redraw after partial expose events.
Under XP (at least), WM_PAINT events occur where information of where to redraw
is mostly given by the system, in the window's update region. When the GUI is scaled,
that information must be un-scaled and then added to Fl_X::i(window)->region, for the
adequate part of the window to be painted.
2020-12-03 15:08:59 +01:00
ManoloFLTK f787a1b4e4 Remove build-time warning.
The warning message was:
Makefile:318: warning: ignoring prerequisites on suffix rule definition
2020-12-02 21:12:15 +01:00
ManoloFLTK d1c7caec3b Improve Fl_Graphics_Driver::cache_size() when GUI is scaled.
The change lets this function enlarge the size only when strictly necessary
for image tiling.
2020-12-02 14:39:49 +01:00
ManoloFLTK 4171cbe0be Windows scaling: fix computation of border sizes.
The corrected error was to use, e.g.,
  int dx = W - w->w() * s;
which does not produce the desired integer value.
The correct writing is :
  int dx = W - int(w->w() * s);
2020-12-01 16:58:08 +01:00
Albrecht Schlosser 4531c6c48f Travis-CI: simplify config, disable macOS build (temp.)
Note: macOS builds will be re-enabled when the Travis-CI
  "Credits" issue is resolved.
2020-12-01 02:03:32 +01:00
Albrecht Schlosser da5dc6eebf Travis-CI: disable macOS and documentation builds
Temporarily disable unnecessary builds for trouble shooting with
  Travis-CI support (no Credits)
2020-12-01 01:23:12 +01:00
ManoloFLTK 67bb631bd9 Scaling for Windows and X11: support rectangular loops. 2020-11-30 18:50:19 +01:00
ManoloFLTK ff372c86d8 Fix for issue #123 - Windows platform 2020-11-29 09:48:23 +01:00
ManoloFLTK f5f9043208 Windows: fix undrawn pixels at right and bottom of scaled windows. 2020-11-29 09:15:04 +01:00
ManoloFLTK 4291e9497b Fix for issue #123 - macOS platform 2020-11-27 17:49:49 +01:00
ManoloFLTK d851106f47 Prevent compilation warning about uninitialized variables. 2020-11-27 09:17:33 +01:00
ManoloFLTK d7985607d6 Fix for issue #123 - X11 platform
As discussed, only the window position becomes rounded to nearest integer value
when a fractional GUI scale factor is applied.
2020-11-25 09:21:44 +01:00
ManoloFLTK c70a091fa3 Match format specifier and variable type. 2020-11-25 08:29:47 +01:00
Albrecht Schlosser df4ae812b4 Travis-CI: update Linux + macOS build environments
Linux: trusty -> xenial (current @ travis-ci.com)

macOS: (default) -> xcode12.2 (latest as of today)
2020-11-25 00:18:10 +01:00
Albrecht Schlosser 5a04ca6c38 Improve resizing of test/cube demo (#157, #166)
Based on Greg's mods in 'cube-v5a-patch.txt' in this issue #157 comment:
  https://github.com/fltk/fltk/issues/157#issuecomment-732496554

Simplify the layout and keep border widths constant:

- combine left GL window + buttons (ct_group) in left group (lt_grp)
- make the cube Fl_Gl_Windows the resizable()s of their respective groups.

The latter keeps the margin widths constant.
2020-11-24 21:37:59 +01:00
ManoloFLTK bb099ade19 Basic CMakeLists.txt file to build FLTK-based user program - continued
A single add_executable() command is possible.
2020-11-24 10:05:36 +01:00
ManoloFLTK c684505407 Fix for issue #163: Improve Xrender scaling quality 2020-11-24 10:05:36 +01:00
ManoloFLTK c7274294ae Basic CMakeLists.txt file to build FLTK-based user program.
The change is mostly concerned with showing how to build
a macOS bundled app, in addition to X11 and Windows support.
2020-11-23 17:22:58 +01:00
ManoloFLTK 018134161d Documentation: clarify how keypad keys are named. 2020-11-23 11:44:42 +01:00
Greg Ercolano a41d8c0e60 Fix issue #162 2020-11-22 18:18:02 -08:00
ManoloFLTK a47c907fca Fix for STR #3424 and for issue #160 2020-11-22 10:16:21 +01:00
Albrecht Schlosser 7d4f427a93 Fix Fl_Scrollbar layout in test/valuators demo 2020-11-21 13:21:11 +01:00
Albrecht Schlosser f519aceb85 Update dependencies 2020-11-21 13:20:26 +01:00
ManoloFLTK aa9e2e888e Fix for issue #159 - continued
Changes here concentrate the fix within static function alpha_blend() and thus
are visible only when drawing transparent images under X11 platform
without Xrender.
2020-11-20 10:33:46 +01:00
ManoloFLTK aa140973a3 Remove compilation warnings about signed/unsigned comparison. 2020-11-19 16:13:02 +01:00
ManoloFLTK e52e057cdf Fix for issue #159. 2020-11-19 15:59:48 +01:00
ManoloFLTK 3ec51f0b80 Remove unnecessary function call when macOS ≥ 10.6 2020-11-19 15:59:48 +01:00