Commit Graph

8857 Commits

Author SHA1 Message Date
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 b0e0c355ed Update doc of Fl_Help_View following addition of html entity † 2020-07-01 16:10:31 +02:00
ManoloFLTK 64de9bd3fc Add "†" HTML entity. 2020-07-01 11:58:41 +02:00
ManoloFLTK e98d7d8df5 Fix test/help_dialog for CMake building and macOS platform. 2020-07-01 11:02:53 +02:00
Albrecht Schlosser 3b249de60a Clarify documentation (STR 3532)
Make clear that Fl::repeat_timeout() must only be called for the
same timeout it is handling. Related STR's:

https://www.fltk.org/str.php?L3532
https://www.fltk.org/str.php?L3516
2020-06-30 15:28:35 +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
ManoloFLTK 93f19c3a24 Add files needed when building libpng for the arm64 architecture.
These files can be compiled-in for other architectures but produce no binary code.
2020-06-24 21:55:39 +02:00
Albrecht Schlosser 1da349579d Fix static code analyzer warnings
Note: there's more to do ...
2020-06-24 20:20:11 +02:00
Albrecht Schlosser 4c9b44f01e Update README.Pico.txt
- fix typos and minor, obvious errors
- reformat small parts
- remove trailing whitespace
2020-06-24 20:05:06 +02:00
Albrecht Schlosser c12408b53f Avoid crash in Fl::next_window(win)
As documented, Fl::next_window(win) must only be called with a valid
*shown* window. The old code would crash if the argument was NULL
or the window was not shown.

The new code avoids the crash, issues an error message, and returns
NULL to the caller.
2020-06-24 19:58:33 +02:00
Taeril 930013638b Quick fix for inability to link with pango from fltk-config
Commit 6fe226cb80 introduced use of
pkg-config which broke linking from fltk-config if FLTK was
configured to use pango library.

This patch duplicates line from another if branch that just adds
libraries assuming that if pkg-config found pangoxft that there
are present all it's requirements.
2020-06-21 14:29:18 +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
Greg Ercolano 0dc16dd8c9 Added fluid command line '-d' debug flag 2020-06-19 08:59:48 -07:00
Greg Ercolano db07cea758 Fix problem with Windows pids being unsigned DWORDs
Had to get away from overloading PIDs with error codes,
so now error codes are returned separately from the PID.
2020-06-18 18:24:45 -07:00
ManoloFLTK 76da518b97 Document who's responsible for deletion of widget's image labels. 2020-06-18 10:21:28 +02:00
ManoloFLTK 87b73723ed macOS Window menu: select in menu new top window after window deletion 2020-06-17 20:09:15 +02:00
ManoloFLTK 5005d04765 More detailed documentation of Fl_SVG_Image::normalize(). 2020-06-16 12:04:20 +02:00
ManoloFLTK 46b89686df Allow using an Fl_SVG_Image object as window icon.
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
2020-06-15 19:05:47 +02:00
Albrecht Schlosser 91b78572c7 Fix overly restrictive JPEG filter (#81)
See https://github.com/fltk/fltk/issues/81

Fixes #81
2020-06-15 02:17:20 +02:00
Albrecht Schlosser a7a1e1594c Fix stale current_ pointer when deleting Fl_Group
If a user program accidentally deletes the "current" group, then
the pointer would still point at the deleted widget. This commit
prevents this and makes the Fl_Group's parent the current group.

Fixes issue #88.
2020-06-15 01:38:18 +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 6279ab0586 CMake: Deprecate FLTK_USE_FILE (UseFLTK.cmake)
Cherry-pick the essential changes from FLTK 1.3 since this change
had not been ported to 1.4 yet.

To do: my current plan is to consolidate 1.3 and 1.4 CMake files
as far as possible (with the exceptions of source files, obviously)
and to redesign / refactor CMake files later in this process or
maybe only for 1.4 if it turns out to be too much to backport.
2020-06-13 13:51:35 +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
ManoloFLTK e43dee9d8a Fix for "Fullscreen_off removing the icon from the titlebar on MacOS" in fltk.coredev 2020-06-10 17:22:59 +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 3d00b8db4c Improve Fl_SVG_Image docs
- add 'can_expand' optional parameter to scale()
- don't expose name and e-mail of the nanosvg author in docs
- format example code according to the FLTK coding style
- fix (some) trailing spaces

FTR: all examples compile and work well with current FLTK 1.4.
2020-06-07 16:57:40 +02:00
Albrecht Schlosser 1dd4929585 Add two virtual methods to class Fl_Image
(1) The new virtual method Fl_Image::release() which is equivalent to
  'delete this' automatically extends to Fl_Shared_Image::release()
  which makes the latter method virtual.

  This new method in the base class makes Fl_Image::release() callable
  on all objects derived from Fl_Image.

(2) Add virtual method Fl_Shared_Image *Fl_Image::as_shared_image()

  This new method can be used to detect whether an Fl_Image instance
  is an Fl_Shared_Image or not.
2020-06-06 06:27:47 +02:00
ManoloFLTK 6481f95415 Make doc of member function Fl_SVG_Image::resize() more detailed. 2020-06-03 16:03:46 +02:00
ManoloFLTK f9a63b5ed5 Fix for PR#86: mousewheel simultaneous X and Y scrolling under OS X .
Thanks to the OP for most of the fix.
2020-06-02 19:44:57 +02:00
Albrecht Schlosser 09ee1c0b9c (Git) ignore .vscode folder
The "Visual Studio Code" editor (Open Source by Microsoft) is
becoming more and more popular. It uses a (hidden) folder '.vscode'
in the workspace root directory to store its configurations. We
need to ignore this folder to avoid confusing developers and
checking it in by accident.

See https://github.com/Microsoft/vscode
2020-06-02 14:41:15 +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 59a87fe795 Improve Fl_Preferences documentation
This commit fixes typos and reformats some of the documentation.
No code changes.
2020-06-01 18:53:56 +02:00
ManoloFLTK 61d9035e99 Avoid repeated calls to CGBitmapContextGetBytesPerRow(). 2020-06-01 11:04:46 +02:00
ManoloFLTK 897b903f16 Have NSAutoreleasePool released after last use of variable e 2020-05-31 21:19:26 +02:00
ManoloFLTK 9957063398 Protect NSHomeDirectory() call by an NSAutoreleasePool.
That may be necessary if preferences are accessed before fl_open_display() was called.
2020-05-31 11:47:34 +02:00
Albrecht Schlosser adb2a719d4 Fix fluid undo/redo menu activation and deactivation
(1) fix typo in recent commit
(2) deactivate undo/redo menus on startup and after reset

Fixes issue #84
2020-05-24 22:24:48 +02:00
Greg Ercolano dcfe826b2f Fix broken undo
Replaced hardwired index#s for undo/redo menu items with dynamic lookup.
2020-05-24 09:02:24 -07:00
Albrecht Schlosser ec15ac6c89 Fix documentation typos and formatting 2020-05-24 14:18:08 +02:00
Albrecht Schlosser b1a2c28ad6
Update link in README.md
Sorry for the noise, links with markdown notation don't seem
to work in README.md.
2020-05-24 13:45:58 +02:00
Albrecht Schlosser e383e73538
Fix filename and remove obsolete info
The file README has been renamed to README.txt some time ago.
2020-05-24 13:43:43 +02:00
ManoloFLTK 026d560fb4 Reorganise code that captures on-screen window content.
Also introduce new rect_to_NSBitmapImageRep: method of class FLWindow
which makes it possible to reimplement it.
2020-05-20 07:51:33 +02:00
Newton a432db8ca3 Fix "misleading indentation" in Fl_Text_Buffer.cxx
Compiling with clang produced the following warning on this line:

src/Fl_Text_Buffer.cxx:1292:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
    replace(start, end, text);
    ^
src/Fl_Text_Buffer.cxx:1288:3: note: previous statement is here
  if (!sel->position(&start, &end))
  ^
2020-05-15 23:08:33 +02:00
ManoloFLTK 7f7e0e4ea1 Replace Fl_Window_Driver::is_a_rescale() by Fl_Window::is_a_rescale()
so it can be called by any user code.
2020-05-08 17:08:33 +02:00
Albrecht Schlosser ccb06e18b7 Fix doxygen docs (wrong argument name) 2020-05-08 12:34:37 +02:00
Albrecht Schlosser 70ce08e0cb Improve fluid documentation
- remove trailing whitespace
- reformat for better readability
- fix typos
2020-05-08 12:31:26 +02:00
Albrecht Schlosser 4ab49d30d3 Merge branch 'pr-30_fl_message_position'
Merge PR #30 with extensions to position the message box centered
over given coordinates or a widget or window.
2020-05-07 17:46:23 +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
airbrett ee7577a897 Add (x,y) positioning mode to common dialogs
Add new function to set (x,y) position.
Reset to previous mode after innards is called by fl_* function.
Use magic number for preferred position state.

Note: several commits squashed and commit messages edited by AlbrechtS.
2020-05-07 14:59:19 +02:00
ManoloFLTK f386bd2cb7 Support case when window is fullscreen - continued 2020-05-04 11:33:43 +02:00