summaryrefslogtreecommitdiff
path: root/FL/Fl.H
AgeCommit message (Collapse)Author
43 hourswipmaxim nikonov
2 dayswipmaxim nikonov
2 dayswi[maxim nikonov
3 dayswipmaxim nikonov
3 dayswipmaxim nikonov
3 dayswip: forkmaxim nikonov
2025-12-01Add background (`bg`) attribute to table of boxtypesAlbrecht Schlosser
This is a first step to fix some background (re-)drawing issues in widgets. A new bit in the array of boxtypes can be used to determine if a particular boxtype uses a solid background (e.g. all FL_*_BOX types) or if the parent widget is responsible for drawing it (FL_NO_BOX and all FL_*_FRAME) types, and maybe more ... The old struct member `set` in the struct of boxtypes has been renamed to `flags` and is now used as a bit field. Except these changes, this first commit fixes the focus box drawing of specific boxtypes, as seen in unittest_schemes.cxx in the Fl_Check_Button with label "Check", and very likely more.
2025-11-28Add method to list running timeouts (#1306).Matthias Melcher
\see Fl::timeout_list();
2025-11-17Add pen/stylus/tablet API and driver for macOS (#1326)Matthias Melcher
* define the pen/tablet support API * add pen event handler stub as a fallback * add pen device test "penpal". * Add macOS pen/stylus/tablet driver. * Add Oxygen documentation.
2025-11-17Fix Cairo build and add FLTK_OPTION_CAIRO_WINDOW to CI buildAlbrecht Schlosser
... on GitHub (GitLab CI builds used it already)
2025-11-16Refactor large static class Fl into an expandable namespace Fl (#1325)Matthias Melcher
* Change class Fl into namespace Fl. * Untangle Fl namespace into themed headers. * cut line count of FL/Fl.H in half * FL/core subdirectory now holds short headers grouped by functionality.
2025-11-06Add rule of five for Fl_Widget_Tracker.Matthias Melcher
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-07-02Remove deprecated methods and functionsAlbrecht Schlosser
In FLTK 1.5 we remove most (but not all) methods and functions that were deprecated in FLTK 1.3 or earlier.
2025-06-19Update Fl::await() and friends API and documentationMatthias Melcher
This creates the base for #1263, but does not fix it yet.
2025-05-13Remove deprecated function Fl::set_idle()Albrecht Schlosser
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-03-16Remove libfltk_cairo (fltk::cairo)Albrecht Schlosser
This library is no longer needed and was "empty" for backwards compatibility since FLTK 1.4.0.
2025-01-02Remove duplication and typo in documentation of Fl::copy()ManoloFLTK
2024-11-01Improve and clarify documentationAlbrecht Schlosser
2024-10-07Improve documentation on mouse and keyboard eventsAlbrecht Schlosser
2024-10-06Support mouse buttons 4 + 5 (aka "side buttons") (#1076, #1068)Albrecht Schlosser
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-08-23More detailed documentation of how Fl::event_state() differs between platformsManoloFLTK
2024-07-07X11: fix extraneous (undefined) event state bitsAlbrecht Schlosser
- Restrict FL_BUTTONS mask to only three valic mouse buttons. Pseudo mouse buttons 4-7 are used for FL_MOUSEWHEEL events and are no longer reflected in Fl::event_buttons(). - Return only state of mouse buttons 1-3 in Fl::event_buttons(). Buttons 4-7 are not "sticky" (used for FL_MOUSEWHEEL). - Keep undefined keyboard related bits in Fl::event_state() for backwards compatibility and transparency. These bits may be masked out in a later release. - Document Fl::event_state() bits for X11 in src/Fl_x.cxx. Note: this is a bug fix for X11 only, Wayland and other platforms are not affected.
2024-06-21Remove trailing whitespaceAlbrecht Schlosser
no code changes
2024-06-21Add Fl::remove_next_timeout(...) to remove only one timeout (#992)Albrecht Schlosser
This method also returns the data pointer of the removed timeout. This new method is generally useful for user code and particularly necessary to fix issue #991. Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2024-04-26Box types can now defined and draw their own focus frame, STR 2145, #659Matthias Melcher
2024-04-22 Fix for Fl_Native_File_Chooser::filter_value() - cont'd (#899)ManoloFLTK
2024-04-22 Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899)ManoloFLTK
- 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-04Fix compiler warning, part 1 of #946Albrecht Schlosser
2024-03-03Update doc about Ctrl/+/-/0/ zoom shortcutsManoloFLTK
2024-03-02Add OPTION_SIMPLE_ZOOM_SHORTCUT to fine tune zoom-in shortcutManoloFLTK
2024-02-27Improve prioritization of event handlers added at open display timeManoloFLTK
2024-02-07Introduce "Modern CMake" in FLTKAlbrecht Schlosser
This is a big commit and there are too many changes to list them all. The main changes are: - rename all CMake build options to 'FLTK_*' - export library targets with namespace (prefix) 'fltk::' - standardize shared library target names with suffix '-shared' - set public build properties on libraries for consumers - document library names and aliases in README.CMake.txt - document changes in "Migrating Code from FLTK 1.3 to 1.4" - partial backwards compatibility for old user projects Included but not directly related changes: - fix Windows (Visual Studio) DLL build - add CMake function fl_debug_target() to show target properties - don't build test programs if FLTK is a subproject - internal: reformat CMake code: remove space before '(' Thanks to Matthias and Manolo for their help, testing, and feeback.
2023-11-29Add commandline conversion for Windows (no-op on other platforms)Albrecht Schlosser
- add Fl::args_to_utf8() to convert commandline arguments to UTF-8 This new function closes the gap that previously only Visual Studio applications converted their commandlines to UTF-8. Tested with MinGW, MSYS2/MinGW-w64, and Visual Studio (2019).
2023-11-01Fix: Fl::clipboard_contains() cannot query selection buffer (#690)ManoloFLTK
2023-10-06Change prototype to Fl::now(double offset = 0) - cont'dManoloFLTK
2023-10-06Change prototype to Fl::now(double offset = 0)ManoloFLTK
2023-09-26Add Fl_Timestamp Fl::distant_past()ManoloFLTK
Can be handy when Fl::seconds_since() is used early at program startup
2023-08-26Fixes a bunch of typos in comments.Matthias Melcher
2023-03-14Cairo: introduce Fl::cairo_flush() in FLTK APIAlbrecht Schlosser
Flushing the Cairo context is necessary on Windows to make Cairo drawings appear on the device (screen). This new method makes it easy for user code to do this correctly after using Cairo drawings. - add Fl::cairo_flush(cairo_t *) - document Fl::cairo_flush(cairo_t *) - reformat Cairo doxygen docs and code (partially) - use the new method in Fl_Cairo_Window - use the new method in test/cairo_test.cxx - other minor (text) changes in test/cairo_test.cxx - add test/cairo_test to the demo menu (test/demo.menu)
2023-02-09Expose elapsed time API (#670)Matthias Melcher
2023-01-20STR 2658: documentation fixes on Fl::set_fontsMatthias Melcher
2023-01-06X11: Optionally copy selection buffer to clipboard (STR 3229)Albrecht Schlosser
The new method Fl::selection_to_clipboard(int) enables copying selection data to the clipboard on X11 if it is set to 1. This feature was requested by STR 3229 and the implementation was inspired by an `xterm` feature named "Select to Clipboard" which can be enabled by 'ctrl + middle mouse button + "Select to Clipboard"' in an xterm window.
2023-01-05Adding Fl::hide_all_windows()Matthias Melcher
2023-01-05Add close buttons for individual tabs in Fl_Tabs (#628)Matthias Melcher
Add close buttons for Fl_Tabs Introducing callback reasons FLUID shows all FL_WHEN_... options Adding Fl_Tabs overflow types Improved test/tabs to show new features
2023-01-03Clarify and improve Fl::scheme() related documentationAlbrecht Schlosser
2022-12-16Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…ManoloFLTK
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-11Use correct syntax to befriend a classManoloFLTK
2022-12-10"Public members Fl::awake_ring_*_ should be private" (#559) - cont'dManoloFLTK
2022-12-09Fix for "Public members Fl::awake_ring_*_ should be private" (#559)ManoloFLTK
2022-11-05Wayland/X11 hybrid: use "bool fl_disable_wayland;" declaration.ManoloFLTK