Commit Graph

9401 Commits

Author SHA1 Message Date
ManoloFLTK
ba03dde15c Move probe_for_GTK() to class Fl_Posix_System_Driver from Fl_X11_System_Driver.
Similarly move dlopen_or_dlsym().
This move is because GTK is not X11-specific.
2021-03-31 09:51:10 +02:00
ManoloFLTK
ef41409759 Add guard against multiple inclusion of header file. 2021-03-27 19:05:29 +01:00
ManoloFLTK
4657e988f7 Remove X11-specific code from platform-independent Fl_PostScript.cxx 2021-03-26 07:52:21 +01:00
Greg Ercolano
4951fd1801 Better fix for issue #206.
Albrecht caught a problem with my strncat use (see comments for 12d8da9c).

I noticed we have fl_strlcpy() and fl_strlcat() which is what was really
needed here.
2021-03-23 18:27:30 -07:00
Greg Ercolano
12d8da9cb6 Solve issue #206 warning. 2021-03-23 12:24:04 -07:00
Greg Ercolano
8a9e25cdac Optimization for pixel loop.
As per erco's comments on fltk.coredev, Mar 21 2021
in thread Subject: Re: 1.4 build failing on OSX for me
2021-03-23 12:18:41 -07:00
Albrecht Schlosser
5fb6713485 Remove unused #include statements
Cairo is not used in this file, math.h is not necessary, and stdio.h
is only required if USE_PANGO is false.
2021-03-22 22:57:24 +01:00
Greg Ercolano
d6d1d8afe4 Solve issue #204, wrong default for labelfgcolor()
FL_BLACK changed to FL_FOREGROUND_COLOR as per docs.
2021-03-22 07:58:47 -07:00
Albrecht Schlosser
62ff323b70 Add missing include file stdlib.h for abs(int)
This file was included (in math.h or elsewhere) on Linux and latest
macOS versions but maybe not in earlier macOS versions or with other
configuration options.
2021-03-22 00:13:47 +01:00
Albrecht Schlosser
edfe684419 Windows: fix fl_filename_isdir()
- convert filename from UTF-8 to "Windows wide chars"
- use GetFileAttributesW() instead of _stat()
2021-03-21 19:36:27 +01:00
Albrecht Schlosser
8d26d5ed4b Hide window in quit callback in wizard-simple example 2021-03-21 02:10:19 +01:00
Albrecht Schlosser
90dbf0c77d Fix menu-with-images example w/o using exit()
Use window->hide() in quit callback instead.
2021-03-21 01:58:54 +01:00
Albrecht Schlosser
41266df7ae Remove unnecessary system includes from public headers
Add includes of system headers in the implementation files
where necessary.
2021-03-21 00:42:28 +01:00
Greg Ercolano
bd52db0b95 Added docs for public fl_vsnprintf() (STR #3413)
Applied vsnprintf_v2.patch from STR#3413 which documents
the previously undocumented function, so that it shows up
here in the doxygen docs:

    Files -> File List -> vsnprintf.c -> fl_vsnprintf()

This commit does not solve STR #3413, just adds the recommended documentation
for fl_vsnprintf(). Other functions in src/vsnprintf.c could use docs too.

See the bottom of comment #5 in the STR for recommendations to fully solve.
2021-03-19 09:22:01 -07:00
Albrecht Schlosser
edd52ca1e8 Add fluid callback demo program to examples folder
This example demonstrates how to build an entire program using fluid
and how to add static and virtual class methods as callbacks.
2021-03-19 13:48:41 +01:00
Greg Ercolano
19ae897553 Added chart-simple example 2021-03-18 19:41:27 -07:00
fire-eggs
0688c77c33 Fix stack corruption when loading GIF 2021-03-18 07:02:14 +01:00
ManoloFLTK
a4866ffc21 Partial fix for issue #188.
This fixes the inconsistency created by the possibility to change img->w() and img->h()
values. The fix is to use img->data_w() and img->data_h() that have constant values.
2021-03-15 15:12:25 +01:00
Albrecht Schlosser
a620ef5b37 Fix Linux build with --enable-pango 2021-03-15 15:06:23 +01:00
ManoloFLTK
1fbcae13bd Create class Fl_Cairo_Graphics_Driver.
That class is extracted from inside Fl_PostScript_Graphics_Driver and might
become handy in the future.
2021-03-15 14:09:50 +01:00
ManoloFLTK
a3cb4af739 Class Fl_PostScript_Graphics_Driver: better separation of what varies with USE_PANGO 2021-03-15 08:13:21 +01:00
ManoloFLTK
ce142e80df Fix fl_endpoints() for macOS platform that was not effective. 2021-03-13 20:06:28 +01:00
ManoloFLTK
368f18016c
Fast pango (#201)
* Cache single unicode character widths under Xft+Pango
2021-03-13 19:21:25 +01:00
ManoloFLTK
569fec25e0 Unification of scaled coordinate calculations in class Fl_Scalable_Graphics_Driver
Most coordinate calculations are done with the new inline function
 int Fl_Scalable_Graphics_Driver::floor(int coord)
that is used by both the Windows and X11 platforms.
2021-03-11 16:05:32 +01:00
Albrecht Schlosser
bd6c985434 Improve Fl_Help_View test file
- add DOCTYPE, <head> and <body> statements
- make the file more standards conformant
- update OL tests, add nested OL/UL test
- add 'alt' tags to image refs

Note: the 'NAME' tag is obsolete and should be replaced with 'ID'
but Fl_Help_View does not parse 'ID' tags (yet).
2021-03-11 14:01:01 +01:00
Albrecht Schlosser
e25907c830 autoconf: fix PNG build
configure didn't export HAVE_PNG_H and HAVE_LIBPNG_H to config.h
2021-03-07 15:29:14 +01:00
ManoloFLTK
e19bfc0d8f Windows platform: accurate drawing area of RGB images with scaled GUI. 2021-03-02 12:11:30 +01:00
ManoloFLTK
42aa31b900 X11 platform: Accurately control RGB image drawing with GUI scaling. 2021-03-02 10:07:06 +01:00
ManoloFLTK
b771ee53b9 Remove duplicated code between derived classes of Fl_Graphics_Driver - cont'd. 2021-03-01 15:47:30 +01:00
ManoloFLTK
0623a8d4b9 Remove duplicated code between derived classes of Fl_Graphics_Driver. 2021-03-01 15:11:00 +01:00
Albrecht Schlosser
37175d1757 macOS: add resize-example apps to .gitignore 2021-03-01 14:53:11 +01:00
ManoloFLTK
81a4b7329c Remove warnings about hidden virtual member functions. 2021-03-01 11:20:15 +01:00
Albrecht Schlosser
49a78bc482 Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files

To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
2021-03-01 10:45:59 +01:00
Albrecht Schlosser
266b5e7cdd Fix CMake warning related to CMP0072 2021-03-01 10:02:41 +01:00
Albrecht Schlosser
ae41dc46b9 Update dependencies 2021-02-27 23:34:12 +01:00
Albrecht Schlosser
08d9b3e10d Remove config_lib.h and runtime configuration info
... as discussed in fltk.coredev.
2021-02-27 15:09:12 +01:00
ManoloFLTK
c83490fe30 Rename forgotten occurrence of fl_remove_scale() in Doxygen data. 2021-02-27 09:08:22 +01:00
ManoloFLTK
88a3f7b7be Rename fl_remove_scale() to fl_override_scale() as discussed in fltk.general
Re: Can custom box type functions handle their own high-DPI screen scaling?
2021-02-27 08:18:01 +01:00
Albrecht Schlosser
5c1b69cd4f Fix Doxygen docs (unescaped '$') 2021-02-25 19:23:37 +01:00
Albrecht Schlosser
52e16fb1be Update bundled libs to current versions
- update README.bundled-libs.txt + some comments
- update bundled jpeg lib from version 9c to 9d

All bundled libs are now up-to-date. For current update status
please see README.bundled-libs.txt.
2021-02-25 16:59:36 +01:00
ManoloFLTK
5bd467fa17 Add fl_remove_scale()/fl_restore_scale() to transiently draw without scaling factor.
This new API is a response to this message in fltk.general :
Can custom box type functions handle their own high-DPI screen scaling?
2021-02-25 11:07:07 +01:00
ManoloFLTK
bef46b5cb8 Improve precision of GUI scaling for Windows platform. 2021-02-24 14:52:47 +01:00
Albrecht Schlosser
9f84fd05e8 Update bundled nanosvg library to latest version
For details see:

- README.bundled-libs.txt
- nanosvg/README.txt
2021-02-22 14:37:26 +01:00
ManoloFLTK
28aaa4d4ce Simplify source code of Fl_GDI_Graphics_Driver::draw_rgb(Fl_RGB_Image *,…) 2021-02-22 11:34:14 +01:00
ManoloFLTK
dd75da6351 Remove VS compilation warnings about implicit type conversions. 2021-02-21 21:34:27 +01:00
Albrecht Schlosser
07dfcd0fb7 Suppress Visual Studio warnings in bundled libs
We don't have control over the code of these bundled libs, hence we
suppress some special warnings:

- C4267: conversion from ... to ..., possible loss of data

- C4996: The POSIX name for this item is deprecated.
         Instead, use the ISO C++ conformant name ...
2021-02-21 19:30:23 +01:00
ManoloFLTK
e387dbd30c Remove VS compilation warning messages about implicit type conversions. 2021-02-21 19:15:39 +01:00
ManoloFLTK
842cbf0f10 Fix for issue #192: focus box drawing incorrectly on OSX (e.g. 10.10.5) at scales >100% 2021-02-21 18:08:33 +01:00
Albrecht Schlosser
f2faab9ba3 Remove Travis-CI control file
Since we're using GitHub Actions for CI builds this file is no longer
needed.
2021-02-21 16:52:44 +01:00
Albrecht Schlosser
a274e1488b Fix #include statements, remove unnecessary includes 2021-02-21 14:04:44 +01:00