Commit Graph

7804 Commits

Author SHA1 Message Date
Manolo Gouy
a92b628774 MacOS: slightly simpler implementation of Fl_Cocoa_Window_Driver::wait_for_expose().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12510 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-18 04:24:51 +00:00
Manolo Gouy
fae02f2b4d Mac OS: complete changes needed for 10.13 "High Sierra" regarding how FLTK applications start.
With MacOS 10.13 "High Sierra", it was necessary to change what happens at application start time.
The new procedure is:
fl_open_display() calls [NSApp run], and during this call:
     the main event loop is started;
     the app delegate receives an openFile: message for each file dropped on the app icon. Each
           such filename is memorised in an NSMutableArray called dropped_files_list;
     the app delegate receives applicationDidFinishLaunching and stops the main event loop
           (this seems to occur unpredictably after the first openFile: message or after all of them).
When the FLTK event loop begins, it checks whether dropped_files_list is empty. If it is not,
   the first element of this list is a filename which is opened and is removed from dropped_files_list.

This new setup allows to turn resizable windows fullscreen and back as expected under MacOS,
and to support launching apps while dropping file(s) on its icon.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12508 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-17 09:01:28 +00:00
Greg Ercolano
dbc9f1131c Changed Fl_Simple_Terminal::draw() public -> protected
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12507 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-17 00:38:38 +00:00
Greg Ercolano
68f07db58a Added Fl_Simple_Terminal widget, and mods to test+example programs (STR #3411).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12506 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-17 00:28:56 +00:00
Albrecht Schlosser
93ef00cca6 Fix typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12505 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-16 20:39:02 +00:00
Manolo Gouy
507e39fd19 MacOS 10.13: fix problem with window made fullscreen by clicking on green window button - continued.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12503 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 17:36:58 +00:00
Manolo Gouy
a8dbc90d99 MacOS 10.13: fix problem with window made fullscreen by clicking on green window button.
With MacOS 10.13 "High Sierra", when a window is made fullscreen by clicking on the green window button,
the window hides the system menubar, but it's not possible to show the menubar by moving the pointer
to the very top of the window. This new way of starting apps fixes this problem.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12502 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 17:04:53 +00:00
Albrecht Schlosser
06ca7993a5 Replace remaining calls to getcwd() with fl_getcwd().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 13:04:45 +00:00
Albrecht Schlosser
f9cfe1378d Rename fl_open_ext() parameter 'translation' to 'binary'.
The default (0) is 'text' mode, non-zero is 'binary' mode on platforms
that distinguish text and binary mode.

Currently Windows is the only supported platform that needs this.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 12:34:24 +00:00
Albrecht Schlosser
1ff9144801 Replace remaining calls to access() with fl_access().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12499 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 11:47:01 +00:00
Albrecht Schlosser
a8b58f6b79 Replace inappropriate usage of __WATCOM__ with _MSC_VER.
Note: this is in parts temporary since some of the functions redefined
for Visual Studio will be replaced with fl_*() functions in later commits.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:46:16 +00:00
Albrecht Schlosser
1af23ab32f Fix doxygen and other comments, coding style, and alignment.
Replace QT style doxygen markers "/*!" with Javadoc markers "/**".

This commit does not change executable code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12497 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:37:29 +00:00
Albrecht Schlosser
41f92be2f1 Replace remaining calls to unlink() with fl_unlink().
Tested under Linux, MinGW, and Visual Studio 2015.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12496 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:18:53 +00:00
Albrecht Schlosser
6bfa08c63d Fix conditional compilation under Windows.
Target of the condition was MS Visual Studio, hence the replacement
of "ifndef __WATCOMC__" with "#if defined(_MSC_VER)".

Tested under Windows with MinGW and Visual Studio 2015.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12495 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-14 08:54:48 +00:00
Albrecht Schlosser
ad967af70c Fix confusing (QT style) doxygen comment marker.
Add a space between '/*' and '!'.
Other changes: comment alignment.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12494 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-14 08:35:38 +00:00
Albrecht Schlosser
aff3a0ac12 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12493 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 15:00:06 +00:00
Albrecht Schlosser
66b1690aa8 Replace remaining calls to getenv() with fl_getenv().
... except in driver code that uses Fl_System_Driver::getenv().

Todo: Check if all remaining calls of getenv() in driver code are correct
or might use ::getenv() to avoid one calling level for optimization.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 14:58:30 +00:00
Manolo Gouy
db83933f58 Remove the Fl_SVG_Image::fl_gzopen() member function that is less useful with the new fl_open_ext() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12491 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 07:17:01 +00:00
Manolo Gouy
b5027d4f29 Mention new function fl_open_ext().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12490 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-12 14:54:47 +00:00
Manolo Gouy
789ed089c9 Add fl_open_ext() to control whether the file is opened in binary/text mode.
This new function allows to write Fl_SVG_Image::fl_gzopen() in a completely platform-independent way.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-12 14:42:12 +00:00
Manolo Gouy
a526818778 Remove undesired rounding when Fl_Shared_Image::scale() is called with proportional = 0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12488 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-12 13:05:00 +00:00
Manolo Gouy
193c611fc2 Better implementation of Fl_Cocoa_Window_Driver::wait_for_expose() for Mac OS 10.13 High Sierra.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-11 15:19:45 +00:00
Greg Ercolano
2eeff9d310 Small clarification in dev docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-11 01:35:07 +00:00
Greg Ercolano
5488a4a1e7 Added docs for the mLineStarts[] array, and related mNVisibleLines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-09 02:41:42 +00:00
Greg Ercolano
d0e1d16ae8 Added printf() and vprintf() to Fl_Text_Buffer
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12483 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-08 20:38:36 +00:00
Greg Ercolano
73f1c43474 Fixed seemingly random whitespace..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-06 23:30:07 +00:00
Manolo Gouy
2678cb64f9 Fix compiler warning under Visual Studio.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12481 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-06 12:37:31 +00:00
Manolo Gouy
784ff3b52d Fl_SVG_Image::fl_gzopen(): write it more platform-independently (still not completely though)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12480 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-06 12:13:41 +00:00
Albrecht Schlosser
63420dd956 Fix name clash with zlib gzopen on (64-bit) Linux.
Compilation error message:

src/Fl_SVG_Image.cxx:80:21: error: out-of-line definition of 'gzopen64' does
not match any declaration in 'Fl_SVG_Image'; did you mean 'gzopen'?
void* Fl_SVG_Image::gzopen(const char *fname) {
                    ^~~~~~
                    gzopen
/usr/include/zlib.h:1709:20: note: expanded from macro 'gzopen'
#    define gzopen gzopen64
                   ^

The culprit was the macro defined in zlib.h (above).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-05 18:32:52 +00:00
Manolo Gouy
0cec3f7e9d Fl_SVG_Image constructor: handle case where file cannot be opened.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 21:34:03 +00:00
Manolo Gouy
0b797d704c Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12477 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 16:26:51 +00:00
Manolo Gouy
7a9d5be6cb Undo commit at r.12475 that is not adequate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 12:21:46 +00:00
Manolo Gouy
5e6bf76b0a Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 11:46:33 +00:00
Greg Ercolano
6434d5d602 Added missing accessor for Fl_Text_Display's cursor_style()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-03 05:15:10 +00:00
Albrecht Schlosser
64052828ca Add public accessor Fl_Shared_Image::original().
This public, inline, and read-only accessor is intended for debugging
purposes but can be useful for user code as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-02 11:18:41 +00:00
Greg Ercolano
37a8ef98f0 Small doc simplification/shortening
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12471 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-27 03:30:13 +00:00
Manolo Gouy
c68ec2026f Change copyright year
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12470 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-25 12:20:11 +00:00
Manolo Gouy
71f66a8d12 Update the doc of the Fl_Image_Surface constructor to reflect HiDPI support by the WIN32 and X11 platforms.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-24 08:23:23 +00:00
Manolo Gouy
0a37e2875a Make function gnome_scale_factor() more robust by checking each gnome key exists before asking for its value.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12468 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-23 14:54:23 +00:00
Manolo Gouy
28d6a56f2a Change copyright year to reflect date of last commit.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-23 14:51:00 +00:00
Greg Ercolano
9ccaf26097 Testing svn commits for manolo to see if this triggers website access problems.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12466 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-23 13:31:14 +00:00
Manolo Gouy
615cea792f Remove obsolete include directive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12465 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-23 07:33:40 +00:00
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