Commit Graph

11 Commits

Author SHA1 Message Date
Albrecht Schlosser e5afb8a532 Enable suppression of "deprecated" warnings (FL_NO_DEPRECATE)
This is intended for backwards compatibility with FLTK 1.3.x code
ported to 1.4.0.

Users defining FL_NO_DEPRECATE can compile old (1.3.x) code w/o
seeing lots of "deprecated" warnings. A legitimate use case is if
old (1.3) code is intended to be used with both FLTK 1.3 and 1.4.

FL_NO_DEPRECATE should NOT be defined if the user's code is targeted
at 1.4.x or later. Users should fix their code to be prepared for
the next minor release (e.g. 1.5.0).

Todo: document this.
2024-05-11 17:14:28 +02:00
Albrecht Schlosser 7a879568b3 Improve support for NetBSD (#944)
- fix gcc version check for FL_DEPRECATED macro

- fix #include for select() on NetBSD < 3.0 (#944)

For more info please see GitHub Issue #944
2024-04-02 16:03:00 +02:00
Albrecht Schlosser 8b094e8af3 Fix a bunch of compiler warnings, particularly for old compilers
Works now much better with old C99 and C++98 standard compilers.
Fixed: C++ comments in C files and headers included by C files.

There are still some warnings with C90 though but these would be
hard to fix and left as-is for now.

test/fractals.cxx: some arrays were too small by 1, or the compiler
  warned at least (false positive?). Anyway, it's fixed now.
2024-03-15 20:42:42 +01:00
ManoloFLTK a624290b27 Remove warnings when fl_attr.h is compiled in C 2023-03-09 18:10:38 +01:00
Albrecht Schlosser 9f8b65a70e Document MSVC macro _MSVC_LANG for future use in fl_attr.h
This macro defines the C++ standard used by the compiler since
Visual Studio 2015 Update 3.
2023-02-06 23:03:45 +01:00
Matthias Melcher fa9915e1e3 Doxygen fix for FL_DEPRECATED 2023-02-05 00:22:08 +01:00
Matthias Melcher 1aa6c4fed8
Fix position() methods that shadow Fl_Widget::position()
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2023-02-02 20:54:19 +01:00
Albrecht Schlosser 4e75549e7b Update dependencies and fix whitespace errors
- replace tabs with spaces
- remove trailing whitespace
2023-02-02 17:09:14 +01:00
ManoloFLTK f54c2b3430 Have files fl_attr.h and names.h visible by Doxygen
For some reason, the \file Doxygen command is absolutely required.
2023-01-15 11:00:48 +01:00
Matthias Melcher 44c874b731
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
2022-12-30 19:14:36 +01:00
Albrecht Schlosser 8863ef7901 Avoid multiple definition of macro __fl_attr()
This could happen if both FL/fl_ask.H and fluid/Fl_Type.h were
included in the same file.
2021-10-17 12:24:39 +02:00