Commit Graph

1080 Commits

Author SHA1 Message Date
Albrecht Schlosser
b6de09cff2 Re-enable nested (aka recursive) common dialogs (STR 3242, #282)
Apply Fl_Dialog_r10831.patch as given in STR 3242:
https://www.fltk.org/strfiles/3242/Fl_Dialog_r10831.patch

Reformat, add missing pieces, rename private members, cleanup...

Improve documentation, add fl_choice_n() (issue #282)

New methods fl_input_str() and fl_password_str() return Fl_String
2021-12-04 14:49:27 +01:00
Greg Ercolano
84c09ae7b2 Fixes #297 - improvements for icon.cxx + icon() docs 2021-11-26 13:13:58 -08:00
Greg Ercolano
6fc5c16e1c Fixes warnings about test/icon.cxx in issue #296 2021-11-26 09:50:19 -08:00
ManoloFLTK
84cf249482 Fix for issue #253: Remove xdbe support 2021-11-26 15:01:54 +01:00
Albrecht Schlosser
7b9ddd97c3 Fix group nesting / end() statements in test/cube demo 2021-11-25 13:36:44 +01:00
Albrecht Schlosser
0b8eabd184 Disable confusing debug info in clipboard viewer demo
Windows only, depends now on macro DEBUG_CLIPBOARD_DATA.
2021-11-19 18:29:34 +01:00
Albrecht Schlosser
ca89f48c0b Add "Save PNG" feature to clipboard viewer demo 2021-11-18 14:20:24 +01:00
Albrecht Schlosser
0bc06e8f1a Reformat and move clipboard demo from examples to test folder
The clipboard demo is more a test program than an example and very
useful even if the examples are not built.

Also update dependencies.
2021-11-18 13:44:41 +01:00
ManoloFLTK
4a2833b104 Clearer GUI for test/device 2021-11-18 10:57:12 +01:00
Albrecht Schlosser
5810edaf84 Fix remaining VS compiler warnings in test programs 2021-11-16 21:25:19 +01:00
ManoloFLTK
397226b75d Add use of fl_capture_window() by test/device
Also, rename fl_capture_window_part() to fl_capture_window().
2021-11-16 15:03:36 +01:00
Albrecht Schlosser
5e7eede311 Add missing files (executables) to .gitignore files 2021-11-08 19:44:40 +01:00
Albrecht Schlosser
ff4288fc2b Add new resize examples to Makefile, update dependencies 2021-11-08 17:48:57 +01:00
Albrecht Schlosser
75240c9a32 Add new resize examples to demo menu, remove figure numbers
Adding only 2 of 3 new examples is intentional (9 per menu level).

Figure numbers have been removed in all the HTML docs recently for
better maintainability.
2021-11-08 16:19:48 +01:00
Duncan Gibson
7407d9c8d0 Add new resize example to test and dox (PR #165)
add example(s) showing Albrecht's innovative overlap resizable
technique to the "How does resizing work?" documentation and tests

See "resizable question" original discussion thread under:
https://www.fltk.org/newsgroups.php?gfltk.general+v:39635
2021-11-08 16:18:58 +01:00
Albrecht Schlosser
14f842708d Fix indenting, whitespace errors and dependencies
(no code changes)
2021-10-27 20:52:08 +02:00
Albrecht Schlosser
cf20474d7c CMake: Simplify adding test programs for developers
The intention is to make it more convenient for developers to add
one or more test programs for their tests by editing only one
variable (extra_tests).
2021-10-06 18:17:55 +02:00
Albrecht Schlosser
ef86d9aced Fix more MSVC warnings in test apps (#109)
- test/checkers.cxx
 - test/cube.cxx
 - test/offscreen.cxx
 - test/unittest_simple_terminal.cxx
 - test/utf8.cxx
2021-08-31 17:49:31 +02:00
Albrecht Schlosser
e5310144b7 Fix MSVC 'GLfloat' warnings in test apps (#109) 2021-08-31 17:18:18 +02:00
Albrecht Schlosser
2b29e921db Fix MSVC compiler warnings in test/icon.cxx (#109)
Also:

- remove unnecessary 'size_t' conversions from FL/fl_casts.H
- add reverse conversions from integer types to 'void *'
2021-08-31 16:52:54 +02:00
Albrecht Schlosser
c91713fd88 Fix MSVC warnings in test/fonts.cxx (issue #109) 2021-08-31 00:26:56 +02:00
fire-eggs
753631a0b5 Fix MSVC compiler warnings (PR #267) 2021-08-30 22:13:32 +02:00
Albrecht Schlosser
2ce8183bee Fix compiler warnings (Windows, MSVC) 2021-08-30 13:56:28 +02:00
Albrecht Schlosser
6ac305a508 Remove compiler warnings '-Wextra-semi' (see also PR #266)
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows
(cross-compiled on Linux) and removed all "extra semicolon" warnings
I could find. I didn't check on macOS (yet).

Note: Linux configured with and w/o Pango but not w/o Xft. Compilation
with other options (e.g. Cairo) might still emit such warnings.
2021-08-27 14:52:43 +02:00
Albrecht Schlosser
787c67afea macOS: fix fltk_cairo shared library (issue #250)
- add missing dependencies to build the shared libfltk_cairo(.dylib)
- remove incorrect dependency on cairo from libfltk
- add cairo_test-shared demo (linked with shared libs)
2021-07-12 20:05:07 +02:00
Albrecht Schlosser
986a8b33a2 Fix keyboard demo international keyboards
Fl::event_key() display needs to be converted to UTF-8 for keycodes
outside the ASCII range (0xa0 - 0xff). Such keycodes can be found
on international keyboards.
2021-06-11 13:25:31 +02:00
Albrecht Schlosser
538079c7a0 Clarify demo code and add comment with "translated" string
Add the example string in binary "latin1" (ISO-8859-1) encoding
in a comment as clear text for reference (code is UTF-8 encoded).
2021-05-26 22:05:16 +02:00
Albrecht Schlosser
da4d16b59a Update fluid tutorial on CubeView and demo code
Format code according to the CMP, add instructions on how to copy
the code to the fluid tutorial, and update the tutorial with the
current code of test/CubeView.h and test/CubeView.cxx.
2021-05-21 20:08:12 +02:00
Albrecht Schlosser
773467dee4 Refactor macOS bundle generation to avoid "quarantine"
macOS Big Sur 11.3 introduced a new "security feature" such that
app bundles created from existing bundle templates in downloaded
files (tar distibutions, expanded) could no longer be executed
without unsetting the "quarantine" attribute. This commit fixes
this by creating all bundles from scratch.

Known *workaround* for older tarballs and snapshots:

  $ xattr -d -r com.apple.quarantine xxx.app
2021-05-13 16:18:13 +02:00
Albrecht Schlosser
64296707d9 Include bitmap files rather than copying the source code
There's no need to blow up the source file by including the bitmap
file literally in the source code. Use '#include' instead.

Another benefit is that the original source file is referenced in
the source code so it is not accidentally removed.
2021-05-08 15:23:17 +02:00
Albrecht Schlosser
2f73df4f3e Rename 'srs.xbm' to its original name 'sorceress.xbm' 2021-05-08 15:21:23 +02:00
Albrecht Schlosser
7b70d2c90d Fix handle_events demo build w/o OpenGL
test/handle_events.cxx can optionally be built with an Fl_Gl_Window,
  but this doesn't work if OpenGL support (libfltk_gl) is disabled.
2021-04-22 12:34:49 +02:00
ManoloFLTK
d01aab2ece Replace list of excluded platforms by name of chosen platform.
Since FL/platform.H defines USE_X11 for the X11 platform, it's better to target
the X11 platform by
  #include <FL/platform.H>
  #if USE_X11
rather than by
  #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__)
that would have to grow with future platforms.
2021-04-19 14:07:37 +02:00
Albrecht Schlosser
02dfdd590d Fix macOS bundle: set missing fields for test apps
- MACOSX_BUNDLE_BUNDLE_NAME: CFBundleName
 - MACOSX_BUNDLE_GUI_IDENTIFIER: CFBundleIdentifier

test/demo.cxx: Remove confusing quotes from demo variable output.
2021-04-08 13:50:32 +02:00
Albrecht Schlosser
41266df7ae Remove unnecessary system includes from public headers
Add includes of system headers in the implementation files
where necessary.
2021-03-21 00:42:28 +01:00
Albrecht Schlosser
bd6c985434 Improve Fl_Help_View test file
- add DOCTYPE, <head> and <body> statements
- make the file more standards conformant
- update OL tests, add nested OL/UL test
- add 'alt' tags to image refs

Note: the 'NAME' tag is obsolete and should be replaced with 'ID'
but Fl_Help_View does not parse 'ID' tags (yet).
2021-03-11 14:01:01 +01:00
Albrecht Schlosser
37175d1757 macOS: add resize-example apps to .gitignore 2021-03-01 14:53:11 +01:00
Albrecht Schlosser
49a78bc482 Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files

To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
2021-03-01 10:45:59 +01:00
Albrecht Schlosser
08d9b3e10d Remove config_lib.h and runtime configuration info
... as discussed in fltk.coredev.
2021-02-27 15:09:12 +01:00
Albrecht Schlosser
135b8b9c86 Update dependencies 2021-02-18 12:55:51 +01:00
Greg Ercolano
1f55bfe65c Issue #109 contd: missed fractals.cxx fixes, also fix parens issue.
Missed mods to fractals.cxx.
Also fixed a parens issue Albrecht noticed on the Mac build.
2021-02-15 17:46:15 -08:00
Greg Ercolano
bef661607b Solve all 'fractals' warnings in VS2017/Win32 for issue #109. 2021-02-15 15:56:47 -08:00
Albrecht Schlosser
086396ca54 Fix output and screen_num() in handle_events demo
Output was incorrect, partly to stdout and stderr, resp.

As Manolo noted in fltk.general, Fl_Window::screen_num() is the
correct API to retrieve the screen number of a window rather than
Fl::screen_num(...).
2021-02-10 14:10:13 +01:00
Albrecht Schlosser
b4c464f71b Add event handling test and demo program
This is intended to be used as
  (a) an example of event handling and
  (b) a test program to visualize many event related variables

This first version is compatible with FLTK 1.3.x but lacks the screen
scaling factor under 1.3.x (which is always assumed to be 100%).

Note: this does not reflect any system or monitor related settings.
2021-02-08 15:46:35 +01:00
Albrecht Schlosser
a2a026ed74 Remove debug output from test/fullscreen demo
Output statements commented out and modified to go to stderr if used.
2021-01-29 13:56:09 +01:00
Albrecht Schlosser
7ef23153df Update test/hello.cxx and related image
Improve CMP compatibility and use a better (anti-aliased) image for
the docs.
2021-01-13 15:12:26 +01:00
ManoloFLTK
f787a1b4e4 Remove build-time warning.
The warning message was:
Makefile:318: warning: ignoring prerequisites on suffix rule definition
2020-12-02 21:12:15 +01:00
ManoloFLTK
c70a091fa3 Match format specifier and variable type. 2020-11-25 08:29:47 +01:00
Albrecht Schlosser
5a04ca6c38 Improve resizing of test/cube demo (#157, #166)
Based on Greg's mods in 'cube-v5a-patch.txt' in this issue #157 comment:
  https://github.com/fltk/fltk/issues/157#issuecomment-732496554

Simplify the layout and keep border widths constant:

- combine left GL window + buttons (ct_group) in left group (lt_grp)
- make the cube Fl_Gl_Windows the resizable()s of their respective groups.

The latter keeps the margin widths constant.
2020-11-24 21:37:59 +01:00
Albrecht Schlosser
7d4f427a93 Fix Fl_Scrollbar layout in test/valuators demo 2020-11-21 13:21:11 +01:00