Commit Graph

2653 Commits

Author SHA1 Message Date
Albrecht Schlosser
82399ebe4b 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:58:56 +01:00
Albrecht Schlosser
9b9426bf6e Make Fl_Table::get_selection() 'const' (#1305) 2025-09-05 17:28:59 +02:00
Matthias Melcher
fafdd5df05 Backport d3dca07
#146: Add access to scrollbars widget in Fl_Help_View

- new methods are Fl_Help_View::scrollbar()
and  Fl_Help_View::hscrollbar(), taking inspiration from
Fl_Browser.
2025-07-16 12:45:10 +02:00
Albrecht Schlosser
71d1b7c472 Fix doxygen warnings and improve documentation
1. src/Fl_add_idle.cxx: add missing parameter docs,
   backport documentation of several functions from 1.5

2. FL/fl_draw.H: rename 1st parameter of fl_draw_pixmap(...) from
   'data' to 'cdata'.

Backported from 3114ef0e2f
2025-07-15 19:19:00 +02:00
Albrecht Schlosser
3e436588e5 Update version numbers for release 1.4.4, update README.txt
- change version numbers to 1.4.4
- update README.txt
- fix trailing whitespace
- update dependencies

Todo: update CHANGES.txt before release.
2025-07-15 16:57:44 +02:00
Albrecht Schlosser
c8bab97d6a Fl_Window::free_position() must not be deprecated
This method was erroneously declared 'deprecated' in previous versions.

However, this method is public and calls the *protected* method
Fl_Window::force_position(). Therefore it is kept as a regular
public method.

Backported from master: 0960f1c066
2025-05-14 19:08:42 +02:00
Greg Ercolano
469249f91a Fl_Terminal doc fixes, private->protected for utf8_char_at_*() 2025-05-09 09:43:10 -07:00
Albrecht Schlosser
b21b7feaaa Fix Doxygen warning for older Doxygen versions
Note: doxygen versions < 1.9.6 are not recommended for PDF docs
      but *may* work for HTML documentation.

Backported from master: 719642b5d6
2025-04-29 20:17:43 +02:00
Albrecht Schlosser
8d940f3581 Put fix for issue #1214 (Windows "solid lines") under ABI guards
Original issue title:
  "Windows: dotted lines may be drawn solid when GUI is rescaled"

Unfortunately commit 880636eb12 broke
  the ABI because it added a variable to a public header. This commit
  uses ABI guards '#if FL_ABI_VERSION >= 10403" for the same fix.

Note: The full fix w/o ABI guards is already available in FLTK 1.5.
2025-04-26 17:55:43 +02:00
Albrecht Schlosser
709fdef10f Update version numbers to 1.4.3 2025-04-18 20:13:13 +02:00
Albrecht Schlosser
6336959306 Allow FL_ABI_VERSION = FL_API_VERSION + 1
so users can enable ABI features designated for the *next* release
when using FLTK from Git (or snapshots) before the API version has
been raised for the next release.
2025-03-29 20:57:53 +01:00
Greg Ercolano
26d183ca77 Changed two connector methods to virtual
For reference, see fltk.general thread started Mar 26 2025, entitled:
    "Make some Fl_Tree_Item methods virtual?"

Backported Greg's commit from master (1.5.0) by Albrecht-S,
    added ABI guards for FLTK 1.4.3
2025-03-29 20:21:08 +01:00
ManoloFLTK
880636eb12 Fix "Windows: dotted lines may be drawn solid when GUI is rescaled" (#1214) 2025-03-04 16:04:10 +01:00
Albrecht Schlosser
02af6a57eb Bump version numbers to 1.4.2 2025-02-21 16:25:39 +01:00
Albrecht Schlosser
18ea5bcb20 Improve documentation of Fl_Box constructors (#1194)
Separate both constructor types and document parameters.
2025-01-29 14:33:07 +01:00
Albrecht Schlosser
a6f51105d0 Improve and reorder Fl_Tabs documentation
Note: this also removes the (not working) suggestion to add an invisible
box to an Fl_Scroll-type child of Fl_Tabs.
2025-01-16 15:42:45 +01:00
Albrecht Schlosser
d5461c55a7 Document issues with Fl_Scroll as children of Fl_Tabs (#1175)
Unfortunately this *appears* to be a new constraint caused by the great
new features of Fl_Tabs like overflow handling etc. and fixing drawing
issues in the tab area (since FLTK 1.4).

However, this conflict has already been there in 1.3 but didn't cause
visual artifacts in normal use.
2025-01-15 16:11:15 +01:00
Albrecht Schlosser
546a3168f6 Fix typos in documentation of Fl_Tabs 2025-01-15 16:05:01 +01:00
Albrecht Schlosser
a48ebc5db0 Fix return value of Fl_Table_Row::row_selected(int) (PR #1187)
As discussed in the context of PR #1187 the previous return value '-1'
was misleading and undocumented. The docs mentioned only '1' and '0'.

User code that used the return value as documented (like a `bool`)
would make the wrong decision if the return value was '-1': true
(selected) instead false (out of range).

This commit fixes the code by doing what the docs define and clarifies
the documentation.

Further documentation improvements of Fl_Table (example code used a
method that is not defined in Fl_Table) and of Fl_Table_Row are
included as well.

Doxygen docs of two methods of Fl_Table_Row moved to the .cxx file
where they belong according to the CMP.
2025-01-14 15:21:42 +01:00
Matthias Melcher
ca786597f7 Add Fl_Valuator destructor.
This is required by Swig to generate code for wrapping
FLTK for Python and potentially other languages. It has
no impact on the API or ABI.
2025-01-03 14:40:59 -06:00
ManoloFLTK
6c7b005a95 Remove duplication and typo in documentation of Fl::copy() 2025-01-02 15:47:35 +01:00
Albrecht Schlosser
0e6b20d957 Put ABI breaking changes under ABI guards (#1139)
This reverts the improvement of #1139 in the default build which is
now only available with FL_ABI_VERSION=10401 or higher.

Users that need this improvement need to build with the required
ABI version by setting it with configure or CMake.
2024-12-12 16:40:11 +01:00
Albrecht Schlosser
fe8177ea2c Update Fluid (.fl) files for release 1.4.1 2024-12-09 20:46:01 +01:00
Albrecht Schlosser
99a6286288 Bump version numbers for release 1.4.1
To do: update CHANGES.txt with real info.
2024-12-09 20:46:01 +01:00
Matthias Melcher
d1ba7fbf50 Giving access to some Fl_Text_Display member variables (#1153)
And typos in FLUID source code docs.
2024-12-07 17:31:14 +01:00
ManoloFLTK
be6966bda6 Add missing FL_EXPORT qualifier 2024-11-27 08:38:37 +01:00
ManoloFLTK
3633b342fd Restore pixmap drawing under X11-noCairo broken by 0952d59 2024-11-27 08:23:35 +01:00
Albrecht Schlosser
403981a293 Fix compiler warning (g++ 14) [-Wstringop-overflow]
New compiler warning detected by g++ 14.2.0 building with CMake
  in Release mode. This *temporary* fix suppresses the warning but uses
  even larger fixed size buffers.

Todo: these nasty warnings caused by using fixed buffer sizes should
  be removed by using std::string in FLTK 1.5.0.
2024-11-24 19:53:23 +01:00
Albrecht Schlosser
801125b9a4 Increase clipping stack size (#1139) 2024-11-23 16:01:59 +01:00
ManoloFLTK
1f05a0df44 Fix fl_draw_image sometimes crashes when window is scaled - cont'd (#1134) 2024-11-20 08:01:40 +01:00
ManoloFLTK
c6d480352b Add 2 other missing FL_EXPORT qualifiers 2024-11-19 15:47:23 +01:00
ManoloFLTK
e6d18cf713 Add 2 missing FL_EXPORT qualifiers 2024-11-19 15:37:05 +01:00
ManoloFLTK
619677b75c Fix fl_draw_image sometimes crashes when window is scaled (#1134) 2024-11-19 15:26:47 +01:00
ManoloFLTK
2337214e4e Fix for Windows and X11: Rounding issues with Fl_RGB_Image::draw() (#1120) 2024-11-12 10:56:19 +01:00
ManoloFLTK
37144c06a1 Undo 6f6a375 that does not properly support macOS SDK 15.x (#1103) 2024-11-04 04:50:31 +01:00
ManoloFLTK
6f6a375fca Recent macOS SDKs badly define MAC_OS_X_VERSION_MAX_ALLOWED
and the correct information is in __MAC_OS_X_VERSION_MAX_ALLOWED
2024-11-03 14:27:28 +01:00
Albrecht Schlosser
abf28f0b70 Improve and clarify documentation 2024-11-01 18:24:06 +01:00
ManoloFLTK
818e2b77d1 Wayland: Fix issue in maximization of a borderless window (#1099)
Also fixes scenarios mixing fullscreen and maximization:
- maximize
- set fullscreen
- unset fullscreen
- un-maximize
with and without window border.
2024-11-01 15:43:18 +01:00
Albrecht Schlosser
56cf5684dc Make Fl_Window::flush() public for consistency with subclasses
... as discussed on fltk.general recently

Note: this method was already public in all subclasses of Fl_Window.
2024-10-30 14:30:08 +01:00
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
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
Albrecht Schlosser
04c8dd9d26 Add forgotten FL_OVERRIDE attribute 2024-10-18 19:18:23 +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
ManoloFLTK
f269367d41 Clarify the documentation of class Fl_Callback_User_Data 2024-10-17 14:10:38 +02:00
Albrecht Schlosser
d589c05b17 Fix documentation typos and trailing whitespace 2024-10-15 18:59:28 +02:00
Matthias Melcher
a0f1d5bc5e Fl_Preferences documentation update. 2024-10-10 11:46:31 +02:00
Albrecht Schlosser
05d78e8ebd Improve documentation on mouse and keyboard events 2024-10-07 16:13:11 +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
ManoloFLTK
b95a7eccd9 Fix Doxygen problems with fl_draw() functions. 2024-08-28 10:05:17 +02:00