Commit Graph

7798 Commits

Author SHA1 Message Date
Manolo Gouy
f5bd951f5c Slight rewording of the documentation of types fl_intptr_t and fl_uintptr_t.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-12 07:18:36 +00:00
Manolo Gouy
36bcbe8eb0 Rewording of the documentation of types fl_intptr_t and fl_uintptr_t.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-11 18:33:20 +00:00
Manolo Gouy
3ca12a3a02 Document platform-dependent types fl_intptr_t and fl_uintptr_t
Most other platform-dependent types of FL/platform_types.h are also documented.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-11 18:25:11 +00:00
Manolo Gouy
4dde3e5485 Documentation: separate the doc of the 2 versions of Fl::add_fd() as Doxygen mandates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12662 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10 17:51:17 +00:00
Manolo Gouy
c489f3bf6a Fix error when running Doxygen (continued).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12661 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10 17:49:01 +00:00
Manolo Gouy
f42e2bfc4f Documentation: separate docs of Fl::wait() and Fl::wait(double) as Doxygen mandates.
Also, for Fl::run_also_windowless() and Fl::wait_also_windowless(), mention that
MacOS is a platform supporting the windowless mode and what happens with
platforms that don't support it.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10 16:55:25 +00:00
Ian MacArthur
b8ad5c2bd6 Fix trivial typo that was upsetting doxygen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10 00:02:09 +00:00
Albrecht Schlosser
c7b5d61eb0 CMake: add macro fl_debug_var to debug variables.
Some debug messages are included, but currently disabled.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12658 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 20:51:15 +00:00
Manolo Gouy
0012debf37 After r.12653, it is also necessary to remove Fl_Cocoa_Window_Driver::bitmap_from_window_rect()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 17:26:20 +00:00
Manolo Gouy
6f5340d430 Windows: fix fl_overlay_rect() when scaling factor value is > 2
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12656 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 16:59:34 +00:00
Albrecht Schlosser
52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
Albrecht Schlosser
30dad6a4aa CMake: More consistent usage of (IDE) source groups.
Also: add generated header files to project fltk's header files.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12654 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 13:59:04 +00:00
Manolo Gouy
c472d5d8b7 Fix fl_read_image() under MacOS platform when GUI is rescaled.
This commit also simplifies the platform-dependent support of fl_read_image():
only Fl_XXX_Screen_Driver::read_win_rectangle() contains platform-specific
code to capture pixels from the current window or from an offscreen buffer.
Platform-independent function Fl_Screen_Driver::traverse_to_gl_subwindows()
captures subwindows that intersect with the area fl_read_image() targets.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 13:48:22 +00:00
Manolo Gouy
b78b2f7f5f Move xxx_also_windowless member functions from Fl_System_Driver to Fl_Screen_Driver.
Because these functions are related to Fl_Screen_Driver::wait(double)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-08 12:47:40 +00:00
Manolo Gouy
0c8ca7944a Documentation: add \version info to new member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12651 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-08 07:37:43 +00:00
Manolo Gouy
dcc82d8926 STR#3450: Draw text with OpenGL using textures on all platforms.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-07 15:34:44 +00:00
Manolo Gouy
90630409cb Beef up documentation of how FLTK handles cmd-Q/Quit xxx events under MacOS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12648 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-06 17:56:47 +00:00
Manolo Gouy
425ab2e8bc Add support for detection and processing of clean program termination request.
The default handling of cmd-Q/Quit program under MacOS was to terminate the
program if all its windows are closed without returning from FLTK's event loop.
This was running against a strong design feature of FLTK that programs
should always complete their event loop and return from main() when cleanly
terminating.

In the new code for the MacOS platform, cmd-Q/Quit program no longer terminates
the program. Instead, the event loop is interrupted and a call to Fl::program_should_quit()
allows to detect that program termination has been requested, if necessary.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12647 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-06 17:26:11 +00:00
Albrecht Schlosser
4ebaee0f40 Reorganize nanosvg bundled library.
Rename altsvgrast.h to its original name nanosvg.h and use a new
GitHub fork of nanosvg to maintain FLTK specific patches.

https://github.com/fltk/nanosvg

The diff files (altsvgrast.diff and nanosvg.diff) are no longer necessary
and have been removed. For more information see README.bundled-libs.txt.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12646 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-04 21:39:50 +00:00
Albrecht Schlosser
c97fe2e58f Update svn properties.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-04 21:31:54 +00:00
Albrecht Schlosser
b4079d6fd3 Fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-02 17:28:41 +00:00
Albrecht Schlosser
716924d1d4 Fix remaining issue in FL/porting.H.
This file is not used in the normal build process but was intended to
be used as a template for a platform specific file. This is likely
obsolete anyway since the new driver approach no longer uses #ifdef's
to separate platform specific code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 22:49:52 +00:00
Albrecht Schlosser
1d97f94e56 Fix broken Windows and macOS builds.
The check whether mac.H or win32.H were included directly was wrong
after the recent rename of x.H to platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 22:34:48 +00:00
Albrecht Schlosser
42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
This second step replaces FL/x.H with FL/platform.H in all source files.
Dependencies have been adjusted as well.

This commit completes the replacement of FL/x.H with FL/platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 21:17:17 +00:00
Albrecht Schlosser
cc595ce4ed Replace FL/x.H with FL/platform.H - step 1.
This first step replaces FL/x.H with FL/platform.H but keeps a small
FL/x.H that #include's FL/platform.H for backwards compatibility.
Documentation sources in documentation/src/*.dox have been fixed,
but references in other source files need to be fixed in another step.
Dependencies have been adjusted.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 17:46:48 +00:00
Manolo Gouy
12a2fc2a4d X11+pango: correct y position of text in line that was bad for some non-latin scripts and some pango versions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12639 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-18 13:45:45 +00:00
Albrecht Schlosser
18d9891970 Add missing CMake variable FL_VERSION for doxygen docs generation.
Thanks to Jakub Tata-Tyczyński for finding this and reporting it in
fltk.coredev.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12638 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-16 23:45:45 +00:00
Albrecht Schlosser
6408823b3c Remove obsolete replacement of CMAKE_SOURCE_DIR.
The correct fix in the previous commit (svn r12636) would have been to
replace CMAKE_SOURCE_DIR with FLTK_SOURCE_DIR since CMAKE_SOURCE_DIR is
no longer used in doxygen docs generation. Sorry for the noise.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12637 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-16 23:37:14 +00:00
Ian MacArthur
98413277a8 Implement Jakub's patch for the missing FLTK_SOURCE_DIR in
the doxyfile generation of the html docs.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12636 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-16 22:17:58 +00:00
Manolo Gouy
fab28479c7 Avoid crash in Fl_Pixmap::copy() when the source Fl_Pixmap contains bad pixmap data.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-16 06:21:16 +00:00
Albrecht Schlosser
a000e12d6c Fix invalid porsche1.xpm file.
test/pixmaps/porsche1.xpm was likely an experimental version of file
test/pixmaps/porsche.xpm. I fixed it instead of removing because it
looks nice as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12634 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-16 03:05:35 +00:00
Albrecht Schlosser
fbcd3a908a Clarify documentation of Fl_Boxtype.
Fl_Boxtype enum values with leading underscore are reserved and should
not be used. Use the name w/o leading underscore instead.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12633 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-15 15:02:13 +00:00
Manolo Gouy
8a179b577f configure: add checks to avoid incompatible options --disable-xft and --enable-pango and to detect if pango is found but not Xft.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-15 07:09:52 +00:00
Albrecht Schlosser
baffc84fa1 CMake: test option compatibility: Pango requires Xft.
Abort CMake configuration/generation if Xft is disabled or not found
but Pango is requested because Pango requires Xft support. A detailed
warning message is issued before the CMake generation is aborted.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-14 19:34:39 +00:00
Albrecht Schlosser
7aef0cad39 CMake: enable building FLTK in a subdirectory of another project.
Basically replace CMAKE_XXX_DIR with CMAKE_CURRENT_XXX_DIR where
XXX = SOURCE or BINARY.

Patch proposal by cleanrock, FLTK PR #4:
https://github.com/fltk/test-only/pull/4

Patch modified to fix target dirs for test programs and doxygen docs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-10 20:49:03 +00:00
Manolo Gouy
b47dc05909 Fl_Sys_Menu_Bar under MacOS: prevent the FLTK object from receiving events.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12629 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-09 21:12:35 +00:00
Manolo Gouy
3b437dae8c Put a default implementation of parse_color() in Fl_Screen_Driver and only Fl_X11_Screen_Driver reimplements it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-09 07:26:49 +00:00
Manolo Gouy
9f0e9ff813 MacOS + CMake: restore use of OPTION_APPLE_X11 under MacOS 10.13
It's necessary to compile with -mmacosx-version-min=10.8 
and to link with -lfontconfig when Xft is used

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12627 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-08 20:52:48 +00:00
Manolo Gouy
c462635e88 MacOS configure --enable-x11: add needed compilation option under MacOS 10.13
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12626 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-08 10:19:19 +00:00
Manolo Gouy
46d8ef2c1d MacOS: More accurate coordinate computation in rect_to_NSBitmapImageRep() when GUI is rescaled.
The modified statement uses the window height in graphics coordinates that has been truncated to
integer at window creation and resize.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12625 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-07 18:16:52 +00:00
Manolo Gouy
8befad4dba Make Fl_Quartz_Graphics_Driver treat line width similarly with lines and loops
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-05 16:01:39 +00:00
Manolo Gouy
32676b5f56 Some cleaning in comments
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12621 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-05 08:16:42 +00:00
Manolo Gouy
b4521fd1bf Add necessary inline implementation of Fl_SVG_Image::copy(void).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12620 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-04 15:45:59 +00:00
Manolo Gouy
1a341391e7 Add Doxygen comments explaining the purpose of Fl_Window_Driver::draw_begin()/draw_end().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-04 15:23:18 +00:00
Manolo Gouy
8fccb73842 Restore correct fl_overlay_rect() when GUI is scaled (was broken by commit r.12595)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-03 16:28:00 +00:00
Manolo Gouy
5d97cf1f96 Fix comment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-30 10:43:36 +00:00
Greg Ercolano
a7a4098644 Remove the requirement for opengl in fltk-config.
opengl apps were left out of the targets list on purpose
so that only non-opengl apps would build.

TODO: Determine a way to detect the presence of fltk opengl libs
      from within the Makefile using only fltk-config, so as to 
      conditionally build the opengl examples.

      Do NOT use fltk's own build system (../makeinclude or cmake)
      to determine this, so the Makefiles will work as user examples.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-29 18:47:28 +00:00
Manolo Gouy
2d7a670e28 Remove 'friend class Fl_PicoSDL_Window_Driver' from Fl_Window.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-29 07:45:27 +00:00
Manolo Gouy
b2ce33fcfd Definition of class Fl_Window: use 'private:' more accurately
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-29 07:25:50 +00:00
Albrecht Schlosser
cf198735de CMake: Fix missing WIN32 definition on Windows platforms.
Although some Windows compilers still #define WIN32, more and more
standard compliant compilers only #define _WIN32. FLTK *did* #define
WIN32 for all Windows targets with autoconf/configure, but that bit
was lost for CMake builds. This is necessary until we replace WIN32
with _WIN32 throughout the Windows specific code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-28 22:59:44 +00:00