Commit Graph

1165 Commits

Author SHA1 Message Date
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
ManoloFLTK e3270a6032 Simpler macOS-specific code in main(). 2020-07-25 12:43:43 +02:00
Albrecht Schlosser 118c67c804 Git-ignore resize-example* test programs 2020-07-23 12:46:02 +02:00
ManoloFLTK e2d3b03899 Simpler macOS-specific code. 2020-07-23 09:24:29 +02:00
Albrecht Schlosser f357f4311c Use local images in test/help_dialog(.html)
- create subdir test/images
- copy images used by test/help_dialog to this subdir
- fix image URL's in test/help_dialog.html accordingly

CMake: copy the entire test/images folder to the <build>/data folder

This enables the demo test/help_dialog.cxx to find its images.
2020-07-23 01:53:24 +02:00
Albrecht Schlosser 0015e64671 macOS: don't add resource files to demo.app
Resources like demo.menu and help_dialog.html are no longer read
from the bundle directory on macOS. They are read from the build
folder build/data or in case of classic autoconf/make builds from
the source directory. We don't need to copy the files into the
bundle folder, they are copied to the build/data folder on all
platforms anyway.
2020-07-22 23:36:20 +02:00
Albrecht Schlosser 4957dd48c2 Fix macOS code + remove obsolete code
Albrecht:

- move fl_chdir(data_path) up before fl_getcwd() prints it
- add statements to open the argument (i.e. file) with data_path
- update comments, remove obsolete code

Greg:

- on Mac we need absolute path for child filename parameters
2020-07-21 11:41:37 +02:00
Greg Ercolano 889ab64962 Add Fl_Simple_Terminal for cross platform debugging 2020-07-21 11:11:03 +02:00
Albrecht Schlosser af7f485e06 Consolidate test/demo for all build systems
This is an attempt to unify the code for all build systems (CMake,
autotools with make), platforms (operating systems) and toolchains
(make + gcc/clang, Visual Studio IDE, Xcode ...) to avoid duplicate
code and clarify the differences for future devs and to simplify
maintenance.

The goal is to minimize the platform specific code.

Much of the new code are comments to describe the different situations.
The main program does now all the "hard work" to construct the paths
necessary to access the other applications and data files.

Use macOS specific code to determine the application path (app_path)
in main() instead of function dobut(), when test apps are activated.

Remove obsolete comments and dead code.

Tested on Windows and Linux with both autotools/configure/make
and CMake with make (Linux + MinGW), Visual Studio.
2020-07-21 11:11:03 +02:00
Duncan Gibson c132ac564e add resize examples as per STR3433
add example code for creating images for resize.dox
based on Article #415: How does resizing work?
https://www.fltk.org/articles.php?L415

see also https://www.fltk.org/str.php?L3433
2020-07-20 14:08:47 +02:00
Albrecht Schlosser 4858882e1e CMake: simplify create_example macro
- move target (demo) specific code from macro to CMakeLists.txt
- refactor macOS specific code for a cleaner structure
- improve documentation

Note: CMake ignores platform specific code like creating bundles on
other platforms, hence the entire code could be simplified (less
conditional code)
2020-07-20 11:02:01 +02:00
Albrecht Schlosser df683013d2 Restore tabs in html test file
These tabs were intentional and had been replaced with spaces
in the big whitespace fix.

This file is an exception!
2020-07-20 10:32:59 +02:00
Albrecht Schlosser 956a3bb160 CMake: simplify copying of test and demo files 2020-07-18 16:07:30 +02:00
Albrecht Schlosser c380a91361 Windows: add icon to sudoku.exe (PR #36)
The changes proposed by Tadej Panjtar (tpanj) were obsolete WRT
current Git repo. Thanks to tpanj anyway, I did also apply the
simplifications of sudoku.rc.
2020-07-16 12:25:51 +02:00
ManoloFLTK 13c1923b2a Restore file icons to 3 macOS test apps who have one 2020-07-15 17:06:05 +02:00
Albrecht Schlosser 720b84ef9d CMake: refactor and reformat CMake files
- raise minimum CMake version from 2.6.3 to 3.2.3 (Jun 01, 2015)
- indent all CMake files according to the CMP (2 col.)
- refactor FLTK version number definitions and usage
- unify CMake and autoconf/configure variable names:
  - FL_VERSION -> FLTK_VERSION
  - FL_MAJOR_VERSION -> FLTK_VERSION_MAJOR
  - etc. for _MINOR_ and _PATCH_, respectively
  - note: this does not affect FL_VERSION etc. in source code
- generate "export headers" for all libraries (experimental: OFF)
- port some forgotten goodies from branch-1.3 to master
- merge and improve macro 'create_example' (WIP)
- remove "temporary" options and code for older CMake versions
- include and use 'GenerateExportHeader' (experimental, WIP: OFF)
  - note: created header files are not yet used
- build only *one* DLL with Visual Studio (tested, works)
  - similar to the bundled IDE projects in 1.3.x
- add some dynamically linked test/demo programs ('*-shared')
  if shared libraries are built (WIP)
- split 'macros.cmake': use one file per macro
2020-07-15 00:34:53 +02:00
Greg Ercolano 7426e762a4 setlocale() added to Fl_File_Chooser demos
This change ensures errors in local language.
See issue #99 for discussion on why this is needed.
2020-07-14 12:52:56 +02:00
ManoloFLTK 2984fe638c Fix for building without print support (GitHub issue #98). 2020-07-11 12:21:25 +02:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
ManoloFLTK e98d7d8df5 Fix test/help_dialog for CMake building and macOS platform. 2020-07-01 11:02:53 +02:00
ManoloFLTK 8d4b0c15f7 Move class Fl_SVG_File_Surface from libfltk to libfltk_images.
File examples/SVG_File_Surface.cxx is no longer useful because it was a very
partial implementation of what is now class Fl_SVG_File_Surface.
2020-06-29 11:36:09 +02:00
ManoloFLTK 26e6c3f930 Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.
Test programs device and pixmap_browser use these new classes.
Class Fl_SVG_File_Surface can be optionally made non functional using the
--disable-svg configure option or turning off OPTION_USE_SVG in CMake.
Class Fl_EPS_File_Surface can be optionally made non functional using the
--disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-27 09:56:00 +02:00
Albrecht Schlosser 69d58f485a Remove superfluous dependency on forms library
Some of the test programs were linked with libfltk_forms which was
unnecessary. The only one requiring this is the forms demo.

[CMake] reordered linked FLTK libs in dependency order.
2020-06-21 13:39:25 +02:00
Albrecht Schlosser b8318480f5 CMake: Build static and shared libs side-by-side
Clean up library and variable names.
Remove '_SHARED' suffix from library (output) filenames.

This commit was inspired by David Runge ('dvzrv'), thanks.
See PR #21.

Fixes #21
2020-06-13 14:22:22 +02:00
Albrecht Schlosser 1078b8fe43 Update dependencies
Change sort order using -f (--ignore-case):
  fold lower case to upper case characters
2020-06-13 12:50:06 +02:00
Albrecht Schlosser 95165884b6 Support cross-compilation with autotools
We use the host system's `fluid` when cross-compiling. This must be
executable as `fluid`, i.e. it must be in the PATH or otherwise
defined, for instance as an alias.
2020-06-10 16:24:39 +02:00
Albrecht Schlosser a686e6eafd test/clock: close both windows together
The new window callback demonstrates how to close all (both) windows
when the user closes one window.
2020-06-01 19:06:40 +02:00
Albrecht Schlosser 46253603de Extend fl_message_position() with 'center' option
Add argument 'center' to position the message box centered over
  the given x/y coordinates.

Add another method to supply a widget or window to center the
  message box over.

Fix documentation and don't use INT_MIN to avoid having to
  include limits.h in user code.
2020-05-07 17:43:04 +02:00
Albrecht Schlosser c1b2e030c5 Update dependencies and .gitignore 2020-04-28 21:20:01 +02:00
ManoloFLTK 2878fa95ab Add optional argument to Fl_Printer::begin_job() to inform caller when an error occurs.
This solves an issue raised in fltk.general :  Fl_Printer errors - how can I interpret them?
    https://www.fltk.org/newsgroups.php?s38419+gfltk.general+v38427
2020-04-22 16:01:33 +02:00
Albrecht Schlosser 811033af19 Reorganize .gitignore file(s)
Move ignored files in /examples/ and /test/ to their own folders,
i.e. to examples/.gitignore and test/.gitignore, resp.
2020-04-20 14:25:08 +02:00
Albrecht Schlosser 8eda47d411 Fix copyright header 2020-04-08 00:50:42 +02:00
Albrecht Schlosser 8a7d4c9f61 Remove CodeWarrior "support"
Metrowerks CodeWarrior was an ancient macOS compiler (discontinued
since 2005) that defined the macro __MWERKS__. Code using this macro
and several comments have been removed.
2020-03-11 14:38:02 +01:00
Albrecht Schlosser 4c1b92eb52 Implement fl_putenv() as cross-platform putenv() 2020-02-10 12:10:40 +01:00
ManoloFLTK 85256b908f Make test/fullscreen follow what doc of Fl_Window constructor says.
That doc says:
"Top-level windows initially have visible() set to 0 and parent() set to NULL"
and here sw is created as a top-level window, so it must be made visible
either by set_visible() or by show().
2020-02-09 08:43:36 +01:00
Albrecht Schlosser 2a9cdbf252 Add convenience options to glpuzzle demo
The demo exhibits a sometimes annoying /feature/ to spin the entire
puzzle if a user happens to click and/or drag the mouse somewhere on
the puzzle's background rather than on a puzzle piece.

A new command line option '-n' disables this feature entirely.

The extended menu and keyboard commands learned a new option and
keyboard shortcut 'n' => "Normal Position" to stop spinning and
to reset the puzzle to its original position.

The space key is another (hidden) shortcut for 'n'.
2020-01-18 14:40:53 +01:00
ManoloFLTK ef48a0ddb9 Use cross-platform code to set the window icon. 2020-01-18 13:03:29 +01:00
Albrecht Schlosser 33825df108 Don't include 'src/flstring.h' in menubar demo
src/flstring.h should only be used in library code because it
  includes <config.h>.

Document this fact in src/flstring.h.
2020-01-16 15:59:00 +01:00
ManoloFLTK 2990717d6e Implement Fl_Window::icon() and default_icon() for macOS
The implementation is effective for macOS 10.10 and above.
Demo program test/device uses the new implementation.
2020-01-11 14:57:58 +01:00
Albrecht Schlosser 8c4930a7d7 Upgrade bundled libpng from 1.6.16 to 1.6.37
Release: 1.6.37 - April 14, 2019

For further details see README.bundled-libs.txt.
2020-01-09 19:26:29 +01:00
Albrecht Schlosser 97e30260ec Update dependencies and .gitignore 2020-01-04 01:54:30 +01:00
Albrecht Schlosser bebb116a06 Update test/Makefile for checkers build with fluid 2020-01-04 01:33:06 +01:00
Matthias Melcher 5bb880dfa2 Creating hires version of Checkers.
PNGs are just scaled but should be replaced with crispier graphics from the original vector files.
2020-01-03 23:12:23 +01:00
Matthias Melcher 7e5d6df711 Added Fluid file to Checkers as a tool to inline the PNG images. 2020-01-03 22:53:56 +01:00
Matthias Melcher df9eb443f0 Commented out some silly code in the preferences test. 2019-12-31 18:32:30 +01:00
Matthias Melcher d97836f5dd macOS: fixed all demo programs that need to access resources
MacOS uses bundles instead of executables. CMake creates those bundles in various locations, depending on the generator used (Xcode or Makefiles). I tried to fix all instances where demo apps did not find the resources they needed. This probably must be done for Linux and MSWindows as well.
2019-12-23 14:33:24 +01:00
Albrecht Schlosser 61a86d1941 Improve Cairo demo program
- remove unused variables
- add comments
- center drawn buttons
- make text slightly smaller to fit into button
- reorder button colors (r, g, b)
2019-11-21 15:03:14 +01:00
Albrecht Schlosser 274d49448e Don't use Fl::readqueue() in cube demo
Usage of Fl::readqueue() is not recommended (should be deprecated?),
hence we shouldn't use it in our demo program(s).

To do: remove Fl::readqueue() usage from fluid.
2019-11-08 14:06:35 +01:00
Albrecht Schlosser 28ddf84793 Fix cube demo if OpenGL is not available
(1) Fix a compilation error
(2) Fix high CPU usage
2019-11-08 13:58:28 +01:00
Albrecht Schlosser 50ee013a01 Fix more compiler warnings (STR 3529)
test/colbrowser.cxx:   [-Wformat-overflow=]
test/file_chooser.cxx: [-Wformat-overflow=]

Increase buffer size.
2019-08-29 17:58:24 +02:00
Greg Ercolano eed1d364d9 Small tooltip improvements for test/tree app 2019-08-25 01:08:12 -07:00
Albrecht Schlosser 44b2b7126c Update dependency system
Try to make `make depend' independent of locale.
2019-06-22 23:42:39 +02:00
Greg Ercolano d31b89798f Fix missing quotes in CMakeLists.txt change. 2019-06-22 09:50:10 -07:00
Greg Ercolano 5592996ed3 Small fix for build error caught by git's build system. 2019-06-22 09:36:26 -07:00
Greg Ercolano 446c707771 Additional Makefile rules and source files for issue #29.
This adds source png and xcf files for checkers pieces.
Also adds Makefile rules using xxd to convert .png -> .h as requested by Albrecht
in issue #29, (hmm, no comment numbers github?)..message dated "June 22nd 2019 4:22am PDT".
2019-06-22 09:18:37 -07:00
Greg Ercolano c9c51dbc48 Fix issue #29: Updated buggy/ugly checkers piece icons
OP noticed our one-bit xbm images demonstrated an X11 driver bug
on certain hardware. While it's good that our test programs show the bug
(e.g. test/bitmap), it's bad that our games do.

Removed the 16 xbm files used by checkers which simulated transparency
with dithered images, and replaced with 4 "hexdump" png files that are
cleaner/simpler looking for such lores pieces (46x46 pixels).

Will follow up with a separate commit for the source .png and gimp .xcf
file I used for making the pieces.
2019-06-22 09:02:06 -07:00
Albrecht Schlosser f78ef314aa Update dependencies
Note: these dependencies are not complete and will likely never be
because they depend on different configurations.
2019-03-28 11:42:09 +01:00
Albrecht Schlosser debc1a39ce Update dependencies 2019-03-25 13:16:05 +01:00
ManoloFLTK cf67176b75 Have the fullscreen test program show the screen scaling factor values. 2019-03-06 14:54:51 +01:00
ManoloFLTK a1b2d54758 Add example of call to Fl_Sys_Menu_Bar::about() 2019-02-24 11:23:38 +01:00
Albrecht Schlosser c92f992380 CMake: Cairo demo must also be built w/o Cairo
The Cairo demo program (test/cairo_test.cxx) can and should be built
even if Cairo is not configured with CMake as it is done with
autotools (configure/make).

The message window shown when Cairo support is not available has been
improved (is more explicit and has a window title).
2019-02-12 15:09:42 +01:00
Albrecht Schlosser 773a257421 Reformat according to the CMP (whitespace only)
Preparing for some minor mods...
2019-02-12 14:55:43 +01:00
Albrecht Schlosser 024064cb4e Remove duplicate source from Makefile (and sort it)
It's easier to notice duplicate files if they are sorted.
2019-02-09 15:39:41 +01:00
Matthias Melcher 7d9d7dd7b8 Fixed all Pixmaps to be '*const' (STR #3108). 2019-02-05 00:14:37 +01:00
Matthias Melcher c97990e517 Removed all shadow lint in header files (STR #2714). 2019-02-02 22:29:53 +01:00
Matthias Melcher 452a410a3e STR #2714: remove new shadow lint for MacOS 2019-02-02 17:47:55 +01:00
Albrecht Schlosser bb91970122 Update dependencies (now sorted)
The main dependencies (makedepend files) are now sorted alphabetically
with one dependency per line.
2019-01-18 16:27:32 +01:00
Albrecht Schlosser 80ad88555f Sort makedepend files for better comparability
The intention is to improve (and minimize) diffs when dependencies
are changed and `make depend' is executed.

(1) use `makedepend ... -w 20'
(2) `sort -u' the resultant file with some more "magic".

(1) makes sure that there is only one dependent file per line,
(2) makes lines unique since `makedepend' can output one file
    many times which is redundant and makes diffs hard to read.

This uses 'mv', 'grep', and 'sort' in all FLTK library Makefiles.
Image libraries are intentionally left for a later update.
2019-01-18 15:44:24 +01:00
Albrecht Schlosser 9177c6e4cc Fix dependencies (STR 3506)
test/fracviewer.cxx wouldn't be compiled if the ABI version was
changed with configure and `make' was executed w/o `make clean'.
Add 'fracviewer.cxx' to list of source files to fix this.

Also add missing unittest_scrollbarsize.cxx to dependencies of
unittests.o.

Finally run `makedepend' to update dependencies.

Note: cherry-picked from branch-1.3 and adjusted to fit master (1.4)
2019-01-18 14:09:44 +01:00
Matthias Melcher 2f0e45e7a7 Android CMake: icons, docs, more apps 2019-01-17 21:29:24 +01:00
Matthias Melcher 111985665d Andoird CMake: trying to autocreate Fluid files 2019-01-17 00:49:44 +01:00
Matthias Melcher 563baced13 Android CMake: fix, more autogenerated files
Fixed a bug that would cause an error is Android Build was NOT
defined. Creating list of test targets automatically.
2019-01-16 02:12:29 +01:00
Matthias Melcher 6de1c93e54 Android CMake: macro for multiple tests
Added a macro that creates the IDE files for a named test.
This is just a rough layout and will only work for the
simpelest of test targets.
2019-01-16 01:25:59 +01:00
Matthias Melcher a4fc8b06e1 Fixed typo in test/Cmake 2019-01-15 01:32:26 +01:00
Matthias Melcher b450cea7e2 Android: starting to use CMake to build AndroidStudio files. 2019-01-15 01:22:18 +01:00
Matthias Melcher bf48acdbe5 Adding documentation for '@N', inactive color. 2018-12-29 02:16:40 +01:00
Matthias Melcher c099837a3e Also testing # as a format_char() 2018-12-29 02:08:40 +01:00
Matthias Melcher 95ab1dd73e Fixing STR #2901, wrongly escaping the formatting character code in Fl_Browser. 2018-12-29 02:03:49 +01:00
Matthias Melcher 29fe0c43df Remove obsolete condition to make static analysis happy. 2018-12-29 01:19:51 +01:00
Albrecht Schlosser 2153a93430 Fix line endings.
Note: we recommend `git config core.autocrlf true'.
2018-12-20 19:42:17 +01:00
Albrecht Schlosser 7458281545 Rename README files to README.txt (and several similar files).
Files without '.txt' suffix can't be handled well by Windows (users),
hence renaming such text files to *.txt makes FLTK more "Windows-friendly".

There are a few exceptions (this is intentional): README and other files
in bundled libraries (maintained upstream) are not changed.
2018-12-10 16:50:56 +01:00
ManoloFLTK 6c876189d8 Fix MacOS-specific regression appeared with move to git when building test with configure.
The svn contained empty directories, e.g., test/blocks.app/Contents/MacOS/
Git apparently can't store empty directories.
The test/Makefile is modified to create these directories at build-time.
2018-12-09 16:34:49 +01:00
ManoloFLTK d087bae685 These binary files should not be committed. 2018-12-09 16:00:20 +01:00
ManoloFLTK 04f03ff056 Necessary for correct app bundles 2018-12-09 15:53:40 +01:00
Albrecht Schlosser 474d6e2393 Fix 'fluid.app' for case sensitive macOS file systems.
Change 'Fluid.app' to 'fluid.app'.

Also changed documentation and (https) links in modified files.
2018-12-04 14:20:33 +01:00
Greg Ercolano d65a5a073c Control resizing behavior of UI buttons
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13099 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 19:59:57 +00:00
Greg Ercolano 554d7d3639 Tooltip for browse button, and include a fallback label if icon not found.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13098 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 19:33:11 +00:00
Greg Ercolano cfe555f410 Print both returned path and relative path in tty.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 18:33:37 +00:00
Albrecht Schlosser bf19362179 Add missing Fl_Cairo_Window constructors (STR #3160).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-27 09:05:12 +00:00
Manolo Gouy 305e5dd21e Try dummy commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12990 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-02 15:21:57 +00:00
Albrecht Schlosser d490abdce3 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 20:44:46 +00:00
Matthias Melcher b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
The original intention of FL_PORTING was to mark all places in the
source code where changes are required to port FLTK to a new platform.
Thanks to the driver system, this approach has become somewhat
misleading, so I removed all references.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 17:04:18 +00:00
Matthias Melcher 7e8687f8c8 Android: listed all remianing issues with all test programs
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12961 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-21 22:24:40 +00:00
Matthias Melcher e1bf7b9202 Android: Clearing the desktop when a window is hidden.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12949 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-19 16:29:20 +00:00
Manolo Gouy 396e4f41cf Check also proper RGB image deletion after use.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12924 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-22 08:39:39 +00:00
Manolo Gouy 4ede9cec29 New Fl_Image_Surface::rescale() class function and document equivalence between Fl_Offscreen-based and Fl_Image_Surface-based approaches.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-07 13:43:28 +00:00
Manolo Gouy c6109d9a18 Deprecate Fl_Image_Surface::highres_image() because Fl_Image_Surface::image() is enough now images are scalable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12905 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06 15:59:08 +00:00
Albrecht Schlosser 2e9ba0a10e Update fluid (.fl) files.
src/Fl_Help_Dialog.fl: Add one missing declaration.

Other files: update (fluid -u) and update source (fluid -c).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12887 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-01 10:58:16 +00:00
Albrecht Schlosser efc3ec1b7b Remove unnecessary dependency on FL/Fl_Rect.H.
Fl_Rect.H is no longer included by Fl_Group.H to avoid unnecessary
dependencies on Fl_Rect.H. Currently it is only needed to access the
array returned by the protected method bounds().

Also clarified documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 12:58:10 +00:00
Albrecht Schlosser 5e98a9e292 Remove unused variable, update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 21:10:53 +00:00
Greg Ercolano bf0c9d4c6a Added global Fl::visible_focus() checkbox.
Also fixed tab navigation order of some widgets, and +/1 heights with a few checkboxes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 19:52:37 +00:00
Matthias Melcher f49267e85b Android: Drawing RGB image data on the fly via callback
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-01 16:06:12 +00:00
Greg Ercolano 309d9a61b9 Added Fl::menu_linespacing() to solve STR# 2927.
Method name follows Fl_Tree::linespacing().
Implemented similarly to Fl::scrollbar_size(), since its use crosses Fl_Menu_Item and 'menuwindow' classes.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 17:17:37 +00:00
Matthias Melcher 42555053a1 More Android changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12699 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-02 20:03:04 +00:00