Commit Graph

6639 Commits

Author SHA1 Message Date
Albrecht Schlosser
43ff6f0c32 Update dependencies 2023-09-22 14:03:34 +02:00
ManoloFLTK
220dd47bea Increase reuse of mmap'ed data by FLTK Wayland buffer factory 2023-09-22 11:51:24 +02:00
Greg Ercolano
cee69943e5 Small FNFC doc clarification; "pilots" -> "presets" 2023-09-20 23:34:43 -07:00
ManoloFLTK
a26e12590c Step back commit 8248183 that's unsatisfactory while resizing windows 2023-09-18 13:06:13 +02:00
ManoloFLTK
be07e5448f Improve reuse of mmap'ed data by Wayland buffers 2023-09-17 13:05:50 +02:00
ManoloFLTK
824818303c Restore Doxygen doc of fl_graphics_driver 2023-09-17 09:00:48 +02:00
Albrecht Schlosser
ede381c005 Fix Visual Studio shared library build
Todo: fluid-shared can't (yet) be built agains the shared fltk lib
  because of some linker errors. Needs investigation.

Note: fluid-shared is basically a test program to demonstrate linking
  against the shared FLTK libs but doesn't work yet using VS (MSVC).
  This is no problem for the functionality.
2023-09-12 23:18:46 +02:00
Matthias Melcher
5ef29202ed Fixes Fl_Tabs to be more robust.
No children in Fl_Tabs should no longer crash the draw
method. Also, drawing an Fl_Tabs with no children inside
is now defined and documented.
2023-09-06 17:02:13 +02:00
Matthias Melcher
6bb5a81cee Adds some convenience methods.
fl_filename_absolute can no generate a path using arbitrary source paths.
Fl_Menu_ adds find_item_with_user_data and find_item_with_argument
Fl_String adds find(string, start)
2023-09-05 14:45:57 +02:00
Albrecht Schlosser
b2a41e08c3 Introduce Fl_Flex::need_layout() to optimize layout calculation
This is intended to reduce layout calculation and resizing of child
widgets until necessary before the Fl_Flex widget and all its
children are drawn in Fl_Flex::draw().

With this commit users no longer need to call layout() to layout the
Fl_Flex widget and its children properly unless they change widget
sizes or show/hide children.
2023-09-04 16:16:42 +02:00
Matthias Melcher
5e8adebac2 Adds compact buttons feature to create keypads.
See test/buttons for an example.
2023-09-03 00:09:40 +02:00
Matthias Melcher
502fa72eb4 #718: Fixes drawing issues for Fl_Tabs
Tabs were drawn incorrectly when children's box was not FL_NO_BOX
Current solution is cleaned up and always redraws tabs area
without leaving breadcrumbs behind
2023-09-02 20:56:57 +02:00
ManoloFLTK
2e88b5efd1 Remove Doxygen warnings in processing of class Fl_Tabs 2023-08-31 12:41:02 +02:00
Matthias Melcher
443ce62300 #718: Fixes Fl_Tabs overlapping calculations
This method should greatly improve the overlapping calculations.
Tested with super wide and super many tabs.
Also documented every method in the class.
2023-08-30 20:03:44 +02:00
Matthias Melcher
b5a1da9612 FLUID: minor fixes 2023-08-29 22:50:12 +02:00
Albrecht Schlosser
ad5e49464b Document some protected methods and variables of Fl_Tabs
Todo: There are more protected methods that should be documented,
particularly the virtual ones that might be overridden by subclasses.
2023-08-29 15:19:07 +02:00
Matthias Melcher
5da15de174 FLUID: simplified worker handling 2023-08-29 01:38:39 +02:00
Albrecht Schlosser
d11c412f95 CMake: Make compile definitions 'FL_LIBRARY' and 'FL_DLL' private
... so they are not inherited by consumers of the library.

Remove 'add_definitions(-DFL_LIBRARY)' from src/CMakeLists.txt
  This is not necessary, see CMake/fl_add_library.cmake

Don't set obsolete property 'CLEAN_DIRECT_OUTPUT' which was removed
in CMake 2.8.0.
2023-08-28 15:21:58 +02:00
ManoloFLTK
b328c1f902 Wayland.dox: some rephrasing 2023-08-28 10:16:01 +02:00
ManoloFLTK
d245a157b6 Slightly simpler handle_close() in Fl_Wayland_Window_Driver.cxx 2023-08-27 16:46:16 +02:00
ManoloFLTK
7e3aabf80e Remove useless function prototype declaration 2023-08-27 08:06:16 +02:00
ManoloFLTK
2f5e1b2230 Fix typos in Doxygen text for fl_filename_absolute/relative() 2023-08-26 18:38:38 +02:00
Matthias Melcher
92ac709b7e Adds safe versions of fl_filename_*, returning Fl_String 2023-08-26 16:48:28 +02:00
Matthias Melcher
3ed43363cd FLUID: fixes file path calculation bug 2023-08-26 16:10:02 +02:00
ManoloFLTK
ee0f173d9f Undo commit 5ea7a04 which requires Mutter V12
That commit's goal was to use an algorithm that does not assume
that number keys are at keycodes 10-19, which may not hold with
"special" keyboards. Unfortunately, the new algorithm requires
Mutter V12 and fails with Mutter V11, used by Debian 12.
2023-08-23 15:59:04 +02:00
ManoloFLTK
c61d6bc46a Wayland: fix regression in menu positioning brought by c43cf2f 2023-08-22 15:33:13 +02:00
ManoloFLTK
ac7c3297fa Undo commit 0a31225 which killed "caps lock" 2023-08-20 19:20:25 +02:00
ManoloFLTK
0a312259a2 Simpler function process_wld_key(() 2023-08-20 18:58:37 +02:00
ManoloFLTK
5ea7a0465e Wayland: process number keys independently of keyboard layout
The new algorithm supports alternate keyboard layouts, e.g., Dvorak.
2023-08-20 16:29:14 +02:00
ManoloFLTK
fc339b4319 Remove redundant initialisation 2023-08-20 09:34:44 +02:00
ManoloFLTK
442faf9462 Create class function Fl_Wayland_Graphics_Driver::custom_offscreen() 2023-08-20 09:10:55 +02:00
ManoloFLTK
3384776f8e Improve handling of type Fl_Offscreen under Wayland
Type Fl_Offscreen is now to be cast to cairo_t*.
Also, make sure the dimensions of GL windows are
multiples of the screen scale factor.
2023-08-18 18:02:35 +02:00
ManoloFLTK
336bd01f16 X11 platform: give number keys layout-independent keysym's
Without this, the sudoku app is unusable with a French keyboard
2023-08-16 12:35:50 +02:00
Matthias Melcher
10d9010ed9
Improved, yet compatible, widget callback system using macros (#729)
* adds FL/fl_callback.macros.H
* adds FL_FUNCTION_CALLBACK_n(widget, function, [type, data])
* adds FL_METHOD_CALLBACK_n(widget, class, instance, method, [type, data])
* adds FL_INLINE_CALLBACK_n(widget, [type, name, data], callback_body)
* adds `examples/callback`
* full documentation
2023-08-15 11:36:58 +02:00
ManoloFLTK
e6440ca0a8 Wayland mouse wheel support: compositors can behave differently 2023-08-15 08:44:53 +02:00
Albrecht Schlosser
3c7610ec23 Handle shift + mousewheel event on Wayland (STR 3521)
Pressing the shift key while using the mousewheel changes
horizontal to vertical scrolling and vice versa. This allows users
with a standard mouse with only one scrollwheel to use it for both
scrolling directions.

This concludes "handling shift + mousewheel" for all supported platforms.
2023-08-14 16:57:33 +02:00
Albrecht Schlosser
847901623a Handle shift + mousewheel event on Windows (STR 3521)
Pressing the shift key while using the mousewheel changes
horizontal to vertical scrolling and vice versa. This allows users
with a standard mouse with only one scrollwheel to use it for both
scrolling directions.

Note: other mice that have either two buttons or a scroll ball can
generate both horizontal and vertical scrolling in one action. This
commit does not affect such behavior.

This patch is different than the one in file 'scroll.patch' (STR 3521).
It takes care of distinct mousewheel delta calculation for vertical
and horizontal mousewheels and avoids the "fallthrough" case.

Note: macOS takes care of this, there's no special handling required.

To do: the Wayland platform still needs to be updated.
2023-08-13 17:44:00 +02:00
Albrecht Schlosser
8c5c7aa7f4 Handle shift + mousewheel event on Linux (STR 3521)
Pressing the shift key while using the mousewheel changes
horizontal to vertical scrolling and vice versa. This allows users
with a standard mouse with only one scroll button to use it for both
scrolling directions.

Note: other mice that have either two buttons or a scroll ball can
generate both horizontal and vertical scrolling in one action. This
commit does not affect such behavior.

This patch has been provided by Manolo in file 'scroll.patch'
(see STR 3521).
2023-08-13 17:07:26 +02:00
Matthias Melcher
5e484524c8 Fl_Tabs now supports horizontal mouse wheel events. 2023-08-13 14:32:41 +02:00
Aditya Siram
17d0a4cc5f Fix access to Cairo context. 2023-08-12 23:18:09 +02:00
Albrecht Schlosser
76fb2d5b79 Reformat code, remove obsolete comments
No effective code changes, i.e. only formatting, indents and comments.
2023-08-10 15:40:45 +02:00
Albrecht Schlosser
dbb77b9657 Improve docs of Fl::hide_all_windows()
+ update fluid dependencies

No code changes.
2023-08-10 15:16:01 +02:00
ManoloFLTK
21fdd42838 macOS: add extra comment explaining need for PPC-specific source code 2023-08-09 21:15:20 +02:00
Sergey Fedorov
356ccc4b70 Fl_cocoa.mm: fix Apple macro for PPC case 2023-08-09 21:07:01 +02:00
ManoloFLTK
1943fe54c8 Wayland: fix fl_read_image() from offscreen buffer 2023-08-09 10:31:36 +02:00
ManoloFLTK
27c3d0b780 Wayland: improve layout of struct fl_wld_draw_buffer 2023-08-08 16:08:53 +02:00
ManoloFLTK
45d119eb3c Move repeated code to Fl_Wayland_Graphics_Driver::cairo_init() 2023-08-08 09:05:12 +02:00
ManoloFLTK
a98aaecf97 Fix for Broken "cube" demo (#762)
This commit fixes an error in the cube demo appearing specifically with the AMD Radeon GPU.
2023-08-07 19:16:38 +02:00
Albrecht Schlosser
5bcd6ca8f2 Revert "#733 partial: Adds rotation gesture event on MacOS"
This reverts commit 3049e6394a
as agreed upon in GitHub Issue #733.
2023-08-05 16:37:38 +02:00
Matthias Melcher
3049e6394a #733 partial: Adds rotation gesture event on MacOS 2023-08-05 12:19:42 +02:00