Commit Graph

2130 Commits

Author SHA1 Message Date
ManoloFLTK d51481f95e Remove FL_CFG_SYS_WIN32 preprocessor variable from fl_draw_pixmap.cxx 2021-02-16 11:58:15 +01:00
ManoloFLTK 06793c50fb Create virtual Fl_RGB_Image* Fl_Gl_Window_Driver::capture_gl_rectangle() 2021-02-16 10:26:52 +01:00
Albrecht Schlosser bbaec9bd88 Update CMake and make files, minor edits only
There are no functional changes to be expected, mostly formatting
and comments.
2021-02-15 19:45:20 +01:00
Albrecht Schlosser 67bd27a2be Fix comments and documentation 2021-02-12 00:39:13 +01:00
Albrecht Schlosser 246291fe51 Make Fl_Gl_Window::gl_driver() private (#184)
The driver stuff should be private. The only usage I found was in
class _Fl_Gl_Overlay which is now a 'friend class'.
2021-01-29 14:11:19 +01:00
Albrecht Schlosser d7af409f42 Remove "Figure x.y: " from html image captions
... as discussed in fltk.coredev for easier maintenance.

Also edit some minor issues.
2021-01-13 22:52:33 +01:00
ManoloFLTK 018134161d Documentation: clarify how keypad keys are named. 2020-11-23 11:44:42 +01:00
ManoloFLTK f56d43c9f6 Rename private member function with trailing underscore. 2020-11-19 15:59:48 +01:00
Albrecht Schlosser 5cb72ef065 Fix whitespace and minor formatting issues 2020-11-17 16:11:03 +01:00
ManoloFLTK 2931c29689 Replace virtual Fl_RGB_Image::cache_size() by virtual Fl_Image::cache_size() 2020-11-17 11:23:35 +01:00
ManoloFLTK 18ae6c84eb Remove unnecessary friend declaration in class Fl_SVG_Image 2020-11-14 10:06:51 +01:00
ManoloFLTK a4bacf83c4 Fix for issue #155 - continued
Restores proper separation of what is in libfltk and what is in libfltk_images
2020-11-12 14:50:57 +01:00
ManoloFLTK 231159e16c Fix for issue #155 - continued
The issue lies in details how floating point scaled coordinates are converted
to integer values and its impact on the drawing of large SVG images.
This commit fixes the X11 platform.
The macOS platform is immune because drawing uses floating point
coordinates.
The Windows platform still needs fixing.
2020-11-12 07:46:12 +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 5132bb6a06 Clarify doc about how FLTK_SCALING_FACTOR operates. 2020-11-03 08:13:45 +01:00
ManoloFLTK 1761523c9e Add Fl_PostScript_File_Device::close_command(Fl_PostScript_Close_Command cmd)
Also expand Doxygen doc of class Fl_Printer for the X11 platform.
2020-11-01 09:26:40 +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 0d8385a652 Simpler macOS implementation of capture of window titlebars. 2020-10-12 21:05:38 +02:00
ManoloFLTK 27c791ae8a More documentation of enum Fl_Paged_Device::Page_Format 2020-09-27 17:28:42 +02:00
ManoloFLTK d20c68a495 More Doxygen information for enum Fl_Paged_Device::Page_Format. 2020-09-25 16:13:45 +02:00
Albrecht Schlosser f072cec13f Improve and clarify documentation 2020-09-21 13:45:46 +02:00
Albrecht Schlosser 360040d0bf Improve Fl_Menu_Item docs and inline deprecated methods
The deprecated methods are now calling the new methods to be
entirely compatible.

These methods should be removed in 1.5.0

(fix unrelated whitespace as well)
2020-09-18 17:17:36 +02:00
ManoloFLTK b279c11d34 Fix use of "\deprecated" Doxygen commands. 2020-09-18 15:51:00 +02:00
Albrecht Schlosser 2392589f05 Return 1 from Fl_Menu_Item::value() for checked items
Previously (FLTK 1.3.x) the return value of a checked menu item
was FL_MENU_VALUE (4) but the docs warned explicitly:

"You should not rely on a particular value, only zero or non-zero."
2020-09-18 13:41:16 +02:00
Greg Ercolano 6f04232dd9 Added Fl_Text_Display::style_buffer(), solves issue #138 2020-09-16 13:33:05 -07:00
ManoloFLTK dcea1dafe1 More detailed doc of Fl_Window::decorated_w() and decorated_h(). 2020-09-09 18:00:24 +02:00
Albrecht Schlosser 0e4137f66b
Fix Fl_Check_Browser.{H|cxx} indentation (#121) (#132)
* Fix Fl_Check_Browser.{H|cxx} indentation (#121)

... and some more whitespace errors as proposed by Greg
... in issue #121: Fl_Check_Browser--whitespace-patch.txt

Fixes #121

* Fix copyright years
2020-09-06 20:02:02 +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 a4f6badfcd Improve 'Fl_When' enum documentation 2020-08-24 15:14:48 +02:00
ManoloFLTK 32c316b78f Add Fl_Window::screen_num(int) to fully control window location
on multi-screen systems having distinct per-screen scaling factors.
2020-08-14 16:44:20 +02:00
Greg Ercolano 2141c63628 Implement + deploy fl_strdup() 2020-08-01 14:19:40 -07:00
ManoloFLTK 889acc7d74 Fix use of an SVG image in Fl_Tiled_Image when display is rescaled. 2020-07-30 17:41:35 +02:00
Albrecht Schlosser bfb3b3abd8 Remove typedefs Fl_String and Fl_CString
These unused typedefs are not used anywhere and should not be defined
at all.

Remove typedef 'Fl_String' as decided in fltk.coredev.
Remove typedef 'Fl_CString' as well for the same reason.
2020-07-24 20:12:06 +02:00
Duncan Gibson 46c1500bf3 fix doxygen links in Fl_Group.H
fix dead links to Fl_Group::resizable(Fl_Box *box)
reorder paragraphs to highlight different behaviour
add link to new "How does resizing work?" chapter in dox
2020-07-15 19:43:21 +02:00
Greg Ercolano 0693c70f57 First pass at fixing issue 99
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-14 12:52:56 +02:00
Albrecht Schlosser 9925b0f128 Update Fl_Window docs, fix typos
No source code changes
2020-07-12 18:06:03 +02:00
ManoloFLTK 2984fe638c Fix for building without print support (GitHub issue #98). 2020-07-11 12:21:25 +02:00
Robert Schumacher 8d5eed3c82 Convert Fl_Group::array_ to union to better represent its behavior
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-10 18:09:28 +02:00
ManoloFLTK 2f0be9d537 Add member function FILE* Fl_PostScript_File_Device::file() 2020-07-06 21:01:42 +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 b0e0c355ed Update doc of Fl_Help_View following addition of html entity &dagger; 2020-07-01 16:10:31 +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 76da518b97 Document who's responsible for deletion of widget's image labels. 2020-06-18 10:21:28 +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 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
Albrecht Schlosser ec15ac6c89 Fix documentation typos and formatting 2020-05-24 14:18:08 +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