* Full support o when()
* Making undo suspend nesting
* Finally correct undo handling for Label: input
* Documentation.
* Adding more undo checkpoints for the Widget Panel
* Quick selection of default user_data types
* Pulldown menu for system colors
* Make sure that partially typed text fields are propagated before saving
[ 15%] Building CXX object src/CMakeFiles/fltk.dir/Fl_Text_Display.cxx.o
.../fltk/src/Fl_Text_Display.cxx: In constructor ‘Fl_Text_Display::Fl_Text_Display(int, int, int, int, const char*)’:
.../fltk/src/Fl_Text_Display.cxx:122:57: warning: ‘void* __builtin_memset(void*, int, long unsigned int)’ writing between 4 and 8589934584 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
122 | for (int i=1; i<mNVisibleLines; i++) mLineStarts[i] = -1;
| ~~~~~~~~~~~~~~~^~~~
.../fltk/src/Fl_Text_Display.cxx:120:39: note: at offset 4 into destination object of size 4 allocated by ‘operator new []’
120 | mLineStarts = new int[mNVisibleLines];
| ^
This warning is IMHO obsolete because the code in question should not
be executed at all (mNVisibleLines == 1). However, the compiler seems
to substitute this with '__builtin_memset(...)' and analyzes "correctly"
that memory at offset 4 would be overwritten but not that the written
size would be 0.
The "fix" uses a compiler macro and #if to clarify that this code must
not be executed and should not be compiled (see comment why this code
exists).
The formerly undrawn rectangle beneath (or above) the line numbers is now filled with FL_BACKGROUND_COLOR.
Additionally the small rectangle between the scrollbars is now filled with FL_BACKGROUND_COLOR instead of FL_GRAY for consistency.
Many thanks to @darealshinji for contributing all the code
for this new FLTK image class (see branch Fl_ICO_Image of https://github.com/darealshinji/fltk).
The problem to fix is that the arrow drawn by draw_arrow1() in src/fl_symbols.cxx
displays a faint clear line between the stem and head of the arrow with the Cairo
graphics driver.
This occurs because draw_arrow1() draws the arrow in 2 steps (a rectangle +
a triangle) and the Cairo driver is configured to use antialiasing when filling
polygons. The antialiasing produces the faint line between stem and head.
Why does draw_arrow1() draw a rectangle + a triangle rather than a
7-vertex polygon? That's because the X11 graphics driver fails with its polygon-
drawing function when the polygon is also rotated: the polygon is drawn
empty.
We want to keep using antialiasing under Cairo for polygons because
the result is better with non horizontal/vertical polygon edges.
This implementation changes function draw_arrow1() which draws
the arrow as a 7-vertex filled polygon except when the graphics driver
returns false for its virtual member function can_fill_non_convex_polygon().
In that situation, draw_arrow1() draws, as before, a rectangle + a triangle.
The new, virtual member function can_fill_non_convex_polygon() returns
true except for the X11 graphics driver. Therefore, draw_arrow1() is effectively
unchanged under the X11 driver.
For a very simple test program see STR 3222, File 2:
https://www.fltk.org/strfiles/3222/value_slider.cxx
Known issues:
- range checking of the value box size is very limited
- resizing the widget does not change the value box size
- drawing issues are possible if the value box size and the widget
size are not compatible (e.g. value box too large)