Commit Graph

1323 Commits

Author SHA1 Message Date
ManoloFLTK
0ac1379985 macOS: prevent changing window border while window is fullscreen 2024-10-31 15:15:33 +01:00
Albrecht Schlosser
975cd3b4fd Remove unnecessary casts from glut demo programs
These casts are no longer useful since commit 5cd9f6fb80:
"STR #3323: glutAddMenuEntry now has a const label argument"
2024-10-18 17:01:34 +02:00
Albrecht Schlosser
a6a0a65edf Update or remove version numbers, update copyright years
Note: one goal is to have to edit fewer version numbers in source
files for each release.

We may be able to generate some files by the build procedure (CMake)
to avoid editing them in the future (1.5.0 or later).
2024-10-15 20:42:26 +02:00
Albrecht Schlosser
16d59008c2 Add option to test scaling shortcuts in test/menubar
Note: if enabled, then the usual global scaling shortcuts don't work
  and scaling by shortcuts is disabled.

This is intended for testing and not for normal usage.
2024-10-07 14:27:01 +02:00
Matthias Melcher
18bda5315d Update Widget order in test/keyboard. 2024-10-07 11:59:49 +02:00
Matthias Melcher
6e3b64425e Add fwd and back mouse buttons to test/keyboard 2024-10-06 18:53:03 +02:00
Matthias Melcher
0594d9a1a0 Update FLUID .fl files in the test/. 2024-10-06 17:53:57 +02:00
Matthias Melcher
ec05f78d98 Adding horiizonatl and vertical label margin
- sizeof(Fl_Widget) not increased
- label positions can be adjusted
- try it out in test/label app
- full support in FLUD
2024-08-27 15:13:32 +02:00
Albrecht Schlosser
d6ddc62b33 Fix CTRL/META state display in test/handle_keys.cxx (macOS)
This changes only the display of the mentioned state bits in the test
program, and only on macOS.

Thanks to Manolo for finding and reporting this.
2024-08-23 17:13:15 +02:00
Matthias Melcher
f151ecb87b Changing test/editor Shortcut Key Ctrl-i.
The original choice for split screen editing, Ctrl-2, did not
work well on some platforms.
2024-08-19 12:27:18 +02:00
Matthias Melcher
cfc54a3b19 Adding Fl_Widget::label_image_spacing() (#1039)
- May need a better method name.
- This makes the gap between the image in a label and
the label text user settable.
- Can be tested using test/label app
2024-08-14 01:52:37 +02:00
Albrecht Schlosser
666bbda70e Fix tabs, trailing spaces, and update dependencies 2024-08-10 20:32:19 +02:00
Albrecht Schlosser
85e08b981e
Merge pull request #17 from mid-kid/patch-1
Quote variables that may contain spaces (#17)
2024-08-10 16:51:36 +02:00
mid-kid
b83a6abe01 Configure/make: Quote variables that may contain spaces
This allows installing FLTK to directories that contain spaces.
2024-08-10 16:28:37 +02:00
Matthias Melcher
02a208b928 Fixed warning in Sudoku (unused variable) 2024-08-10 14:49:51 +02:00
Albrecht Schlosser
b7fc02e523 Simplify test/handle_keys.cxx and remove comments 2024-08-08 17:50:31 +02:00
Matthias Melcher
44a8508ffe Add Sudoku undo and redo. 2024-08-04 23:42:03 +02:00
Matthias Melcher
fad1a67734 Sudoku formatting, hint updates. 2024-08-04 17:28:35 +02:00
Matthias Melcher
cee2af13b3 Fix Sudoku's use of Fl_Sys_Menu->parent(). 2024-08-04 16:46:04 +02:00
Matthias Melcher
abb2971654 Fix Fl_Tabs callback in Overflow mode (#1031). 2024-08-02 21:15:18 +02:00
Albrecht Schlosser
53469038ce Enable setting a fixed font for 'wine' in test/handle_keys.cxx
... 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.
2024-07-31 17:04:34 +02:00
Albrecht Schlosser
a7d00ae558 Resize line sizes and widths dynamically in test/line_style_docs
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.
2024-07-23 17:18:40 +02:00
Albrecht Schlosser
7f24a0d6d8 Update docs and screenshot for fl_line_style() (#1016)
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...".
2024-07-21 22:34:02 +02:00
Greg Ercolano
6776f89872 Fix horiz connection lines (#1008) 2024-07-08 12:13:44 -07:00
Albrecht Schlosser
d411d39092 Improve test/handle_keys.cxx
- colorize output
- improve formatting
- log status of Fl::OPTION_SIMPLE_ZOOM_SHORTCUT
2024-07-01 00:30:35 +02:00
Greg Ercolano
54f44d5ac9 Fix compiler warnings 2024-06-30 09:25:31 -07:00
Albrecht Schlosser
64cd50c130 Update test/input_choice demo (#978)
- 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.
2024-06-27 03:19:26 +02:00
Greg Ercolano
5c7ba51be3 Fix Fl_Input_Choice vs Fl_Choice drawing issues (#978)
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
2024-06-26 15:40:41 -07:00
Albrecht Schlosser
b8cba7c41e Update dependencies 2024-06-21 18:16:44 +02:00
Albrecht Schlosser
9820d9f555 Fix and improve fl_contrast() calculations
- 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
2024-05-16 19:58:24 +02:00
ManoloFLTK
66c37e5128 Fix crash in test/cube under macOS when using Quit menubar item 2024-05-14 18:15:05 +02:00
ManoloFLTK
25ffce6cdf configure-based build: move terminal to fluid-dependent section 2024-05-10 08:20:31 +02:00
Albrecht Schlosser
175931bccd CMake: simplify compiler detection for '-Wshadow' test 2024-05-01 16:07:58 +02:00
ManoloFLTK
9472ff546c Implement and document new class Fl_PDF_File_Surface 2024-04-30 10:22:47 +02:00
Albrecht Schlosser
576f7bb9cc Enable 'shadow_variables' test on macOS using AppleClang
The CMake compiler ID on macOS is AppleClang rather than Clang.
This commit checks for this compiler ID as well.
2024-04-22 16:54:25 +02:00
Albrecht Schlosser
3fc8875756 Add missing 'x11.H' to exclusion list (STR 2728) 2024-04-18 17:33:57 +02:00
Albrecht Schlosser
bb45198413 Test public headers for shadowed variables (STR 2728)
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.
2024-04-18 17:13:09 +02:00
Greg Ercolano
31170c4731 Rename putchar() to plot_char() (#944)
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.
2024-04-06 23:36:04 -07:00
Albrecht Schlosser
05ddf0f600 Move test/fromdos.c to misc/fromdos.c where it belongs
This is a test file for developers only. Use with caution.
2024-04-02 17:02:01 +02:00
Albrecht Schlosser
af90841fbc Update dependencies, whitespace, and Fl_File_Chooser.cxx
Rewrite src/Fl_File_Chooser.cxx from its .fl source file
2024-03-19 15:39:18 +01:00
Albrecht Schlosser
81d47f71d6 Fix VS compiler warning, write "copied" message to tty
... rather than popping up a message window.
2024-03-18 19:34:32 +01:00
ManoloFLTK
792cfc27e7 native-filechooser has preview panel with FLTK_USE_X11 and macOS 2024-03-18 18:22:41 +01:00
Albrecht Schlosser
193c5285cd Improve linking of test/cairo_test.cxx demo program
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 ..."
2024-03-16 23:24:01 +01: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
Albrecht Schlosser
26f5b38a01 Update documentation, remove/edit explicit FLTK versions
... to simplify further version updates.

Add more deprecation notices concerning autotools/configure
to README.Unix.txt.
2024-03-14 17:16:43 +01:00
Albrecht Schlosser
9f4cea25bf Improve keyboard event test program: add copy button
... to copy selected or the full text to the clipboard.
2024-03-12 22:33:34 +01:00
Albrecht Schlosser
5e4f51ac6b Fix several compiler warnings
Three unrelated but only minor warnings.
2024-03-12 21:47:33 +01:00
Greg Ercolano
38af0c823b Add Fl_Terminal to "Scrollbar Size" unittest (#931)
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.
2024-03-11 13:20:17 -07:00
Albrecht Schlosser
62d85333bd Improve handling of events in test/handle_keys.cxx
(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.
2024-03-11 17:07:56 +01:00
Albrecht Schlosser
7bbe75c84e Add another keyboard event test program test/handle_keys.cxx
This program logs all keyboard events to a built-in Fl_Terminal widget.

WIP: version 0.80
2024-03-09 15:17:34 +01:00