summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-14Windows: convert error message to UTF-8Albrecht Schlosser
We need to get the error message in "wide character" format and convert it to UTF-8. The conversion would truncate it if the buffer was too small, hence we don't need to check for overflow. Tested on Windows 10 with VS 2010, including (faked) error codes with non-ASCII characters (German).
2020-07-14setlocale() added to Fl_File_Chooser demosGreg Ercolano
This change ensures errors in local language. See issue #99 for discussion on why this is needed.
2020-07-14Extra fool-proofing, and suggested use of strerror_r()Greg Ercolano
strerror_r() sounds like the better thing to use, but if you read the man page carefully, there are pitfalls of competing GNU vs POSIX versions of the same function, with different return values. GNU version returns a pointer to the error string, which may or may not use the error string supplied to use. Makes no sense. Why not use the buffer the user prepared? Makes returning errors hard. One thing GNU does underline is the string is always NUL terminated. POSIX version doesn't return a string at all, it returns an int, making handling the GNU cases impossible. POSIX /doesn't/ say one way or the other about the string being NUL terminated, so you have to make sure when you use it. I trawled the net, seems this is a big annoying issue. For now, leaving the code with strerror(), but we should change it.
2020-07-14First pass at fixing issue 99Greg Ercolano
A lot of code touched because low level functions needed to pass up error messages reliably, and this had to propagate up the entire driver hierarchy. Tested OK *in English* on: > Linux > OSX 10.10.x > Windows VS2017 > Windows mingw64 I have no way to test on Android, but it might work. TODO: Needs testing in other languages to verify proper UTF8 error messages, esp. with Windows VS, due to complexities with FormatMessage() -- see get_ms_errmsg()
2020-07-13add resize documentation as per STR3433Duncan Gibson
add resize chapter to documentation, plus images, 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-13A few extra comments for table-spreadsheet.Greg Ercolano
Also small but unnecessary code change to reset row_edit/col to zero after editing for example clarity. Unnecessary b/c those vars are ignored anyway when input visibility turned off, so change is more cosmetic codewise.
2020-07-12Update Fl_Window docs, fix typosAlbrecht Schlosser
No source code changes
2020-07-11Fluid: fix "trailing whitespace" errors (#100)Albrecht Schlosser
Fluid would write trailing whitespace at some points when generating .cxx and .h files from .fl files. This was an old issue but became obvious since we removed trailing whitespace from source and header files recently. This commit fixes all whitespace errors in files generated from .fl files in the FLTK repository, i.e. in fluid/, src/, and test/ folders. I can't guarantee that I found all possible whitespace errors, but this commit: Fixes #100
2020-07-11Simpler code to support layer-based views that occur when macOS ≥ 10.14ManoloFLTK
2020-07-11Fix for building without print support (GitHub issue #98).ManoloFLTK
2020-07-10Convert Fl_Group::array_ to union to better represent its behaviorRobert Schumacher
Amended by Albrecht: - rename union member variables as discussed - add comments to new array_ union members Fixes #96 Signed-off-by: Albrecht Schlosser <albrechts.fltk@online.de>
2020-07-06Shortcut tooltip elaborates on how to clear shortcutGreg Ercolano
A user was having trouble figuring this out on fltk.general, seemed like a tooltip could have helped, so added it.
2020-07-06Add member function FILE* Fl_PostScript_File_Device::file()ManoloFLTK
2020-07-06Improve control of sheet containing file dialog window.ManoloFLTK
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- 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-01Update doc of Fl_Help_View following addition of html entity &dagger;ManoloFLTK
2020-07-01Add "&dagger;" HTML entity.ManoloFLTK
2020-07-01Fix test/help_dialog for CMake building and macOS platform.ManoloFLTK
2020-06-30Clarify documentation (STR 3532)Albrecht Schlosser
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-29Move class Fl_SVG_File_Surface from libfltk to libfltk_images.ManoloFLTK
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-27Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.ManoloFLTK
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-24Add files needed when building libpng for the arm64 architecture.ManoloFLTK
These files can be compiled-in for other architectures but produce no binary code.
2020-06-24Fix static code analyzer warningsAlbrecht Schlosser
Note: there's more to do ...
2020-06-24Update README.Pico.txtAlbrecht Schlosser
- fix typos and minor, obvious errors - reformat small parts - remove trailing whitespace
2020-06-24Avoid crash in Fl::next_window(win)Albrecht Schlosser
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-21Quick fix for inability to link with pango from fltk-configTaeril
Commit 6fe226cb804d000b29ea53e08acc505267fd44de 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-21Remove superfluous dependency on forms libraryAlbrecht Schlosser
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-19Added fluid command line '-d' debug flagGreg Ercolano
2020-06-18Fix problem with Windows pids being unsigned DWORDsGreg Ercolano
Had to get away from overloading PIDs with error codes, so now error codes are returned separately from the PID.
2020-06-18Document who's responsible for deletion of widget's image labels.ManoloFLTK
2020-06-17macOS Window menu: select in menu new top window after window deletionManoloFLTK
2020-06-16More detailed documentation of Fl_SVG_Image::normalize().ManoloFLTK
2020-06-15Allow using an Fl_SVG_Image object as window icon.ManoloFLTK
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
2020-06-15Fix overly restrictive JPEG filter (#81)Albrecht Schlosser
See https://github.com/fltk/fltk/issues/81 Fixes #81
2020-06-15Fix stale current_ pointer when deleting Fl_GroupAlbrecht Schlosser
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-13CMake: Build static and shared libs side-by-sideAlbrecht Schlosser
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-13CMake: Deprecate FLTK_USE_FILE (UseFLTK.cmake)Albrecht Schlosser
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-13Update dependenciesAlbrecht Schlosser
Change sort order using -f (--ignore-case): fold lower case to upper case characters
2020-06-10Fix for "Fullscreen_off removing the icon from the titlebar on MacOS" in ↵ManoloFLTK
fltk.coredev
2020-06-10Support cross-compilation with autotoolsAlbrecht Schlosser
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-07Improve Fl_SVG_Image docsAlbrecht Schlosser
- 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-06Add two virtual methods to class Fl_ImageAlbrecht Schlosser
(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-03Make doc of member function Fl_SVG_Image::resize() more detailed.ManoloFLTK
2020-06-02Fix for PR#86: mousewheel simultaneous X and Y scrolling under OS X .ManoloFLTK
Thanks to the OP for most of the fix.
2020-06-02(Git) ignore .vscode folderAlbrecht Schlosser
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-01test/clock: close both windows togetherAlbrecht Schlosser
The new window callback demonstrates how to close all (both) windows when the user closes one window.
2020-06-01Improve Fl_Preferences documentationAlbrecht Schlosser
This commit fixes typos and reformats some of the documentation. No code changes.
2020-06-01Avoid repeated calls to CGBitmapContextGetBytesPerRow().ManoloFLTK
2020-05-31Have NSAutoreleasePool released after last use of variable eManoloFLTK
2020-05-31Protect NSHomeDirectory() call by an NSAutoreleasePool.ManoloFLTK
That may be necessary if preferences are accessed before fl_open_display() was called.