Commit Graph

11402 Commits

Author SHA1 Message Date
Matthias Melcher
9a0d1f16d7 FLUID: update file format information 2024-04-26 11:57:31 +02:00
ManoloFLTK
c82fde7292 Wayland: slightly simpler code for IM support 2024-04-26 07:21:12 +02:00
ManoloFLTK
85315ee598 Prevent "The GTK protocol" from being included in the FLTK documentation 2024-04-25 18:16:12 +02:00
Matthias Melcher
e52a358e85 FLUID: Improve usability of Declaration Blocks
Decl Blocks can now output code around static code
in source and header files.
2024-04-25 17:52:38 +02:00
ManoloFLTK
c0d2aa3f09 Fix problem in window titlebar capture under X11. 2024-04-25 15:12:34 +02:00
ManoloFLTK
6d21285e0f Fix error under KDE+Wayland where keystrokes tend to be repeated
see also: fltk-rs/fltk-rs#1539
2024-04-25 11:52:06 +02:00
ManoloFLTK
38c9ebc29d Substantial fix for "IME problem under wayland" in fltk-rs
see: fltk-rs/fltk-rs#1539
2024-04-25 08:49:08 +02:00
ManoloFLTK
00b603fa09 Very partial fix for "IME problem under wayland" in fltk-rs
see: https://github.com/fltk-rs/fltk-rs/issues/1539
2024-04-24 10:03:17 +02:00
Matthias Melcher
3f91c8b5ee macOS: Fix scaling subwindows #927
Converting Cocoa coordinates into FLTK coordinates
should be avoided as much as possible because the
conversion loses precision for scaling != 100%.
2024-04-23 19:25:31 +02:00
ManoloFLTK
5ec7176e81 Fix for Fl_Native_File_Chooser::filter_value() - cont'd (#899) 2024-04-22 18:35:59 +02:00
Albrecht Schlosser
576f7bb9cc Enable 'shadow_variables' test on macOS using AppleClang
The CMake compiler ID on macOS is AppleClang rather than Clang.
This commit checks for this compiler ID as well.
2024-04-22 16:54:25 +02:00
ManoloFLTK
abfc8ee52f Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899)
- remove build option FLTK_USE_KDIALOG replaced by an Fl::option() option
- new run-time option OPTION_FNFC_USES_KDIALOG
- make options OPTION_FNFC_USES_KDIALOG and OPTION_FNFC_USES_ZENITY
false by default
- add mention of new program fltk-options in the doc of Fl::option()
- change logic of choice of the native file chooser under X11/Wayland:
the zenity and kdialog choosers are opt-in; otherwise the GTK file chooser
is used, unless opted out with  OPTION_FNFC_USES_GTK
- document that zenity may be interesting for sandboxed apps
- document that both zenity and kdialog make member functions
Fl_Native_File_Chooser::filter_value() inoperable
2024-04-22 16:34:08 +02:00
ManoloFLTK
ee37965fad Fix: Wayland use of alpha in glClearColor/glClear (#957) 2024-04-22 14:27:42 +02:00
Albrecht Schlosser
e39c96f419 Fix build of test programs using shared FLTK libs 2024-04-21 19:12:59 +02:00
Albrecht Schlosser
89b957586e CMake: add target_include_directories() for optional libs (#954)
This ensures that header files for libraries found by `pkg-config`
(pkg_check_modules) in non-system directories will be found by the
compiler during the compilation of the FLTK library.

This issue has been reported in PR #954 related to builds with Conan
where some header files are not in system locations.
2024-04-21 18:53:22 +02:00
Albrecht Schlosser
43ab34df05 CMake build summary: output libdecor location if found
Wayland only: output either the libdecor location or "Bundled".
2024-04-20 19:49:04 +02:00
ManoloFLTK
7ec6f96d9c Add "fl_" prefix to libdecor symbols when using the built-in copy of libdecor
This allows client apps to use other versions of libdecor if they wish,
just like what FLTK already does with libpng and libjpeg.
2024-04-20 13:35:53 +02:00
Albrecht Schlosser
d2bd3c6240 CMake/MSVC: Fix shared library build, add to GitHub CI build
Fault was a simple typo or copy-paste error
2024-04-20 01:44:26 +02:00
Albrecht Schlosser
7601eea772 CMake: add installation prefix to Configuration Summary 2024-04-19 20:46:32 +02:00
Albrecht Schlosser
a9d3d3e3fb CMake: fix propagation of CMake targets to user projects (#954)
Unfortunately commit 5417ea5f1f broke
simple user projects by propagating unknown CMake target names to
linker requirements of user projects.

This commit tries to fix this w/o breaking the intentions of PR #954.
2024-04-19 20:45:32 +02:00
Matthias Melcher
2eb5d175fd FLUID: Create VisualStudio compatible long strings
Better labels on FLUDI image properties dialog
Better documentation on image compression
2024-04-19 14:30:59 +02:00
ManoloFLTK
15d9a350bf Restore IMPORTED_TARGET in pkg_check_modules command for libdecor 2024-04-18 20:51:10 +02:00
ManoloFLTK
e6957fc2f5 Allow libdecor package version ≥ 0.2.0 with FLTK_USE_SYSTEM_LIBDECOR 2024-04-18 19:32:47 +02:00
Albrecht Schlosser
3fc8875756 Add missing 'x11.H' to exclusion list (STR 2728) 2024-04-18 17:33:57 +02:00
Albrecht Schlosser
bb45198413 Test public headers for shadowed variables (STR 2728)
This program is built only when using CMake and a GNU or Clang
compiler to detect shadowed variables in header files.

Developers should fix such warnings whenever they see them during the
build to avoid user reports.
2024-04-18 17:13:09 +02:00
Albrecht Schlosser
2c21e520f4 Fix potential compiler warnings in public headers [-Wshadow]
These warnings would be issued if users compiled their programs with
diagnostics '-Wshadow' turned on using gcc, clang, and maybe other
compilers.
2024-04-18 16:27:29 +02:00
Matthias Melcher
14a5187fa7 FLUID: Add cast to avoid warning #956
User Data of grid menu items was missin fl_intptr_t
2024-04-17 20:40:10 +02:00
Matthias Melcher
240d8d21df Fix dangling reference to FLUID docs. 2024-04-17 20:25:19 +02:00
Albrecht Schlosser
8ca1e0ca03 Fix 'int Fl_Menu_::value()' if item is in a submenu (STR 3241)
More precise: ... if the last picked item is in a "detached submenu",
i.e. in one addressed by another menu item with the FL_SUBMENU_POINTER
flag set.

Also: document *why* this is the case, and what the result value is.
2024-04-17 19:14:59 +02:00
Matthias Melcher
fd791a068e
Separate FLUID user documentation, screen shot automation (#936)
* CMake integration, no autotiools
* alignment panel is now correctly renamed to setting panel
* source view is now correctly renamed to code view
* Merge FLTK FLUID docs into FLUID user manual.
* Add two simple entry tutorials
* Remove FLUID chapter form FLTK docs.
* GitHub action to generate HTML and PDF docs and
  make the available as artefacts
2024-04-17 17:51:32 +02:00
Albrecht Schlosser
b4cf1a9824 Fix and improve generation of fltk-config (#954 and more)
Parts of this commit fix the usage of CMake targets in the generation
process of fltk-config modified by PR #954.

The rest improves handling of variables used to generate fltk-config,
removes obsolete comments, documents variables like GLLIBS etc. which
had to be done anyway.
2024-04-14 19:15:08 +02:00
Jordan Williams
5417ea5f1f
CMake: Use imported targets for PkgConfig packages (#954)
This carries include directories and the required link flags.
Several libraries brought in through pkg_check_modules aren't linked correctly using the _LDFLAGS variables.
Instead, they link the libraries directly with `-l`.
This is problematic because it doesn't properly pull in the actual directory of the library being linked when it is not in a system library directory.
Likewise, the necessary include directories for several of these targets aren't properly set either.
Linking against the imported targets automatically pulls in the necessary include directories.
2024-04-14 19:07:15 +02:00
Matthias Melcher
2818a36064 Add example to fl_arc docs. 2024-04-14 14:09:02 +02:00
Albrecht Schlosser
e9e5f4bdb1 Remove "MS" from "MS Windows" in docs code, and comments
The system (platform) is called "Windows", "MS Windows" doesn't make
much sense. I removed "MS" for consistency.
2024-04-13 21:49:27 +02:00
Jordan Williams
a6651e10ff
CMake: Improve detection of the GLU library and GL/glu.h header file (#953)
* CMake: Improve detection of the GLU library and GL/glu.h header file

Locate the GLU library and header independent of the GL library and header locations.
Add the GLU header location to necessary target_include_directory calls.

* CMake: Locate and use the GL include directory

Find the GL include directory and use it in target_include_directories calls.
2024-04-12 15:58:57 +02:00
Albrecht Schlosser
5de880ae81 Fix "Support for NetBSD", part 4 (#944)
Add missing return statement to replacement function for trunc().

Closes #944
2024-04-12 13:28:33 +02:00
Albrecht Schlosser
feec8f9fb1 Remove remaining references to xdbe on X11
This option has been removed in 1.4.0 because it was unreliable
and rarely used.
2024-04-11 14:15:38 +02:00
Albrecht Schlosser
05a95e146b Fix Fl_Terminal::handle_unknown_char() for plot_char() (#948)
- Add 'int Fl_Terminal::handle_unknown_char(int drow, int dcol)'
  to write the "unknown" character to the intended display position.

- Define Fl_Terminal::unknown_char as a static variable to avoid
  redundancy. In the future this might be overridden by users.
2024-04-09 12:53:12 +02:00
Albrecht Schlosser
265e5cd77b Improve CMake build configuration summary
- simplify and unify build option output
- alignment can be changed in only 2 macros in CMake/fl_summary.cmake
- output system library location of image libraries if applicable
2024-04-08 18:56:40 +02:00
ManoloFLTK
ba7b2427b6 Make Fl_GTK_Printer_Driver recognize more paper sizes
also, make clear the B* paper size names are from JIS not ISO.
2024-04-08 17:24:38 +02:00
ManoloFLTK
2662cad50b Improve Fl_GTK_Printer_Driver::begin_job() 2024-04-08 16:29:25 +02:00
ManoloFLTK
5b802be52b Add Tabloid paper size to menu_print_page_size array 2024-04-08 11:19:14 +02:00
Greg Ercolano
31170c4731 Rename putchar() to plot_char() (#944)
Some old platforms (NetBSD, AIX) implement the common stdio "putchar()"
function as a global macro which poisons the global namespace, preventing
all C and C++ programs from using "putchar()" as a function or method.

There was a long thread about this in fltk.coredev during the period
Mar 25 2024 ~ Apr 4 2024, subject "RFC: Fl_Terminal::putchar() in public API"
as to why we have no choice but to not use putchar() as a method name.
2024-04-06 23:36:04 -07:00
Albrecht Schlosser
2f1b8fc726 CMake: Fix detection of trunc() for Windows 2024-04-05 18:45:59 +02:00
ManoloFLTK
fe6ab4ebc2 Fix documentation example of the FL_FUNCTION_CALLBACK_#() macro 2024-04-05 10:57:46 +02:00
Albrecht Schlosser
9d9646fb12 Fix compiler warning, part 2 of #946 2024-04-04 23:40:29 +02:00
Albrecht Schlosser
3ac16f1dc4 Fix compiler warning, part 1 of #946 2024-04-04 22:59:08 +02:00
Greg Ercolano
06e495f262 Add NULL check to UNIX save_file() (#945) 2024-04-04 10:03:35 -07:00
Matthias Melcher
f779097c96 FLUID: fix possible null pointer. GitHub #945 2024-04-04 17:43:40 +02:00
ManoloFLTK
39c1386ba7 Improve use of fl_create_print_window() under Windows 2024-04-04 16:36:51 +02:00