Commit Graph

9938 Commits

Author SHA1 Message Date
Albrecht Schlosser
7b4125338b Update README files for Unix and Wayland platforms
README.Unix.txt: reorganize distributions, add packages to
  prerequisites, and more.

README.Wayland.txt: update title style, minor changes
2022-10-21 19:04:03 +02:00
Albrecht Schlosser
da11526bb8 Improve and clarify documentation of timeout functions
Some functions didn't document the handling of arguments properly,
particularly Fl::has_timeout() and Fl::remove_timeout().

This is now fixed by documenting the correct behavior that was
preserved (re-implemented) from FLTK 1.3.x in the new class Fl_Timeout.

Unfortunately there have been some inconsistencies (likely unexpected
behavior) which have been preserved and which are now documented.
2022-10-20 19:36:03 +02:00
ManoloFLTK
eca61ab98a Wayland drag-n-drop: send FL_DND_LEAVE when the dragging mouse leaves the window 2022-10-20 08:30:54 +02:00
ManoloFLTK
24c63c0774 Wayland drag-n-drop: handle subwindows as other platforms do (#516)
The d-n-d target window is now always the top-level window even if the
mouse is over a subwindow. That's what all other platforms do.
Global var fl_dnd_target_surface memorise what's the current d-n-d target
surface and follows changes from top-window to subwindows.
2022-10-19 12:28:04 +02:00
Greg Ercolano
f40bd49a7c Added cmake example for building nmake files
The docs needed an example of building fltk purely from the command line
with Visual Studio (e.g. with nmake), without the IDE.
2022-10-18 23:23:58 -07:00
ManoloFLTK
857462529b Allow DnD from Wayland FLTK app to X11 FLTK app (#516) 2022-10-17 19:16:01 +02:00
ManoloFLTK
a944758aea Wayland drag-n-drop to Fl_Window: send necessary FL_ENTER event (#516)
Drag-n-drop under Wayland was OK in general except when the drop target is an Fl_Window
because the belowmouse object is not set in this configuration.
Processing an FL_ENTER event before the FL_DND_RELEASE event fixes that.
2022-10-17 10:32:41 +02:00
Albrecht Schlosser
723d8caa9d Fix "Fl::focus() changes Fl_Group::current() to null" (#515)
This issue is caused by setting `Fl_Group::current(0);` in
Fl_Window::show(), i.e. in Fl_X::make_xid(..) in an attempt to
fix a "very common user bug: forgot end()". As long as this is
done, this commit fixes the issue.

For details see GitHub issue #515.
2022-10-16 23:23:04 +02:00
ManoloFLTK
260a446609 macOS + homebrew: restore building with CMake's OPTION_APPLE_X11
These option combinations work:
-DOPTION_APPLE_X11
-DOPTION_APPLE_X11 -DOPTION_USE_CAIRO

But
-DOPTION_APPLE_X11 -DOPTION_USE_PANGO
is not possible because homebrew doesn't provide the pangoxft package.
2022-10-16 08:29:59 +02:00
ManoloFLTK
531ab614e2 Make sure display is open when using native file chooser (#514) 2022-10-14 15:38:22 +02:00
ManoloFLTK
5fe2932924 macOS: restore "configure --enable-x11 --enable-usecairo" - cont'd 2022-10-14 12:44:42 +02:00
ManoloFLTK
763a8f9648 macOS: restore "configure --enable-x11 --enable-usecairo" 2022-10-13 15:04:32 +02:00
ManoloFLTK
761e24b17d Document fl_circle() with and w/o complex drawing API (#511) 2022-10-13 10:16:06 +02:00
ManoloFLTK
42887c0619 Fix regression in "configure --enable-shared" introduced at c96a4f3 2022-10-13 09:31:49 +02:00
Albrecht Schlosser
e72324d3d9 Update Doxyfile.in for current Doxygen version 1.9.5
This file is now compatible up to Doxygen 1.9.5, i.e. there are
no warnings about obsolete parameters when generating the docs.

Current git 'master' of Doxygen (1.9.6: not yet released) issues
some warnings but these will hopefully be fixed in Doxygen.

Oldest tested Doxygen: 1.8.17 - older versions may emit warnings.
2022-10-12 16:19:36 +02:00
ManoloFLTK
87c8b98a98 Wayland platform: fix for issue #512 with fl_arc(). 2022-10-12 06:12:07 +02:00
ManoloFLTK
1df79078b7 Remove duplications between Fl_Graphics_Driver and derived classes. 2022-10-10 16:58:48 +02:00
ManoloFLTK
e4709b837d Fl_Cairo_Graphics_Driver: fix Fl_Bitmap drawing whatever the endianness. 2022-10-10 11:31:02 +02:00
ManoloFLTK
7fa677f93e Fix for issue #511: allow fl_circle() even without calls to fl_begin/end_loop/polygon(). 2022-10-10 07:08:00 +02:00
ManoloFLTK
cae2b2883b Fl_Cairo_Graphics_Driver: make image drawing correct whatever the host endianness. 2022-10-09 22:45:58 +02:00
Albrecht Schlosser
2a856dafd4 Remove superfluous center alignment from images
Doxygen uses a <div> with center alignment for images, hence
adding HTML center alignment for image is not only superfluous
but was also inconsistent.

Also removed some more unnecessary HTML tags, updated copyright year.
2022-10-09 19:35:20 +02:00
ManoloFLTK
1a5d6572e9 Fix issue #510: image transparency is not properly processed. 2022-10-09 17:43:06 +02:00
Albrecht Schlosser
4d17cf310d Fix documentation of Fl_Timeout::insert() 2022-10-09 14:30:32 +02:00
ManoloFLTK
f2532964cc Class Fl_Single_Window declares but doesn't implement method make_current().
Also, add missing doc for methods Fl_XXX_Window::show(int, char**).
2022-10-07 09:21:37 +02:00
ManoloFLTK
e9719e5416 Update window icon-related doc in platform-specific section. 2022-10-06 15:07:39 +02:00
ManoloFLTK
5f189aa213 Make Windows-specific HICON-using functions visible in doc. 2022-10-06 13:15:16 +02:00
ManoloFLTK
6732044a07 Fix use of several FLTK widgets above an GL scene.
The code failed with 2 or more widgets when FLTK would trigger
partial redraws of the widgets, unless the Fl_Gl_Window was FL_DAMAGE_ALL.

This commit also adds a second FLTK widget to example/OpenGL3test to
check this multiple widget situation, and fixes an error where operator ! was used
instead of ~ .
2022-10-06 08:43:09 +02:00
ManoloFLTK
206d9b17e0 Fix issue #509: Cairo drawing: unexpected behaviour
This commit fixes " "drawing an fl_pie() with dimension 1x1".
But it does not change "drawing fl_line() with begin position = end position does not show"
because the same behaviour is observed with Windows and macOS.
2022-10-05 08:52:30 +02:00
Albrecht Schlosser
5646522985 CMake: Fix some special cases regarding generation of docs
Ignore error if docs are not generated using a git working tree, for
  instance from a downloaded tarball or zip file. This is only a
  temporary solution for issue #499 (see "FIXME" comment).

Execute doxygen only if it is available. i.e. found by CMake.
2022-10-03 10:49:43 +02:00
ManoloFLTK
30efed7fd4 Revert 75016cb because it doesn't work well with macOS < 13.0
The problem is visible with test/tile when moving the sub window's border.
This also fixes issue #508
2022-10-03 10:21:39 +02:00
ManoloFLTK
4b70bc32c5 Add missing return value to Fl_WinAPI_Gl_Window_Driver::create_gl_context() 2022-10-02 21:37:35 +02:00
ManoloFLTK
1fc23f8506 Clean use of virtual GLContext Fl_Gl_Window_Driver::create_gl_context(). 2022-10-02 13:35:53 +02:00
ManoloFLTK
abc6709e8e macOS: simpler way to delete the GL1 context of widgets-using GL3 windows. 2022-10-02 08:40:38 +02:00
ManoloFLTK
63a7942a66 macOS: support 5 more keys as Fl_Sys_Menu_Bar item shortcuts. 2022-10-01 13:28:52 +02:00
ManoloFLTK
4196daa77e macOS: fixed problem in resizing of widget-containing OpenGL 3 window. 2022-10-01 07:31:42 +02:00
ManoloFLTK
0627213a82 FLTK widgets in OpenGL 3 windows: rewrite for driver system. 2022-09-30 19:25:23 +02:00
Albrecht Schlosser
bb6072ad82 Improve wording of GitHub Issue Templates
as suggested by Manolo and Ian
2022-09-30 18:01:04 +02:00
ManoloFLTK
a61d8fb682 macOS: simpler code for auxiliary NSView supporting widgets on a GL3 window. 2022-09-30 16:20:51 +02:00
ManoloFLTK
4f6965d39f Support of FLTK widgets in OpenGL 3 windows under Windows. 2022-09-30 15:53:05 +02:00
ManoloFLTK
75016cb853 macOS: implement (BOOL)[FLView isOpaque] to improve drawing performance. 2022-09-30 09:03:54 +02:00
ManoloFLTK
63dcdcec0a macOS: support FL_Up,FL_Down,FL_Left,FL_Right system menu item shortcuts 2022-09-30 07:36:07 +02:00
ManoloFLTK
c96a4f3141 macOS platform: rename Fl_Cocoa_Gl_Window_Driver.cxx to .mm 2022-09-29 16:25:14 +02:00
ManoloFLTK
694eaef99c Doc: more details about installation of GLEW. 2022-09-29 12:04:17 +02:00
ManoloFLTK
da66e21e1d Support of FLTK widgets in OpenGL 3 windows - cont'd.
This commit allows to switch between FL_DOUBLE / FL_SINGLE modes
in widget-containing GL3 windows.
Demo program examples/OpenGL3test is modified to show FLTK widgets
even if the platform does not support OpenGL 3.
2022-09-29 09:39:21 +02:00
Albrecht Schlosser
283184a09a Add GitHub Issue Templates
- bug_report.md: template for bug reports
- feature_request.md: template for feature requests
- fltk-build-or-usage-question.md: not really a template [1]

[1] Explain to users that this is the wrong place to ask user
    questions and refer them to fltk.general
2022-09-28 17:18:03 +02:00
ManoloFLTK
c2efb0d849 macOS: support of FLTK widgets in OpenGL 3 windows - cont'd.
This code is OK under macOS 10 9 and 13.
2022-09-28 17:06:00 +02:00
ManoloFLTK
7d58e23854 macOS: add necessary setWantsBestResolutionOpenGLSurface:YES message. 2022-09-28 08:23:36 +02:00
ManoloFLTK
3225afaeec Remove use of class Fl_Window_Driver inside libfltk_gl 2022-09-27 16:51:35 +02:00
ManoloFLTK
3ba09047e2 Use PR #507 by @ggarra13 to fix issue #85. 2022-09-27 14:48:22 +02:00
ManoloFLTK
59fc60ea4c Simpler code to support FLTK widgets in macOS OpenGL 3 windows.
Also, the application-level code to add widgets to a GL3 window becomes
platform-independent.
2022-09-27 14:12:39 +02:00