Commit Graph

10073 Commits

Author SHA1 Message Date
ManoloFLTK
13e3a4c613 fltk-config from configure: remove libdecor-related flags - cont'd 2022-11-27 10:19:15 +01:00
ManoloFLTK
acf7254fe8 macOS+OpenGL3: remove "warning: gl.h and gl3.h are both included" 2022-11-27 08:06:33 +01:00
Albrecht Schlosser
bcb739f17f Update dependencies 2022-11-26 21:59:03 +01:00
Albrecht Schlosser
8ec935b4ce Simplify and improve "oxy" arrow drawing functions
- change drawing arrows from lines to polygons
- remove superfluous functions
- add more comments
2022-11-26 21:56:38 +01:00
Matthias Melcher
87fe29372c
Local undo per Fl_Text_Buffer and Fl_Input_ (#557) 2022-11-26 20:28:12 +01:00
Albrecht Schlosser
191aeefc4a Make the value box size of Fl_Value_Slider user settable (STR 3222)
For a very simple test program see STR 3222, File 2:
https://www.fltk.org/strfiles/3222/value_slider.cxx

Known issues:
 - range checking of the value box size is very limited
 - resizing the widget does not change the value box size
 - drawing issues are possible if the value box size and the widget
   size are not compatible (e.g. value box too large)
2022-11-26 19:56:32 +01:00
Matthias Melcher
e1a781717e Remove unintentional C++11 2022-11-26 19:09:12 +01:00
ManoloFLTK
1d04c75508 fltk-config from configure: remove libdecor-related flags 2022-11-26 10:43:21 +01:00
Matthias Melcher
6e5c472cf9
Handle Fluid project settings better (#556)
Fix allocation bug in Fl_String
2022-11-26 01:35:50 +01:00
Albrecht Schlosser
c1a7c4af04 Fix GitHub Actions (CI) for Windows builds
This was necessary because the latest GitHub "runner" image (20221120.1)
includes incompatible image libs (libjpeg, libpng, and zlib). This
caused `fluid-cmd.exe` to fail with error code -1073741511. For further
information please refer to this GitHub Issue:
  https://github.com/actions/runner-images/issues/6627

The previous runner version (20221027.1) did not include these libs
and our build used the internal libs and worked.

The fix is to disable the search for system libs in CMake.

Note: this does not explain *why* these libs are incompatible.
2022-11-25 17:24:18 +01:00
Matthias Melcher
130a504a39
Add i18n to test/preferences (#555)
To test the output of FLUID code and demonstrate
i18n, preferences emulates GNU gettext.
2022-11-25 16:58:50 +01:00
ManoloFLTK
4de491d02e Make Fl_XXX_Graphics_Driver::create_bitmask() a static member function 2022-11-25 15:53:28 +01:00
Albrecht Schlosser
cda501f914 Fix silly Visual Studio compiler warnings in oxy scheme 2022-11-25 15:09:30 +01:00
Matthias Melcher
ffc2caea07 Avoid thin gray line in round box in hires 2022-11-25 12:53:54 +01:00
ManoloFLTK
3dac8e379e CI build-Wayland: package libpangocairo-1.0-0 is installed by default 2022-11-25 12:45:47 +01:00
Matthias Melcher
09697c4738 Fix GDI graphics driver use for bitmasks 2022-11-25 10:52:46 +01:00
Albrecht Schlosser
b1ba37c5ba Add "Oxy" scheme (STR 2675, STR 3477)
This commit is similar to the patch given in STR 3477, oxy_v5.diff:
https://www.fltk.org/strfiles/3477/oxy_v5.diff

... with modifications, and updated to current FLTK code.
2022-11-25 00:00:48 +01:00
Albrecht Schlosser
40f376a6f7 Fix two new Visual Studio compiler warnings 2022-11-24 17:29:26 +01:00
ManoloFLTK
c3011e32e4 Improve text drawing above GL3 scene under macOS 2022-11-24 15:48:39 +01:00
ManoloFLTK
be0f06e791 Remove two "warning: pointer xxx used after void* realloc()" messages 2022-11-24 14:35:47 +01:00
Albrecht Schlosser
c1ba9f31ec Fix two Visual Studio compiler warnings
+ fix trailing whitespace (fluid)
2022-11-24 12:51:26 +01:00
Matthias Melcher
b16309f13e
Refactor code to make rounded rectangles accessible (#553)
This adds fl_rounded_rect and fl_rounded_rectf so the
user can draw rounded rectangles. This uses existing and
optimised code that is rearranged.
2022-11-24 12:47:49 +01:00
Matthias Melcher
12dccaf711
Check boundary conditions in Cocoa scroll code (#554) 2022-11-24 12:44:08 +01:00
Matthias Melcher
8978bd1a84 FLUID: Fix update of formula input widgets 2022-11-24 12:35:32 +01:00
ManoloFLTK
314f464cd5 README.Wayland.txt: list required packages besides those in README.Unix.txt 2022-11-24 12:14:30 +01:00
Matthias Melcher
6f36a63629 Fixes some FLUID bugs
Fl_Flex would not change type when it had no children.
Function evaluation could read past string end.
Fl_Window_Type would not initialise all member variables.
2022-11-24 11:39:29 +01:00
ManoloFLTK
e19d2d98ba OpenGL3 under macOS: simpler implementation of support of child widgets 2022-11-24 09:13:40 +01:00
ManoloFLTK
2356c9dcd6 CMake build for Wayland: check for presence of required GL-related software 2022-11-24 09:08:46 +01:00
ManoloFLTK
75b06d02c9 CMake building: improve messages about necessary software packages 2022-11-24 07:22:27 +01:00
ManoloFLTK
7d8885d6d8 CMake build for Wayland/X11 hybrid: check for libx???-dev packages 2022-11-23 19:00:05 +01:00
ManoloFLTK
b6c5de7c05 Restore build with HAVE_GL = 1 and HAVE_GL_GLU_H = 0 2022-11-23 18:12:33 +01:00
ManoloFLTK
27a6fd9609 Configure-based build: control presence of GL-related packages 2022-11-23 17:24:59 +01:00
Albrecht Schlosser
b684f70ad7 Update remaining "arrow drawing" in menus
Use the new standard arrow drawing methods (whose style depends on
the active scheme) for "arrows" used in Fl_Menu and Fl_Menu_Button.

To do: maybe we need some "fine tuning" of arrow sizes in some of
the modified widgets using the new "arrow drawing" methods.
2022-11-23 15:21:34 +01:00
Albrecht Schlosser
5e4643621b Save and restore current color when drawing arrows
Make sure we don't change the current color after we finish drawing.
2022-11-23 15:21:34 +01:00
Albrecht Schlosser
bd18d9de26 Fix border size of FL_PLASTIC_UP_BOX 2022-11-23 15:21:34 +01:00
Matthias Melcher
817a97bb65 Fluid: Fix variable naming and a memory leak 2022-11-23 15:18:01 +01:00
Albrecht Schlosser
410e57d2db Don't build libdecor demos, add generated files to .gitignore
1) We don't need to build the libdecor demo programs for FLTK.

2) The Wayland build process generates some source and header files
   in the main src/ directory. These files are now ignored by git.
2022-11-23 13:33:52 +01:00
Albrecht Schlosser
ce777110fe Fix whitespace (trailing spaces) 2022-11-23 13:08:37 +01:00
Matthias Melcher
35f2827d1f
Keep indicator that menubar is still active (#551) 2022-11-23 12:33:14 +01:00
ManoloFLTK
42b74919e5 Improve Fl_Cocoa_Gl_Window_Driver::switch_to_GL1() to support multiple GL3 windows 2022-11-23 11:59:49 +01:00
Matthias Melcher
be6e5fad72 Fluid: Fix commandline parameter error message 2022-11-23 10:59:43 +01:00
Matthias Melcher
73b24c2104
Add missing FL_RELEASE event after dnd() (#549)
On X11, FLTK would not send a required FL_RELEASE
event to the data source window.
2022-11-23 10:33:34 +01:00
ManoloFLTK
d215ddef81 Fix for issue #412 for the Wayland backend
The problem was that after a drag-n-drop within a window, text selection
by shift+arrow key stopped working.

Also, improves drag-n-drop within a window by leaving insertion point
at end of dragged text.
2022-11-23 09:33:41 +01:00
ManoloFLTK
0ba051994a Have OPTION_USE_WAYLAND / --enable-wayland set to ON by default 2022-11-23 06:17:31 +01:00
ManoloFLTK
4dcced5b29 Wayland+CMake: stop forcing GTK_FOUND to 0
This removes the cause of this developer's message
  # FIXME: This needs to be redesigned! Forcing GTK_FOUND to 0 (NO) is a bad
  # FIXME: idea because there could be unwanted side effects. AlbrechtS
2022-11-23 05:59:57 +01:00
Albrecht Schlosser
39bb38447b Update dependencies 2022-11-22 19:35:34 +01:00
Albrecht Schlosser
ecc47d0cc3 Refactor and simplify "arrow drawing" in widgets
"Arrows" in widgets are those GUI elements mostly represented by
triangles pointing in a particular direction as in scrollbars,
choice widgets, some menus, valuators and Fl_Counter widgets.

The code has been simplified and standardized such that all these
GUI elements are drawn identically per FLTK scheme.

Widget authors no longer need to write code to calculate arrow sizes
and draw polygons etc.

Different schemes can and do implement different drawing functions.

Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and
      src/Fl_Menu.cxx
2022-11-22 19:32:54 +01:00
ManoloFLTK
4daec2a940 macOS: Fix release of extra NSView holding child widgets of GL window 2022-11-22 19:18:29 +01:00
Albrecht Schlosser
fa6d95a793 Enhance Fl_Rect: add inset() and new constructor
These new features can be used by widgets that draw inside a rectangle
taking the border width into account.
2022-11-22 19:01:39 +01:00
Matthias Melcher
495b2395c1
Fix selection extension in Fl_Text_*, issue 196 (#550)
Selecting a text range programmatically would not sync
some variables with the actual selection. This also fixes
a crash bug in macOS when dragging text that was
selected by buffer()->select() only.
2022-11-22 16:18:56 +01:00