... w/o editing a file. The default font is "Liberation Mono".
Just set environment variable FLTK_USING_WINE=1 to enable this feature.
Rationale: on /my/ current test system the font chosen by `wine` for
FL_COURIER is a proportional font whereas the display in Fl_Terminal
requires a fixed font for correct output. Font "Liberation Mono"
solves this long standing issue for me w/o having to change source code
but other Linux systems may require a different font.
Resize the window to see the effect: line sizes increase with the box
size and become wider depending on the box size. Minimal line width
of the "wide" lines has been changed from 4 to 5, maximal width is
now 9. Distinct widths are { 5, 7, 8, 9 }.
Note: the default (thin) line width is now 1 rather than 0 since the
default 0 may render badly.
Screenshot in documentation has been updated.
As a follow-up to the discussion I used the posted screenshot demo
(thanks to Greg), redesigned it using Fl_Grid, and added it as a
new test program, including Makefiles and CMakeLists.txt.
New file: test/line_style_docs.cxx to create screenshot. Note that the
old test/line_style.cxx is not obsolete, it can be used to test the
line styles interactively.
Docs have been updated in both chapter "Drawing Things" and the
function description.
Also added the new demo to test/demo.menu under "Images for Manual...".
- add Fl_Choice widget for layout comparison
- rewrite button callbacks
- improve layout and other details
This is a follow-up to issue #978, "merging" the existing input_choice
demo with "choicetest_v3" as mentioned.
Differences in size of arrows and overall look varies
with different schemes applied for issue raised by Philip Rose
first on fltk.general:
Subject: Discrepancy between Fl_Choice and Fl_Input_Choice
- src/fl_contrast.cxx:
- FL_CONTRAST_LEGACY: reset black/white threshold from 55 to 50
- FL_CONTRAST_CIELAB: change default contrast level from 55 to 39
- test/contrast.cxx:
- set default contrast mode to CIELAB
- add "random color" button to test random foreground colors (text)
- slightly increase terminal size
- make the Fl_Terminal widget the resizable() of the window
This program is built only when using CMake and a GNU or Clang
compiler to detect shadowed variables in header files.
Developers should fix such warnings whenever they see them during the
build to avoid user reports.
Some old platforms (NetBSD, AIX) implement the common stdio "putchar()"
function as a global macro which poisons the global namespace, preventing
all C and C++ programs from using "putchar()" as a function or method.
There was a long thread about this in fltk.coredev during the period
Mar 25 2024 ~ Apr 4 2024, subject "RFC: Fl_Terminal::putchar() in public API"
as to why we have no choice but to not use putchar() as a method name.
With modern CMake libcairo doesn't need to linked explicitly in the
test/cairo_test.cxx demo program. Either '-lcairo' is implied by
linking with fltk::fltk or it is not used at all.
This fixes a linker warning on macOS:
"ld: warning: ignoring duplicate libraries ..."
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.
This involved enlarging the unittest main window to make room
for the additional test.
Adding this test revealed a problem in Fl_Terminal's global
scrollbar size handling, which is fixed here as well.
Also fixed a small issue in the demo's debugging terminal
with the horiz scrollbar.
(1) Ensure that the terminal widgets doesn't use keyboard events.
Advantage: keyboard navigation and selection doesn't interfere
with the display.
Drawback: Contents of the terminal can no longer be copied.
This will be addressed in a later update.
(2) Thanks to Manolo for his addition of the "GUI scaling" button.
Although GUI scaling can be useful, it can also be annoying while
testing shortcuts.
(3) Changed all light buttons to check buttons.
Esc is intentionally consumed by the test program (see comment) but
other keystrokes (shortcuts) must pass to allow zooming with ctrl/+/-/0.
The old code filtered all shortcuts which turned out to be wrong.
Not being able to zoom was caused by a previous commit that lowered
the priority of the zoom key handler - which alone was not wrong.
The macOS Window menu is connected to the item array of the macOS menubar
via FL_SUBMENU_POINTER. This facilitates memorization of pointers
to items of the macOS menubar because the item array no longer changes
each time a window opens of gets closed.
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.
Keyboard behavior for button types was not consistent with mouse
click behavior. This change avoids callbacks when pressed radio buttons
are pressed again.