Commit Graph

11734 Commits

Author SHA1 Message Date
Albrecht Schlosser
c0e07d3452 Add range check to Fl_Group::child(int)
Returns NULL if n is out of range to prevent accessing undefined
memory.
2024-10-25 02:39:47 +02:00
Albrecht Schlosser
f9f89be7d7 Improve docs about subclassing
- fix syntax errors in example code, e.g.: children_ is private
- use FLTK coding style
- improve alignment
2024-10-24 18:01:40 +02:00
Albrecht Schlosser
eb545c981b Fluid: replace 'FL_WINDOW+1' with 'FL_DOUBLE_WINDOW'
Note: 'FL_DOUBLE_WINDOW' *is* currently defined as 'FL_WINDOW+1'.
  This commit doesn't change real code but prevents potential bugs
  in the future if one of these constants would be changed.
2024-10-24 17:56:51 +02:00
Albrecht Schlosser
1fbcbee107 Mention HighDPI support in 'ANNOUNCEMENT' 2024-10-24 17:50:41 +02:00
Matthias Melcher
2228ec22d7 FLUID: Adds missing code for Grid and Flex live: #1092 2024-10-22 13:49:48 +02:00
Matthias Melcher
fb5c652200 FLUID: quick fix for live preview of Grid: #1092
- Grid Type live preview support was not implemented
- this is not a final fix, but just to avoid a crash
- additional work needed for Flex and Grid
2024-10-22 12:41:48 +02:00
Albrecht Schlosser
18e5c8232a Small typo fixes for release 2024-10-20 22:28:34 +02:00
Albrecht Schlosser
d85b67beac Fluid: update function_panel.fl from function_panel.cxx
Note: in commit a7328d940b
  "FLUID: Imporving method name `can_have_children()`"
  the file function_panel.cxx was edited w/o the corresponding
  fluid (.fl) file.

This commit fixes this, assuming the .cxx file was correct.
2024-10-20 20:03:09 +02:00
Albrecht Schlosser
32ac2ce0ac Update ANNOUNCEMENT and CHANGES files for release 1.4.0 2024-10-20 19:40:02 +02:00
Albrecht Schlosser
d163ab1357 Make remaining 'XPM' images 'const' 2024-10-20 17:00:16 +02:00
Albrecht Schlosser
74d827f71f Remove FL_MENU_RESERVED bit mask in favor of better documentation
This bit mask was added in commit 53b40f4138 in an attempt
to *document* reserved bits but it turned out that this mask could
have negative side effects on some newer compilers by propagating
the enum to an 'unsigned int' and issuing compiler warnings.

See this comment and follow-up's in fltk.general:
https://groups.google.com/g/fltkgeneral/c/7xrDkbkxiyw/m/rzEIJ7XhAgAJ
2024-10-19 15:58:51 +02:00
Matthias Melcher
737137cf78 Fixes Fl_Text_Display line number calculation. (#1088) 2024-10-19 15:53:29 +02:00
ManoloFLTK
6ea450407b Windows: process the +-containing key used with Ctrl in cross-platform way 2024-10-19 09:14:45 +02:00
Albrecht Schlosser
04c8dd9d26 Add forgotten FL_OVERRIDE attribute 2024-10-18 19:18:23 +02:00
Albrecht Schlosser
975cd3b4fd Remove unnecessary casts from glut demo programs
These casts are no longer useful since commit 5cd9f6fb80:
"STR #3323: glutAddMenuEntry now has a const label argument"
2024-10-18 17:01:34 +02:00
Albrecht Schlosser
89309ebbf2 Add missing *public* methods of Fl_Single_Window
- void make_current()
- void flush()
2024-10-18 16:30:23 +02:00
Albrecht Schlosser
1a4ec05b2b Update GitHub workflow: actions/checkout
update from 'actions/checkout@v2' to 'actions/checkout@v4'
2024-10-18 14:39:28 +02:00
Albrecht Schlosser
b2c6910997 Update README files
README.md:
 - add "Build FLUID User Handbook" badge
 - fix wording, add links

README.txt:
 - fix wording and copyright year
2024-10-18 14:39:28 +02:00
Albrecht Schlosser
cb6ee39852 Update documentation
- fix missing doxygen version in PDF docs created by CMake
- remove unnecessary quotes ('...') from version numbers and
  Git revisions (previously added for debugging purposes)
- fix navigation links at the bottom of tutorial pages (HTML only)
- remove 'D. Gibson' from documentation headers on his request
2024-10-17 16:01:32 +02:00
Matthias Melcher
acf3037ae8 FLUID: make sure that dialogs are visible for snapshots 2024-10-17 14:32:42 +02:00
Matthias Melcher
c454930966 FLUID: Fixes uninitialized class member 2024-10-17 14:17:44 +02:00
ManoloFLTK
f269367d41 Clarify the documentation of class Fl_Callback_User_Data 2024-10-17 14:10:38 +02:00
Matthias Melcher
37fbc63f5c Two additions to CHANGES.txt 2024-10-16 18:44:38 +02:00
Albrecht Schlosser
a6a0a65edf Update or remove version numbers, update copyright years
Note: one goal is to have to edit fewer version numbers in source
files for each release.

We may be able to generate some files by the build procedure (CMake)
to avoid editing them in the future (1.5.0 or later).
2024-10-15 20:42:26 +02:00
Albrecht Schlosser
ad422791f0 Update dependencies 2024-10-15 19:52:16 +02:00
Albrecht Schlosser
d589c05b17 Fix documentation typos and trailing whitespace 2024-10-15 18:59:28 +02:00
ManoloFLTK
957fa1fe37 Improve method to draw boxes of type FL_BORDER_BOX and FL_SHADOW_BOX (#1089)
These types of boxes frame a background with a rectangular frame of another color.
The previous procedure to draw them was not robust to GUI rescaling creating cases
where space between the border and the background was not drawn.
The new drawing procedure for these boxes first paints the whole area (frame included)
with the background color and next draws the frame over the just painted rectangle.
No uncolored space is possible.
It was also necessary to very slightly modify Fl_Scalable_Graphics_Driver::rect()
used by the Windows and X11 (no Cairo) backends to make sure fl_rect(x,y,w,h)
exactly frames fl_rectf(x,y,w,h) without drawing outside the filled area.
2024-10-15 18:02:48 +02:00
Albrecht Schlosser
a5f28b3984 Fix compiler warning [-Wstringop-overflow=] 2024-10-12 15:27:25 +02:00
ManoloFLTK
013e939c93 Make Pango-handled text accept legacy CP1252-encoded text - continued 2024-10-10 18:18:52 +02:00
Matthias Melcher
f87d7a71c0 Missing *not* in Fl_Preferences docs. 2024-10-10 15:12:04 +02:00
Matthias Melcher
a0f1d5bc5e Fl_Preferences documentation update. 2024-10-10 11:46:31 +02:00
Albrecht Schlosser
81d3ccefa4 CMake: ignore FLTK_MSVC_RUNTIME_DLL on other platforms
This commit suppresses a CMake warning if FLTK_MSVC_RUNTIME_DLL is
defined on the CMake commandline on platforms that don't use it.
2024-10-09 16:04:38 +02:00
ManoloFLTK
99c36b44ac Restore building without Cairo developer files (#1087) 2024-10-08 23:52:03 +02:00
Albrecht Schlosser
475bfa9230 Define missing macro on Windows/MinGW platform
... as reported today by Ian on fltk.general in thread
"Mingw-32 compile issue with new 4/5 mousebutton hooks (fltk-1.4)"
2024-10-07 18:14:19 +02:00
Albrecht Schlosser
9dd8bf4b60 Document Fl_Flex and Fl_Grid in the list of group widgets 2024-10-07 17:15:20 +02:00
ManoloFLTK
6e5f3f7ecb Make Pango-handled text accept legacy CP1252-encoded text 2024-10-07 16:20:59 +02:00
Albrecht Schlosser
05d78e8ebd Improve documentation on mouse and keyboard events 2024-10-07 16:13:11 +02:00
Albrecht Schlosser
0b4bea1eea Fix shortcut FL_CTRL+'=' on Windows (#1086)
Strictly spoken, commit 3fbd4f944f introduced a regression on Windows.

The additional table entry VK_OEM_PLUS overrode the old behavior
because the value of VK_OEM_PLUS is 0xbb (see comment in code).
2024-10-07 14:33:44 +02:00
Albrecht Schlosser
16d59008c2 Add option to test scaling shortcuts in test/menubar
Note: if enabled, then the usual global scaling shortcuts don't work
  and scaling by shortcuts is disabled.

This is intended for testing and not for normal usage.
2024-10-07 14:27:01 +02:00
Matthias Melcher
18bda5315d Update Widget order in test/keyboard. 2024-10-07 11:59:49 +02:00
dannye
5c6ec56b33
Submenus with no callback enter their submenu instead of closing the whole menu (#1043)
Thanks for those nice changes.
2024-10-06 19:19:54 +02:00
Matthias Melcher
6e3b64425e Add fwd and back mouse buttons to test/keyboard 2024-10-06 18:53:03 +02:00
Albrecht Schlosser
4f4a9be15b Support mouse buttons 4 + 5 (aka "side buttons") (#1076, #1068)
This work is based on PR 1068 (patch by @CendioHalim) and
extended to store button status (4,5) in Fl::event_state() like
it's done for other mouse buttons (1-3).

Changes:
- new symbol: FL_BUTTON4 = side button 1 = "back"
- new symbol: FL_BUTTON5 = side button 2 = "forward"
- modified  : FL_BUTTONS now includes bits for two side buttons

Note: the status of these new buttons is not maintained by X11,
  therefore we need to maintain them in internal variables for
  this platform.
2024-10-06 18:53:03 +02:00
Albrecht Schlosser
3fbd4f944f Apply scaling-shortcut-kludge.patch for Windows
... as proposed by Manolo in a private mail.

This patch allows to detect "ctrl+'-' on keyboards with digits in
uppercase positions (e.g. French)" but this is only preliminary for
FLTK 1.4.0.

Windows keyboard handling should be revised in FLTK 1.5.0 or higher.
2024-10-06 18:44:31 +02:00
Matthias Melcher
0594d9a1a0 Update FLUID .fl files in the test/. 2024-10-06 17:53:57 +02:00
Albrecht Schlosser
133d8fb96d Update comment, sorry for the noise 2024-10-06 17:44:20 +02:00
Albrecht Schlosser
cd0f5aec24 Add comments regarding X11 keyboard layout handling
This commit doesn't change the code flow although the code has been
slightly refactored.
2024-10-06 17:42:22 +02:00
Matthias Melcher
9eb5f11c39 FLUID: Fixes file reading bug, introduces two weeks ago: #1078 2024-10-06 17:33:13 +02:00
Andrew Fuller
3431c9d21a
Fl_Text_Display: Fix text selection off-by-one bug (#1080)
This seems to have been left over from when mouse text selection would start a text selection on the left side of the character and always extend the selection to include the character under the cursor.

We now perform text selection based on whether the selection spans across the horizontal center of a character and so this next_char() causes the endpoint of the selection to be incorrectly shifted to the right.
2024-10-06 16:18:37 +02:00
ManoloFLTK
9d194ac960 Add necessary dirty indicator 2024-10-04 17:39:36 +02:00