Commit Graph

9139 Commits

Author SHA1 Message Date
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
Albrecht Schlosser 94fef6ff6e Rename file 'VERSION' to 'fltk_version.dat' (#191)
The file VERSION could be included erroneously on case insensitive
platforms (notably Windows) if the user included the c++ standard
header <version> directly or indirectly.

Renaming the file fixes this.
2021-02-20 13:46:34 +01:00
ManoloFLTK 32f926c360 Remove use of static global var gl_fontsize inside virtual member Fl_Gl_Window_Driver::alpha_mask_for_string() 2021-02-19 15:03:32 +01:00
Greg Ercolano 3c37cd033b Solves all "conversion" warnings in fluid for issue #109. 2021-02-18 16:37:51 -08:00
Albrecht Schlosser 389760c1c6 Remove #include ".../config_lib.h" from remaining sources
... except src/Fl.cxx

Fl.cxx uses the FL_CFG_* macros to define the values of runtime
configuration options. This is now the only usage of config_lib.h.

Todo: we can probably implement these runtime config vars in another
way and finally remove config_lib.h.
2021-02-18 13:11:47 +01:00
Albrecht Schlosser 135b8b9c86 Update dependencies 2021-02-18 12:55:51 +01:00
Albrecht Schlosser 6236d4d466 Remove redundant definition of FL_CFG_GFX_OPENGL 2021-02-18 12:34:30 +01:00
ManoloFLTK f333191312 Make clear we're calling a member function of class Fl_WinAPI_System_Driver. 2021-02-18 08:29:02 +01:00
Albrecht Schlosser ba0b8affe3 Rewrite Pango checks for autoconf/configure
- disable "fallback mode" (don't use hardcoded flags and libs)
- use pkg-config for pango flags and libs but don't *require* it [1]
- enable CXXFLAGS and LDFLAGS usage for --enable-pango

[1] if pkg-config is not available (installed) you can still use
environment variables CFLAGS, CXXFLAGS, and LDFLAGS to enable Pango.
2021-02-17 11:28:31 +01:00
ManoloFLTK b3f0b853a5 Documentation: remove Doxygen warnings of undeclared members. 2021-02-17 08:39:15 +01:00
ManoloFLTK 6dce15bfe3 Include config.h rather than config_lib.h in fl_open_uri.cxx 2021-02-17 08:39:15 +01:00
ManoloFLTK 9fdd675eab Remove FL_CFG_SYS_POSIX and FL_CFG_SYS_WIN32 preprocessor vars from Fl_lock.cxx 2021-02-16 16:28:57 +01:00
ManoloFLTK b709b2a2d3 Remove FL_CFG_WIN_COCOA preprocessor variable from Fl_Tree_Prefs.cxx 2021-02-16 15:50:15 +01:00