Commit Graph

1068 Commits

Author SHA1 Message Date
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
ManoloFLTK
0d594319c1 Add extra argument to Fl_SVG_File_Surface constructor.
This makes processing of the underlying FILE object consistant by classes
Fl_SVG_File_Surface, Fl_EPS_File_Surface and Fl_PostScript_File_Surface.
2020-11-03 18:05:18 +01:00
ManoloFLTK
8accc6e840
Pango ps (#148)
Use cairo-PostScript to output PostScript when pango is available.

This allows to draw in vectorial form any script.
Before, only the Latin script could be drawn to PostScript in vectorial form.
2020-10-28 17:19:05 +01:00
ManoloFLTK
c57eeada70 Fix position of the "Return" button. 2020-09-07 08:36:13 +02:00
Albrecht Schlosser
b65d3a249d Customize corner radius for rounded box/frame (#130)
Make maximum box corner radius and shadow width configurable.
See Fl::box_border_radius_max() and Fl::box_shadow_width().

Documentation: update image of box types.

Fixes #130
2020-09-01 12:35:48 +02:00
Albrecht Schlosser
340e2ac3a1 Fix .clang-format and some whitespace errors
.clang-format: UseTab: ForIndentation -> Never

Update fluid generated files
2020-08-22 13:35:42 +02:00
Albrecht Schlosser
206675a3b1 Fix examples build (configure/make)
Fix more issues caused by moving fltk-versions from examples to test
and adding examples to the CMake build process (gitlab-ci)
2020-08-21 20:00:00 +02:00
Albrecht Schlosser
3b9a04ae2e CMake: add examples folder to build (optional)
- replace misnamed option 'OPTION_BUILD_EXAMPLES' with 'FLTK_BUILD_TEST'
- add option 'FLTK_BUILD_EXAMPLES' to build apps in examples folder
- move examples/fltk-versions.cxx to test/fltk-versions.cxx
- [Travis-CI] enable option 'FLTK_BUILD_EXAMPLES' for automatic builds
2020-08-21 18:55:12 +02:00
Albrecht Schlosser
d91160a9e0 Remove platform specific code from test apps
Test programs that open files don't use platform specific code.
They don't open files from macOS bundles.
Support files must either be in the current working directory or
given on the command line.
On macOS this requires a full path when using bundles.
2020-08-21 18:54:40 +02:00
Albrecht Schlosser
f3005a44f8 CMake: move test executables to build/bin/test 2020-08-21 17:10:30 +02:00
Greg Ercolano
0da41da713 Allow unix style paths for windows native filechooser
Allows and preserves unix style paths if user specifies them,
otherwise uses Windows style. This allows end users to use either
style path and get behavior they expect in cross-platform environments.

Addresses problems raised by issue #122
2020-08-08 19:10:57 -07:00
Albrecht Schlosser
4d0b04456e Update dependencies + fluid/generated files 2020-08-03 13:03:14 +02:00
Greg Ercolano
2141c63628 Implement + deploy fl_strdup() 2020-08-01 14:19:40 -07:00