Commit Graph

2701 Commits

Author SHA1 Message Date
Albrecht Schlosser
054fc9c823 Declare some methods of Fl_Window 'const'
These Fl_Window methods are 'const' but had not been declared 'const':

- uchar get_size_range(...) const
- int shown() const
- const Fl_Image *shape() const
- int screen_num() const
- fl_uintptr_t os_id() const
2025-11-10 16:23:04 +01:00
ManoloFLTK
733511af41 Remove warnings when building Doxygen documentation.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-11-09 14:37:07 +01:00
Matthias Melcher
4966cc7a1e Add rule of five for Fl_Widget_Tracker.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
Widget tracking is linking back to a instance of
Fl_Widget_Tracker. Copying or moving one will
potentially crash an app, so disable it.
2025-11-06 15:31:46 +01:00
Matthias Melcher
ccbb424046 Add option to uniform line drawing in scaled mode (#167) 2025-11-01 14:33:06 +01:00
Matthias Melcher
d14bd1bfec Fix comment alignment.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-11-01 02:13:23 +01:00
MatthiasWM
1ba957eb60 Fix MSVC Level 4 warnings (#1126) 2025-10-31 19:15:38 +01:00
Matthias Melcher
7500b3c540 Add information on Fl_Widget::type_.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-10-29 11:51:06 +01:00
Albrecht Schlosser
1182cd66ec Make Fl_Table::get_selection() 'const' (#1305)
See also branch-1.4 with FLTK_ABI_VERSION >= 10405:
  commit 9b9426bf6e
2025-09-05 17:38:05 +02:00
Albrecht Schlosser
53f103f2ca Fix typo in documentation
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-08-22 20:38:59 +02:00
ManoloFLTK
5becf68c18 Fix "Callback or event on minimize of the main window " for Wayland (#1288)
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-08-04 15:54:14 +02:00
ManoloFLTK
8463ac39ca Add detail to the documentation of the FL_HIDE event.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-08-03 10:01:24 +02:00
ManoloFLTK
dfe73d8ebc Document that the Wayland platform doesn't send FL_HIDE to minimized windows. 2025-08-03 09:47:58 +02:00
ManoloFLTK
86f2904858 Remove warnings triggered by -Wredundant-decls (#1277) 2025-07-16 15:13:14 +02:00
ManoloFLTK
e444371b18 Fix: Redundant redeclaration of Fl_Shortcut fl_old_shortcut(const char*) (#1277)
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-07-15 07:21:44 +02:00
Albrecht Schlosser
3cf5a302fd Replace 'FL_OVERRIDE' with 'override' in public headers
... except FL/fl_attr.h where FL_OVERRIDE is #define'd
2025-07-08 15:25:14 +02:00
Matthias Melcher
d3dca07339 #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-08 14:36:24 +02:00
Matthias Melcher
5c33d3051f Fl_Help_View: Subclassing minor comment chages 2025-07-07 15:47:00 +02:00
Albrecht Schlosser
bdde3e5d2b Fl_Table_Row: replace private class CharVector with std::vector
FL/Fl_Table_Row.H: use `std::vector<uint8_t> _rowselect;`,
  remove declaration of class `CharVector`

src/Fl_Table_Row.cxx: remove implementation of class `CharVector`,
  simplify loops (use range based for loops),
  use resize() to change vector size.

Unify copyright year of Fl_Table* headers and implementation.
2025-07-07 14:55:55 +02:00
Albrecht Schlosser
51cca24d04 Add missing and remove unnecessary #include statements
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
Note: if user code requires a header, then user code must #include it.
2025-07-07 11:58:49 +02:00
Matthias Melcher
2a1677802f Fl_Help_View: Restoring bad includes for back compatibility
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-07-05 20:39:55 +02:00
Matthias Melcher
e12c42a0cd Fl_Help_View: Revert some changes 2025-07-05 19:47:03 +02:00
Matthias Melcher
ccc294f9f7 Fl_Help_View: Thin out header file
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
- remove unnecessary include.
2025-07-05 17:48:30 +02:00
Matthias Melcher
5fb38897b7 Fl_Help_View: Refactor to use PIMPL
- using a Pointer to Implementation instead of having
a huge Fl_Help_View class. This improves build speed
(smaller header fiel) and allows us to fix the
implementation while keeping the ABI unchanged.
2025-07-05 17:35:41 +02:00
Matthias Melcher
b28afecb46 Fl_Help_View: C++ formatting fix. 2025-07-05 15:29:42 +02:00
Matthias Melcher
5d9961c1c3 Fl_Help_View: Finl formatting and documentation
- restructure header file
- sort source file reflecting header
- documentation of text selection
2025-07-05 15:25:11 +02:00
Matthias Melcher
d3c6135c08 Fl_Help_View: Improve selection
- users can now select text in multiple Help Views
- users can now select text that is also a link
- selections draws dimmed if not focused
2025-07-05 13:42:28 +02:00
Matthias Melcher
53665045d3 Fl_Help_View: Changes some more formatting
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
- streamlines callbacks
- removes unused function
- header file not finished yet!
2025-07-04 16:31:59 +02:00
Matthias Melcher
4e1450d750 Fl_Help_View: Refactoring static sizes
- replaced Fl_Int_Vector with std::vector<int>
- removed static buffers in path arrangement methods
- NULL to nullptr
2025-07-03 19:58:56 +02:00
Matthias Melcher
f0fa9fc8f8 Fl_Help_View: Improve formatting and Doxygen comments
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-07-03 13:55:29 +02:00
Matthias Melcher
872e2b8fb6 Fl_Help_View: Refactor more strings and dynamic lists.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
2025-07-03 00:39:53 +02:00
Matthias Melcher
5919dbb6af Fl_Help_View: Reformat and comments 2025-07-02 22:59:46 +02:00
Matthias Melcher
69431ef51f Fl_Help_View: Refactor Fl_Help_Link to C++11 2025-07-02 20:45:54 +02:00
Matthias Melcher
e4d43a3951 Help_View: Improve target line management 2025-07-02 17:54:43 +02:00
Albrecht Schlosser
a05ae33e20 Remove deprecated methods and functions
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
In FLTK 1.5 we remove most (but not all) methods and functions that
were deprecated in FLTK 1.3 or earlier.
2025-07-02 17:19:52 +02:00
Matthias Melcher
5bf1333f07 Set Fl_Menu_Item::setonly() to deprecated
for the version without the starting argument.
2025-07-02 15:42:46 +02:00
Albrecht Schlosser
a34711daeb Remove FLTK 1.4 ABI guards 2025-07-01 11:04:52 +02:00
Matthias Melcher
42b2388610 Improve bilinear image scaling below 50%
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
The original code can not scale well below 50%. To improve
filtering in a fast way, huge images are scaled by powers of
two before fine scaling using the original bilinear scale.
2025-06-30 14:56:26 +02:00
Matthias Melcher
eadea6a992 Update Fl::await() and friends API and documentation
This creates the base for #1263, but does not fix it yet.
2025-06-19 15:33:38 +02:00
Albrecht Schlosser
7897bbc04f Fix several compiler warnings [-Wextra-semi]
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
Example:
  warning: extra ‘;’ after in-class function definition [-Wextra-semi]

Also: replace 'FL_OVERRIDE' with 'override' in all modified files
2025-06-05 09:50:07 +02:00
Albrecht Schlosser
0960f1c066 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.
2025-05-14 19:05:04 +02:00
Albrecht Schlosser
3114ef0e2f Fix doxygen warnings
1. src/Fl_add_idle.cxx: add missing parameter docs

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

The 2nd warning appears to be caused by a 'friend' declaration in
  FL/Fl_Graphics_Driver.H, line 98:
    'friend FL_EXPORT int fl_draw_pixmap(const char*const* cdata, ...)'

This 'friend' declaration seems to "confuse" some (newer?) doxygen
versions, definitely doxygen 1.13.2.
2025-05-14 17:05:20 +02:00
Albrecht Schlosser
9b1379e688 Remove deprecated function Fl::set_idle()
This turned out to be more complicated than just to delete a function
because it was used internally, and the callback signatures were a bit
flaky. I also added a lot of documentation to clarify matters.

FL/Fl.H: document idle callback signatures, make some internal
  functions of class Fl private, add public Fl::idle() accessor (read-
  only), add Fl::add_idle(Fl_Old_Idle_Handler cb) to enable using
  old-style idle callbacks w/o 'data' argument.

FL/forms.H: replace Fl::set_idle() with Fl::add_idle().

src/Fl.cxx: rename private Fl::idle_ with trailing underscore.

src/Fl_System_Driver.cxx: use new public accessor Fl::idle() to access
  Fl::idle_ which is now private.

src/Fl_add_idle.cxx: improve documentation, clarify idle callback
  matching, add example code in docs, rename methods,  add overloaded
  Fl::add_idle(Fl_Old_Idle_Handler cb).

src/Fl_win32.cxx: use public Fl::idle() rather than private member.
src/drivers/Unix/Fl_Unix_System_Driver.cxx: same as above.
src/Fl_cocoa.mm: same as above.
2025-05-13 21:08:51 +02:00
Matthias Melcher
82b2001735 Fix unused parameter 2025-05-11 12:48:10 +02:00
Greg Ercolano
f8a7e299b0 Fl_Terminal doc fixes, private->protected for utf8_char_at_*() 2025-05-09 09:29:10 -07:00
ManoloFLTK
043bac6f8d Remove declaration of Fl_Scalable_Graphics_Driver from FL/Fl_Graphics_Driver.H
and declare it in non-public header src/Fl_Scalable_Graphics_Driver.H which also
declares classes Fl_Font_Descriptor and Fl_Fontdesc.
2025-05-09 09:51:36 +02:00
Albrecht Schlosser
53491f2ca0 Remove hardcoded version numbers: part 1
The goal is to change the version number for a new release only in
CMakeLists.txt. This is the first step.

Details:

- CMake/gen_config.cmake: this new file is included to generate the
  header files config.h (private, root directory), and FL/fl_config.h
  (public, can be installed). This file implements also ABI version
  checks (removed from FL/Enumerations.H and with more checks).
  Warnings are issued if the chosen ABI version is invalid.
- CMake/export.cmake: code to generate 'config.h' was moved to
  CMake/gen_config.cmake.
- CMake/options.cmake: set default of FLTK_BUILD_FORMS=OFF + comments
- CMakeLists.txt: move generation of FL/fl_config.h to gen_config.cmake,
  add API and ABI versions to CMake summary,
- FL/Enumerations.H: remove most of the version number details which
  are now included in FL/fl_config.h. This needed also some doxygen
  related changes.
- README.CMake.txt: improve docs of FL_ABI_VERSION and some more.
  Reflect the new default of CMake option FLTK_BUILD_FORMS (OFF).
- documentation/Doxyfile.in: add FL/fl_config.h to file list. This
  file is created in the build tree (and may be "installed").
- fl_config.h.in: add version number details that have been moved here
  from Enumerations.H (used to generate FL/fl_config.h).
2025-05-06 19:25:53 +02:00
Albrecht Schlosser
719642b5d6 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.
2025-04-29 20:16:11 +02:00
Matthias Melcher
f4978a0149 Adding the FL_MENU_CHATTY flag to Fl_Menu_Item.
If set, menu items will also call the callback when highlighting changes.
The reason is given with Fl::callback_reason(). #941
2025-04-01 17:00:56 +02:00
Matthias Melcher
5dd1062df5 Adding FL_BEFORE_MENU event to classes derived from Fl_Menu_ 2025-03-29 23:36:19 +01:00
Matthias Melcher
b7189192e2 Adds a new event FL_TOOLTIP_EVENT...
... and Fl_Tootip::override_text() to allow users to dynamically
generate tooltips.
2025-03-29 22:40:18 +01:00