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.
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
This method can be used to draw small circles as part of the GUI.
It is independent of the current scheme.
Very small circles are approximated by drawing several rectangles.
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()
- Add internal fl_contrast_cielab() as the new default.
- Keep old function as internal fl_contrast_legacy().
- Add fl_contrast_mode() to switch between fl_contrast() functions.
- Add fl_contrast_level() to fine tune fl_contrast() per mode.
- Add option to register and use a custom contrast function.
- Add test/contrast.cxx test program.
- Move all fl_contrast() related code to a new file src/fl_contrast.cxx.
- Add fl_lightness() convenience function for perceived lightness.
- Add fl_luminance() convenience function for physical luminance.
- remove static variable 'string_count'
- improve and document methods debug() and hexdump()
This commit does not resolve issue 601 but removes some development
leftovers.
Methods debug() and hexdump() left for debugging as requested.
It may be useful to some to have the terminal emit an error character
to show unknown escape sequences. Off by default, unknown escape sequences
are silently ignored. If enabled, '¿' is inserted instead.
This is basically a rewrite of the ESC handler, keeping state
in the class, so ESC sequences can continued between called
to append() (such as when reading data from a pipe in blocks).
New private class 'Fl_Escape_Seq' handles parsing and state info.
It also has careful bounds checking during parsing.
Backspace supports Unicode, and the unicode chars can straddle
across append() operations as well.
Private variables in Fl_Simple_Terminal renamed _xxx to xxx_
to improve CMP compliance.
SVG is now decompressed in memory
Bitmap invalid array length handling to return an error
RGB Image data reader to return error if image data is too short
FLUID: Add size argument to bitmap and JPEG data
Change some method names to comply with FLTK style as discussed
in fltk.coredev, thread "Fl_Flex method name question".
* Rename Fl_Flex::margins(...) to Fl_Flex::margin(...)
(use singular form for all margin related methods)
* Remove Fl_Flex::setSize() and isSetSize() "backwards compatibility" methods
* Rename Fl_Flex::set_size(...) to fixed(...)
Note: the latter affects existing (pre-release) fluid (.fl) files: you may
want to edit and replace "set_size_tuples" with "fixed_size_tuples"
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)
"Arrows" in widgets are those GUI elements mostly represented by
triangles pointing in a particular direction as in scrollbars,
choice widgets, some menus, valuators and Fl_Counter widgets.
The code has been simplified and standardized such that all these
GUI elements are drawn identically per FLTK scheme.
Widget authors no longer need to write code to calculate arrow sizes
and draw polygons etc.
Different schemes can and do implement different drawing functions.
Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and
src/Fl_Menu.cxx
Selecting a text range programmatically would not sync
some variables with the actual selection. This also fixes
a crash bug in macOS when dragging text that was
selected by buffer()->select() only.
While adding the docs, noticed some things that need modification
for proper public use. These are highlighted as \todo items and
\warning items, which will be fixed in a separate commit forthcoming. -erco
Started with @wcout's patch (see Issue #153, STR 3290), modified
patch for CMP conformance, restructured methods, and finally:
- used Fl_Int_Vector instead of 'fl_data_container'
- removed fl_data_container
Thanks for the working patch to @wcout.