Commit Graph

7812 Commits

Author SHA1 Message Date
Manolo Gouy
5cff9760e5 X11 platform: Allow running with old (< 2.36) versions of libglib-2.0
These versions require calling g_type_init(). Newer versions don't.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12464 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-20 15:35:26 +00:00
Manolo Gouy
da2d4a8ee5 Convert the initialisation of global variables fl_local_shift, fl_local_meta, etc... using the driver approach.
This avoids repeating the default values "Shift", "Meta", etc... for several platforms.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19 19:33:54 +00:00
Greg Ercolano
213b955442 Added control for when() to test browser's callback behavior.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19 17:17:44 +00:00
Manolo Gouy
cc93c29f14 Fl_XXX_System_Driver::clocale_printf() : use thread-specific, locale-setting APIs where possible
This commit uses thread-specific, locale-setting functions under Linux and MSWindows-Visual Studio
They are already used by the Mac OS system driver, when possible.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12461 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19 11:38:51 +00:00
Manolo Gouy
b258f4b029 SVG support: avoid re-rasterizing an image that was previously rasterized at higher resolution.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12460 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-18 12:15:08 +00:00
Greg Ercolano
e483ee8885 Reverting to previous; apparently this was a bug in doxygen 1.7.4's support of header markdown.
The following is valid, documented, "standard markdown" for headers in doxygen:

    This is a level 1 header
    ========================

    This is a level 2 header
    ------------------------

Upgrading doxygen from 1.7.4 to 1.8.13 fixed the problem.
So beware of 1.7.4 wrt to these kinds of header markdown;
the result in the docs was no header, the header text + underbars
were appearing inline with the text, crlfs removed.

Not sure exactly what version of doxygen this was fixed in;
a search in their bugzilla for 'headers' seemed to show no
directly relevant matches, other than maybe bug #681898.
https://bugzilla.gnome.org/show_bug.cgi?id=681898



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-14 00:50:36 +00:00
Greg Ercolano
b2c94264d9 Doxygen fix: The trick of using a line of dashes under a section heading no longer works.
This has been working fine for years, not sure what version of doxygen dropped this.
I'm running 1.7.4 here, and that trick isn't working for the Fl_Browser_.H docs.

Changed to using <B> and </B> and <BR> which seems to work OK in both HTML and PDF
generation.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12458 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 23:25:59 +00:00
Greg Ercolano
5a95655c99 Fixed small doxygen inconsistencies for do_callback value.
Internally Fl_Browser passes the raw value of when() as the
"do_callbacks" value, so it's important that ALL non-zero values
mean "do the callback' (and not just 1).



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12457 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 21:56:49 +00:00
Manolo Gouy
435d135825 SVG support: draw images at full screen resolution also when there are several pixels per graphical unit, as with Apple retina displays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12456 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 16:15:34 +00:00
Manolo Gouy
be7e7f0ee8 Mac OS: use Fl_Graphics_Driver::has_feature(PRINTER) to detect when drawing to a printer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12455 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 07:28:35 +00:00
Manolo Gouy
8767da2dfd Mac OS: explain more accurately in comments how the tricky part of printing an Fl_RGB_Image is handled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12454 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 06:29:16 +00:00
Greg Ercolano
a1ab2eb7b2 Demo image for Fl_Multi_Label docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12453 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:12:47 +00:00
Greg Ercolano
6779015697 Add reference to image in docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:12:21 +00:00
Greg Ercolano
e2a28fa071 Add divider above Quit menu item. (needed for demo screenshot)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:10:25 +00:00
Albrecht Schlosser
900314d4f4 Documentation and copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 15:26:36 +00:00
Albrecht Schlosser
141c3594d2 Fluid: remove redundant code, fix FL_IMAGE_LABEL labeltype.
Remove leading underscore from _FL_IMAGE_LABEL.
Remove redundant assignment of image().

Thanks to Greg for finding these issues.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 13:44:15 +00:00
Albrecht Schlosser
a6803d71c6 Remove leading underscore from labeltyps as far as possible.
Removed obsolete '\todo' item from docs (done with recent commits).

Removed redundant code from label assignment (e.g. use FL_IMAGE_LABEL
instead of label type assignment + use of _FL_IMAGE_LABEL).

See recent commits.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 13:05:48 +00:00
Albrecht Schlosser
e629a9275b Fluid: align internal tables (no code changes).
Note: tab width 8.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12447 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 12:55:30 +00:00
Albrecht Schlosser
163b2d4868 Update ignored files: new example howto-menu-with-images.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12446 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 12:49:48 +00:00
Greg Ercolano
3fe7b8c396 Doxygen Fl_Multi_Label example code added. (STR #3400)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12445 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 21:27:53 +00:00
Albrecht Schlosser
3d90148065 Remove leading underscore from labeltype(s) in new demo.
Since svn r12443 we can use all labeltypes (including FL_IMAGE_LABEL and
FL_MULTI_LABEL) w/o leading underscore. We can also use both documented
variants to assign an FL_MULTI_LABEL to an Fl_Menu_Item.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12444 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 19:06:32 +00:00
Albrecht Schlosser
322208b855 Add missing Fl_Labeltype and Fl_Boxtype definitions.
Some labeltypes and boxtypes were missing a #define for the enum
without a leading underscore and the corresponding setup function
to initialize the internal table of boxtypes and labeltypes, for
instance _FL_MULTI_LABEL. This is now fixed so (hopefully) all boxtypes
and labeltypes can and _should_ be used w/o leading underscore.

Note: if there are still boxtypes or labeltypes that can't be used w/o
leading underscore this should be considered a bug and is to be fixed ASAP.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:54:10 +00:00
Greg Ercolano
2670903db9 Simplified the example's menu item callback.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:36:35 +00:00
Greg Ercolano
2a41af1fc3 Applied Manolo's recommendation (fltk.coredev), removing unnecessary item->image(*pixmap) call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:12:58 +00:00
Greg Ercolano
88204a5524 Added example code to demonstrate Fl_Multi_Label for STR#3400.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 00:50:06 +00:00
Albrecht Schlosser
b0a2223642 Fix compiler warning and potential error in PNG error handling.
Compilation with gcc -Wall -Wextra displayed the following warning:

Fl_PNG_Image.cxx: In member function ‘void Fl_PNG_Image::load_png_(const char*, const unsigned char*, int)’:
Fl_PNG_Image.cxx:118:9: warning: variable ‘fp’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]

Making the variable static and initializing it properly avoids this
potential error in the PNG lib's error handling.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12439 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-10 11:38:23 +00:00
Manolo Gouy
4a8e829f09 Set svn ps for this new file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12438 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:58:22 +00:00
Manolo Gouy
c0cc3d4160 These files are no longer used. They are replaced by nanosvg.h and nanosvg.diff.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:53:10 +00:00
Manolo Gouy
9dfef1c5f7 Differences between the FLTK-modified and the nanosvg versions of file nanosvg.h
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:51:06 +00:00
Manolo Gouy
a0e7cbfa57 Fix nanosvg implementation of nsvg__atof() to allow compilation with Visual Studio 7.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12435 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:47:04 +00:00
Manolo Gouy
a03f8490e6 #include <locale.h> is no longer needed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12434 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 12:52:39 +00:00
Manolo Gouy
8e558595e6 Make virtual member function Fl_Image::draw_scaled(int X, int Y, int W, int H) protected rather than private.
Consequently, remove the trailing _ from its name reserved for private class members.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12433 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 12:35:06 +00:00
Albrecht Schlosser
ae983b74f2 Enhance howto-drag-and-drop example program.
Refer to discussion if fltk.general, thread "Drag and drop issue"
in August September 2017.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-08 15:02:04 +00:00
Manolo Gouy
0bf5f9809a Modify nanosvg.h to support compilation by Visual Studio 7.
This is a new implementation that does not tamper with the program's locale.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12431 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-07 20:16:08 +00:00
Manolo Gouy
a222837123 Simplify code using plain atof() instead of implementing function nsvg__atof().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12430 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 19:38:56 +00:00
Greg Ercolano
457fb7c0b2 Changed AC_CHECK_HEADER -> AC_CHECK_HEADERS, since two files are being tested, e.g.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 18:06:30 +00:00
Greg Ercolano
3ef0e0d1c4 Small fix to remove an extra paren introduced in r12153
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 17:49:05 +00:00
Manolo Gouy
d5cc04b2bc Set svn ps for this new file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:52:10 +00:00
Manolo Gouy
d383b82e7e Gives differences between FLTK and original versions of file nanosvg.h
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12426 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:51:14 +00:00
Manolo Gouy
a2d9a6a6c4 Return fl_nanosvg.h close to nanosvg.h, without reformatting.
fl_nanosvg.h had before been reformatted by Xcode.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12425 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:49:05 +00:00
Manolo Gouy
0dd8392ae9 Set svn ps for this new file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12424 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:38:11 +00:00
Manolo Gouy
950ec3e863 Modify how the nanosvg source code is used to support compilation with Visual Studio 7.
1) The original nanosvg.h file is modified for FLTK in file fl_nanosvg.h. The only change is
to remove the implementation of function nsvg__atof().

2) FLTK provides an implementation	of nsvg__atof() based on sscanf().

3) FLTK changes the LC_NUMERIC locale to "C" before calling nanosvg
and resets it to its previous state after.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:25:42 +00:00
Greg Ercolano
16f968b40f Added the new OPTION_USE_NANOSVG to the README.CMake.txt file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12422 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 00:02:33 +00:00
Greg Ercolano
a4433ca19d Emphasize in the docs that ".." at the end of cmake commands is
not an elipsis, but is part of the command.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-05 22:37:07 +00:00
Manolo Gouy
276b8255e2 Improve doc of the Fl_SVG_Image public constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12420 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:38:06 +00:00
Manolo Gouy
dd9f32c3f5 Fix typo in documentation of Fl_SVG_Image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:30:19 +00:00
Manolo Gouy
c42b4717a9 Fix erroneous Doxygen command in doc of Fl_SVG_Image::resize().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12418 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:06:26 +00:00
Manolo Gouy
722faf50cf Class Fl_SVG_Image: use fl_fopen() to open files with non-ASCII characters in name.
Also, have copy() copy the value of the image's proportional member variable.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 07:55:21 +00:00
Manolo Gouy
8f81b81beb Annonce the new Fl_SVG_Image class and related configure/CMake options.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12416 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 14:20:31 +00:00
Manolo Gouy
d6349e180a Set svn:keywords
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:20:52 +00:00