Commit Graph

12308 Commits

Author SHA1 Message Date
ManoloFLTK
fbc3f7a69f Improve documentation of member variable Fl_SVG_Image::proportional (#1361) 2026-01-15 19:12:56 +01:00
ManoloFLTK
81c965f8e2 Partial fix for the Windows platform of the emoji issue (#1360)
This fixes input of emojis to Fl_Input and Fl_Text_editor widgets under Windows with the emoji palette.
Most emojis have a Unicode point > 0xFFFF and therefore are encoded as a surrogate pair
by Windows which uses UTF-16. Thus, Windows sends 2 consecutive WM_CHAR messages to the
window and gives one member of the pair each time. After the second WM_CHAR message arrived
FLTK is able to enter the emoji in its text. Windows may also send "variation selectors" and
zero-width Unicode points when dealing with emojis. FLTK just skips them.
Windows also translates some Unicode emojis into 1 emoji + 1 other Unicode point: for example
"woman pilot" produces "pilot emoji" + "woman" unicode point. FLTK now handles
this gracefuly.

This fix also prefixes the windows class names with "FLTK-" under Windows to prevent
collisions with Windows-reserved class names. That fix is necessary for the emoji palette
to be usable in some scenarios. That fix is still under debate and may evolve in latter commits.
2026-01-14 16:16:25 +01:00
Albrecht Schlosser
d38b699432 util/cmap: link against libm only if it was found 2026-01-13 17:02:51 +01:00
Albrecht Schlosser
afacd1b8fe Fix documentation (comment only) 2026-01-13 16:50:24 +01:00
ManoloFLTK
1c1b6c12f4 Restore emojis support under recent macOS versions - cont'd (#1360)
Detect Ctrl+Command+Space to open character palette only if not used before as shortcut.
2026-01-12 17:03:19 +01:00
ManoloFLTK
306de09987 Restore emojis support under recent macOS versions - cont'd (#1360)
This makes FLTK open the character palette when typing Ctrl+Command+Space or Function+e
2026-01-12 16:34:30 +01:00
ManoloFLTK
69669256d4 Restore emojis support under recent macOS versions (#1360) 2026-01-12 11:21:48 +01:00
ManoloFLTK
afbdbb25b9 Function Fl::Private::cairo_make_current(void *gc) is not used anywhere in FLTK 2026-01-12 09:42:39 +01:00
ManoloFLTK
4cc0c8f44a Update wayland documentation about function wayland_socket_callback(). 2026-01-11 21:03:23 +01:00
ManoloFLTK
9a5688f000 Fix "Drawing to the wrong window with cairo and X11" (#1358) 2026-01-11 19:11:28 +01:00
ManoloFLTK
7c3b1f00f5 Don't pretend Wayland supports Fl::add_system_handler(). 2026-01-11 19:03:31 +01:00
ManoloFLTK
7b6a779fd3 Fix "Wayland: NULL pointer dereference in Fl::cairo_make_current()" (#1359) 2026-01-11 12:09:41 +01:00
ManoloFLTK
e59a5dc804 Windows: improve moving window across screens with distinct scale factors - cont'd 2026-01-10 12:36:23 +01:00
ManoloFLTK
fc3e6a1c53 Windows: improve moving window across screens with distinct scale factors - cont'd 2026-01-10 12:05:01 +01:00
ManoloFLTK
8914914735 Remove un-necessary code from Fl_Wayland_Window_Driver::resize() function 2026-01-09 11:19:45 +01:00
Albrecht Schlosser
4908dfd72a Add CMake option FLTK_OPTION_PEN_SUPPORT (default: ON)
This option can be used to disable pen/tablet support if there are
build problems on a particular platform or build system (e.g. MinGW)
so users can continue to build FLTK 1.5.

Users can also choose to disable pen support if they don't need it.
2026-01-08 21:22:03 +01:00
Albrecht Schlosser
7fae181d95 Documentation: replace HTML table with Doxygen table
... for better readability in the source code.

Note: the documentation output is identical.
2026-01-08 19:05:16 +01:00
ManoloFLTK
bc05edd385 Wayland: use the "Cursor shape" protocol - Cont'd 2026-01-08 10:51:56 +01:00
ManoloFLTK
145d05c365 Documentation: add "Cursor shape" to table of used Wayland interfaces 2026-01-08 10:37:01 +01:00
Matthias Melcher
dc07fcdb6e Fix callback forwarding in Fl_Input_Choice.
Widget would always call CHANGED but never
RELEASE events, no matter how the when()
flags were set.
2026-01-07 13:18:29 +01:00
Matthias Melcher
52452f117f Remove event names that would be generated by fl_eventname_str 2026-01-07 11:34:29 +01:00
Matthias Melcher
71cee83f77 Fluid: Formatting changes. 2026-01-05 22:58:40 +01:00
Matthias Melcher
89aa5726f8 Fluid: Improve std::string output
Fluid: Update Widget_Node to std::string

Fluid: Image names to std::string

Fluid: std::string tooltip

Fluid: stringify Widget_Node::subtype

Fluid:: extra_code
2026-01-05 21:06:04 +01:00
ManoloFLTK
5f10939cfa Restore building with CMake option FLTK_BUILD_FLUID=0 2026-01-05 17:55:27 +01:00
ManoloFLTK
6c670e12c3 Document new use of the "Cursor shape" protocol for the Wayland platform. 2026-01-05 15:48:47 +01:00
ManoloFLTK
522728de8c Wayland: use modern approach to cursor shapes with the "Cursor shape" protocol.
This removes the need to guess names of files each theme gives to cursor shapes
and makes linking with dbus superfluous when the compositor supports
the new protocol.
The old, surface-based approach to cursor shapes remains used for custom shapes.
2026-01-05 15:05:25 +01:00
Matthias Melcher
11325da073 Fluid: Modernize Function Nodes 2026-01-05 11:52:34 +01:00
Matthias Melcher
48617a8075 Fluid: Modernize use of strings.
Testing MergeBack at the same time.
2026-01-05 00:36:28 +01:00
Matthias Melcher
296f2fc5da Fix missing return in mergeback 2026-01-04 22:35:20 +01:00
Matthias Melcher
8d714acf33 Fix a possible popup menu crash event. 2026-01-04 22:17:06 +01:00
Matthias Melcher
452ed8d86d Improve mergeback timing.
Avoid recursion in event handling by
deferred calling mergeback.
2026-01-04 21:49:52 +01:00
Matthias Melcher
7306b66d99 Fluid: Add automated MergeBack 2026-01-04 20:43:34 +01:00
Albrecht Schlosser
811a188bbf Add FLTK_BUILD_SCREENSHOTS option info to CMake build summary
+ build screenshot programs if option FLTK_BUILD_SCREENSHOTS=ON:
  don't `EXCLUDE_FROM_ALL` because the option must be set anyway.
2026-01-04 19:34:14 +01:00
Albrecht Schlosser
68d2c48514 Add an option and the first program to create screenshots
This is the first step in creating additional programs for saving
screenshots for documentation purposes. These screenshots must be
saved in the documentation/images directory and checked into the
Git repository.

These programs allow developers to create new screenshots or change
existing ones. More screenshots may be created by programs in the
/test/ folder.

To-do: add more *new* screenshot programs, and if useful, move some
  existing programs from the `/test/` folder to `/screenshots/`,
  such as `test/resize-example*.cxx` and maybe more.
2026-01-04 19:16:53 +01:00
ManoloFLTK
46e6815612 Windows: improve moving window across screens having distinct scale factors. 2026-01-04 16:45:11 +01:00
Matthias Melcher
0e570fb672 Add C++11 Fl_Valuator::format API.
This is helpful for writing language wrapper, in
this particular case for PyFLTK.
2026-01-04 15:50:56 +01:00
ManoloFLTK
357336bd40 Fix "Wayland's wl_display_dispatch() can block a Vulkan application" (#1354)
This rewriting of the FLTK callback function that runs when there are data available
for reading in the socket connecting the app and the Wayland compositor is meant to
facilitate the integration of Vulkan.
This rewriting reproduces the recommended code to read from the socket
documented in Wayland function wl_display_prepare_read_queue() when several threads
potentially read from the socket.
2026-01-04 09:38:16 +01:00
Albrecht Schlosser
62c2497ff5 Speed up PDF generation and add timing debug output
... to the Doxygen generation log file `documentation/pdfall.log`.

The additions to the log file are intended to find out which parts
take how much time.

Note: use `grep "make_pdf" documentation/pdfall.log` to see the
  log output with timestamps.

- documentation/Doxyfile.in: exclude undocumented source files in
  src/xutf8/* which reduces parsing by a small amount of time,
  estimated about 5 percent of build time. YMMV.
2026-01-03 16:35:53 +01:00
Albrecht Schlosser
869df69ff2 Update FLTK colormap (src/fl_cmap.h) w/o changing colors
- update comments, including filenames
- update build instructions for developers in util/cmap.cxx
- update CMakeLists.txt (comments only)
2026-01-03 16:28:02 +01:00
Albrecht Schlosser
775239c2fc Fix compilation error on Windows (MinGW)
error: ‘fabs’ was not declared in this scope
2026-01-03 13:55:12 +01:00
Albrecht Schlosser
4a9a417860 Clarify that a font must be loaded before measuring text (#1356)
Documentation only: users must load a font with fl_font(face, size)
before measuring text with methods like fl_measure(), fl_height(),
fl_width(), fl_text_extents() etc.
2026-01-03 13:54:44 +01:00
Albrecht Schlosser
c17c2e3808 Clean up .gitignore files
Since FLTK 1.5 building FLTK in the source tree is prohibited by our
CMake setup. Therefore all build artifacts are stored in the build
tree and don't need to be "ignored" in the source tree.
This simplifies the .gitignore files significantly.

There are some exceptions though, for instance .cxx and .h files
generated by fluid which might be created by a user/developer
executing fluid in the source tree.
2025-12-30 18:41:33 +01:00
Albrecht Schlosser
30a3054202 Update GitLab CI build for screenshot generation
Use Xvfb to create an X11 display (server).

Thanks to Matthias: copied from GitHub CI build
2025-12-30 17:41:51 +01:00
Albrecht Schlosser
d5ed136642 Reorganize documentation source directories
- move all images (screenshots) to new folder documentation/images/
- move documentation/src/fltk-title.tex.in to documentation/
- fix .gitignore files (remove obsolete entries etc.)
- FL/Fl_Tooltip.H: fix '\image latex' reference
- documentation/CMakeLists.txt: update ref. to fltk-title.tex.in
- documentation/Doxyfile.in: adjust image path (IMAGE_PATH)
2025-12-30 15:49:02 +01:00
ManoloFLTK
eb8047ddc5 Add that FLTK 1.3 supports also Windows 11 2025-12-30 07:53:08 +01:00
Albrecht Schlosser
a057e13fb4 Improve code snapshot generation for PDF docs (#1353)
CMake: execute `code_snapshot` separately for each file we want to
  scan so we can create timestamps and generate PNG images only if
  the source file (e.g. unicode.dox) was modified.

documentation/src/unicode.dox: remove output folder `generated`, use
  only the filename. CMake sets the current working directory as needed.

util/code_snapshot.cxx: format and improve comments, reset code buffer
  so we can generate multiple images per input file.
2025-12-29 20:02:06 +01:00
Matthias Melcher
83fab8cb0f Fix Fl_Pack to support more box types.
Old code supported only frame styles, this code
can now handle box types with a background.
2025-12-29 16:21:17 +01:00
Matthias Melcher
2fb67053a1 Fixes Code Viewer widget height calculation 2025-12-28 23:15:30 +01:00
Matthias Melcher
17eaeeda92 Update filename case and LaTeX details 2025-12-28 22:18:07 +01:00
Matthias Melcher
f5e7d62f90 Generate code block documentation using FLTK (#1353)
The Doxygen-to-pdf toolchain can not easily generate
pdf's with Japanese and Chinese characters. This patch
generates code blocks by rendering them in FLTK.
2025-12-28 21:37:30 +01:00