Commit Graph

10021 Commits

Author SHA1 Message Date
Albrecht Schlosser
bb7129dae2 Use the new Fl_Int_Vector class in Fl_Table
Replace local IntVector with Fl_Int_Vector
2022-11-06 16:32:29 +01:00
Albrecht Schlosser
8b92935b1e Add Fl_Int_Vector: "an STL-ish vector without templates"
Code copied from Fl_Table and reformatted.

Thanks to Greg for the original code.
2022-11-06 16:32:29 +01:00
Matthias Melcher
c4bb4e192e Fixing _define before _include. 2022-11-06 16:19:53 +01:00
ManoloFLTK
44219594d1 Check return value from call to gtk_init_check() 2022-11-06 08:11:05 +01:00
ManoloFLTK
6ccd71697d Allow using native file chooser on Darwin + XQuartz + (homebrew or fink) 2022-11-06 07:58:38 +01:00
ManoloFLTK
4b945a3086 Wayland/X11 hybrid: use "bool fl_disable_wayland;" declaration. 2022-11-05 19:47:37 +01:00
Albrecht Schlosser
b426a3d7c0 Fix two rare potential bugs (NULL pointer dereferencing)
Both bugs can happen if a widget doesn't have an associated window()
or in similar situations. These fixes returns NULL to prevent crashes.

Bugs observed in special test scenarios, not real-life programs.
2022-11-05 19:31:59 +01:00
ManoloFLTK
918395e091 Wayland: simpler handling of the z-order of subwindows
It's not necessary to call wl_subsurface_place_above() because
"A new sub-surface is initially added as the top-most in the stack of its siblings and parent."
2022-11-05 15:28:39 +01:00
ManoloFLTK
e133d3af2b Reorganize content of CHANGES.txt & introduce Fl_Flex 2022-11-05 05:19:58 +01:00
ManoloFLTK
bb4cc0ffe8 Wayland + configure: take care of HAVE_GLXGETPROCADDRESSARB 2022-11-05 05:01:56 +01:00
Matthias Melcher
4b4591dd72
Fluid now stores set sizes for Fl_Flex. (#529)
https://groups.google.com/g/fltkcoredev/c/2JA-CcTbrX4
2022-11-04 17:49:37 +01:00
ManoloFLTK
425bd5865d Wayland DnD: make insertion cursor follow DnD cursor. 2022-11-04 15:06:45 +01:00
Etorth
da96fa0ddf
support svg (#489) 2022-11-04 13:30:09 +01:00
ManoloFLTK
eb679f99a8 Wayland DnD: allow cancel with Fl::pushed(0) as under X11 (#525)
This is a partial fix of issue #525 that reproduces under Wayland the "unofficial",
X11-specific way to cancel a Dnd operation by calling Fl::pushed(0).
2022-11-04 12:37:26 +01:00
Albrecht Schlosser
2446ec5d62 Implement Fl_Scroll::on_insert()
This fixes the scrollbar order when children are inserted rather than
at some indefinite time later, for instance in draw().

This commit will very likely make Fl_Scroll::fix_scrollbar_order()
obsolete but this method is kept as is for tests and verification.
2022-11-03 19:11:59 +01:00
Albrecht Schlosser
0ebb113584 Implement destructor of Fl_Scroll and fix inconsistencies 2022-11-03 18:58:28 +01:00
ManoloFLTK
a5d2b5ed45 libdecor: update from source git repo (commit e87dcfda)
This brings the GTK plugin inside the master libdecor git repo.
2022-11-03 08:16:49 +01:00
Matthias Melcher
33f01ecb83
Added Fl_Group::on_insert/on_remove/on_move (#527) 2022-11-01 20:45:31 +01:00
Albrecht Schlosser
c570bd8f96 Fix trailing whitespace 2022-11-01 20:06:22 +01:00
Albrecht Schlosser
414ad1dce7 Remove unnecessary include files, update dependencies 2022-11-01 20:04:37 +01:00
Albrecht Schlosser
a09b0e2357 Remove reversal of children in Fl_Group::clear()
See implementation note in src/Fl_Group.cxx: Fl_Group::clear().
2022-11-01 17:25:07 +01:00
Matthias Melcher
dd7edd7c7f Fluid subgroup visibility 2022-11-01 16:24:54 +01:00
Matthias Melcher
93ea93ee2b
Fluid support for Fl_Flex (#523) and some Fl_Flex improvements
* Adding Fluid support for Fl_Flex, margins, and gap.

* Fluid Fl_Flex mostly working. Fixed in Fl_Flex::set_size().

* Fluid Flex live mode works, interactive dragging works

* Fluid Flex: adding check box for fixed children

* Fluid Flex: visual flexibility indicator in guides.

* Fluid Flex: bug in generated code.

* Fix formatting

* Fixing Tooltip, fixing resize issue PR #518.

* Removing unused variables.

Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2022-11-01 13:30:05 +01:00
ManoloFLTK
31ec6f623a Wayland platform: fix problem with fl_pie() (#512 - cont'd) 2022-10-30 11:46:08 +01:00
ManoloFLTK
7403e333da Wayland platform: fix problem with fl_pie() (#512 - cont'd) 2022-10-30 11:33:10 +01:00
Albrecht Schlosser
a918292547 Fix removal and deletion of the resizable() of Fl_Group
If the resizable() of an Fl_Group is deleted it is automatically
removed from the group.

New: to avoid dangling resizable() pointers the resizable widget
is set to the group itself.
2022-10-28 17:37:18 +02:00
ManoloFLTK
f9acdb6edb Repair commit e0c3fe9 to fix #521 which destroyed DnD from Wayland
It turns out it's necessary to memorize 2 event serial numbers :
- serial changed at each pointer and key event;
- pointer_enter_serial changed when pointer enters a surface
because this one and not any other is needed for exact cursor changes
by wl_pointer_set_cursor() in do_set_cursor().
2022-10-25 19:08:12 +02:00
ManoloFLTK
84cdc1ba12 Fix drag-n-drop from X11 FLTK app to Wayland app (#519) 2022-10-25 15:00:51 +02:00
ManoloFLTK
e0c3fe939f Fix problem with cursor point of action after FL_PUSH (#521) 2022-10-25 10:44:36 +02:00
ManoloFLTK
b0d4c2fd4c Include stdint.h may be needed for uint32_t (#522) 2022-10-24 05:30:33 +02:00
ManoloFLTK
e69d45cde8 Make Fl::display(const char *) active also for the Wayland platform. 2022-10-23 12:19:44 +02:00
Greg Ercolano
c7ffd8e72a Doc proper removal/destruction of a widget from its group.
This modification as per small thread on fltk.coredev:
Sep 19, 2022, Subject: Addition to Fl_Group docs
2022-10-21 23:44:08 -07:00
Albrecht Schlosser
615783d093 Fix a typo in README.Unix.txt 2022-10-21 19:11:19 +02:00
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