Commit Graph

9503 Commits

Author SHA1 Message Date
Matthias Melcher
72fe8c6035
Fluid: no grid on window resizing. (#399) 2022-02-20 22:03:39 +01:00
Matthias Melcher
a878e253ad
Fluid: fixed missing return value (#398)
...and possible devision by zero
2022-02-20 21:15:58 +01:00
Albrecht Schlosser
fd8170525b Fix typos and copyright 2022-02-19 12:55:06 +01:00
Albrecht Schlosser
ec974ce6b8 Update copyright year of documentation 2022-02-16 14:51:00 +01:00
Albrecht Schlosser
1cdd669dc6 Fix "fl_message_icon() regression" (#395)
Some attributes of the default message icon had not been copied to
the new Fl_Message class when opening a new dialog.

Clarify documentation about supported icon attributes.
2022-02-16 14:50:50 +01:00
Matthias Melcher
390095392b Adding comments to recent Fluid changes. 2022-02-14 13:20:34 +01:00
Matthias Melcher
8c3778e13f
Better Fluid Widget dimension controls (#394)
* Size and position widgets can evaluate basic math.

* Allowing x, y, w, and h as variables for formulas.

Also supporting 'i' as a counting index when selecting multiple
widgets, so setting Y: to i*25+10 arranges all selected widgets
vertically.

* Additional variables cx, etc. for children box

cx, cy, cw, ch
2022-02-13 22:01:16 +01:00
Kevin Routley
f196ffbb52
Fix documentation error in Fl_Tabs (#391) 2022-02-13 12:40:48 +01:00
Matthias Melcher
c9b44064d2
Fluid: adding feature: Functions can also be "local". (#390)
Before, Functions could only be "static" (keyword static is added)
or "global" (prototype is added). This is harmful if the function or
method was declared elsewhere. "local" solves that.
2022-02-13 00:54:44 +01:00
silverduner
52bfbbc2fa
expose position(int, int), x(), y(), w() and h() from Fl_File_Chooser (#80)
* expose position(int, int), x(), y(), w() and h() from Fl_File_Chooser for positioning

* exposed size() and resize() in Fl_File_Chooser.
2022-02-12 20:46:12 +01:00
Matthias Melcher
62daf00a9e Fixed Fluid Alignment panel i18n to none. 2022-02-11 16:00:37 +01:00
Albrecht Schlosser
f6c2531b5b Enable end user to copy standard dialog text to clipboard (#388)
All standard dialogs like fl_message() now handle command-c (macOS)
and ctrl-c (other platforms) to copy the message text of standard
dialogs to the clipboard as requested by GitHub Issue #388.
2022-02-09 16:33:55 +01:00
ManoloFLTK
9a326dbe01 Account for presence of terminal panel in the size_range() call. 2022-02-08 18:56:59 +01:00
ManoloFLTK
bf16e4e8aa More detailed doc of Fl_Window::decorated_h() for X11 platform. 2022-02-08 08:03:35 +01:00
ManoloFLTK
01db172010 Fix for issue #373 apparent with macOS platform and SDK ≤ 10.13
Many thanks to @CendioOssman for finding the cure.
2022-02-08 07:16:37 +01:00
ManoloFLTK
53605ba055 Add note about use of Fl_Window::decorated_h() under the X11 platform. 2022-02-07 19:14:09 +01:00
Matthias Melcher
db0a1f4bae
OpenGL implementation of all fl_ "Drawing Fast Shapes" graphics calls (#385)
* Fix build system for unites,

* Updated unittest to check OpenGL drawing.

Making sure that OpenGL drawing is exactly the same
as native drawing to make FLTK widget rendering
look the same in GL windows.

* Make OpenGL optional.

* Implemented clipping in OpenGL

* unites drawing fast shapes

* Fixed CMake

* Updating unittest.

Added tests for fl_pi and fl_arc (int)
Renamed tab to render complex shapes.

* Improved OpenGL FLTK drawing emulation.

* Fixed GTK ROUND DOWN BOX

* Fixing Makefile for unittest

* Correctly aligning OpenGL text.

* Fixed text alignment in GL windows.

Explained the "FLTK over GL " example in Cube.

* Overlapping test.

* Better GL graphics alignment.

* Drawing the focus rect.

* Adding Alpha Channel support for GL.

* Added FLTK-on-GL documentation.
2022-02-06 15:22:24 +01:00
Albrecht Schlosser
af4954aee3 CMake/macOS: build arm files for libpng only on ARM
Remove macOS warning "ranlib: file ... has no symbols" although this
works only partially (see comment in png/CMakeLists.txt).
2022-02-05 21:37:37 +01:00
Albrecht Schlosser
6f09219c43 CMake: Remove unnecessary file from build system
Remove macOS warning "ranlib: file ... has no symbols".
2022-02-05 21:36:48 +01:00
ManoloFLTK
2ef4a81d18 Minor improvement in Fl_Mac_App_Menu::custom_application_menu_items(). 2022-02-05 09:01:51 +01:00
Albrecht Schlosser
e73f9d466d Rearrange "Print Button Window" functions
- Rename Fl_Screen_Driver::print_or_copy_window() to
    fl_print_or_copy_window()
- Add header file src/print_button.h
- Update dependencies
2022-02-03 21:57:47 +01:00
Albrecht Schlosser
c483c4c5de Fl_Preferences (X11): Fix detection of preferences directory
- Fix compiler warning [-Wmaybe-uninitialized] for variable home
- Reformat enum 'Root' for better readability
- Add new enum values CORE_SYSTEM_L and CORE_USER_L
- Improve documentation (deprecated and new enums)
- Initialize internal static variable 'filename' which could be used
  uninitialized and thus return any previous value (type == MEMORY)
2022-02-03 20:46:13 +01:00
Albrecht Schlosser
80a22e97e8 Fl_Timeout: Remove compiler warning [-Wclass-memaccess]
Also: fix doxygen warning
2022-02-03 19:56:47 +01:00
Albrecht Schlosser
4eaa6dfd0d Remove platform #ifdef from macOS native filechooser 2022-02-03 19:38:33 +01:00
ManoloFLTK
2e6e0b9c36 Reorganize classes Fl_System_Driver and Fl_Screen_Driver
These virtual members are moved from Fl_Screen_Driver to Fl_System_Driver
- wait(double)
- ready()

These virtual members are moved from Fl_System_Driver to Fl_Screen_Driver
- copy(const char *stuff, int len, int clipboard, const char *type)
- void paste(Fl_Widget &widget, int clipboard, const char *type)
- clipboard_contains(const char *type)
- clipboard_notify_change()

These members are moved from Fl_X11_Screen_Driver to Fl_X11_System_Driver
- poll_or_select_with_delay(double time_to_wait)
- poll_or_select()
and are made virtual in preparation for the introduction of class
Fl_Unix_System_Driver.
2022-02-03 07:03:44 +01:00
ManoloFLTK
d9451a8669 Add platform-independent Fl_Screen_Driver::print_or_copy_window().
This member function is available for all platforms to print or copy the front window
with or without its titlebar.
2022-02-02 14:55:48 +01:00
ManoloFLTK
895ac51c69 macOS: add "Toggle printing of titlebar" to application menu - cont'd. 2022-02-02 11:19:09 +01:00
ManoloFLTK
935074ba0b macOS: add "Toggle printing of titlebar" to application menu. 2022-02-02 11:05:53 +01:00
Albrecht Schlosser
ec98dc113f CMake: Fix image libraries build if fallback is used
The CMake instructions would use the wrong image libs (png, jpeg, zlib)
if the fallback was active (OPTION_USE_SYSTEM_XXX) was true but the
header files were not present.

This had already been fixed for jpeg but not for the other two libs.
This commit rearranges the logic for all three libs.

Add information about builtin or system libraries to config summary.
2022-02-01 00:54:42 +01:00
Albrecht Schlosser
29d9e31c51
Consolidate timeout handling across platforms (#379)
Add Fl_Timeout class

Move platform independent code of Fl::wait() to main part

- basic timeout handling
- Fl::run_checks()
- Fl::run_idle()
- Fl::idle()
- waiting time calculation (next timeout)
- remove platform dependent "screen driver" stuff
2022-01-31 22:27:17 +01:00
Matthias Melcher
cf4a832e6a
Adding Text_Display color variables. (#384) 2022-01-30 22:14:40 +01:00
Matthias Melcher
303e8de483 More natural shading for Checkers pieces. 2022-01-29 00:25:34 +01:00
Matthias Melcher
adfb9d83f6 Checkers pieces scaling. 2022-01-28 14:22:53 +01:00
Matthias Melcher
2dc6010d5a New Checkers pieces created by me from scratch.
Remove possible licensing issues. Added vector file.
2022-01-28 13:45:14 +01:00
Albrecht Schlosser
8e42f772f5 Remove obsolete image file (#31)
The checkers pieces are now maintained as .png images, the original
(Gimp) image is obsolete.
2022-01-28 00:52:11 +01:00
Matthias Melcher
cdb51045dd
Background color attribute for Fl_Text_Display. (#378)
* Background color attribute for Fl_Text_Display.

* Adding attributes.

* Avoid clipping horizontal

* Fl_Text_Display underlining.

* Better line positions

* Typos, testing.

* Documentation.
2022-01-27 23:50:06 +01:00
Matthias Melcher
84c0b7495b #31, HiDPI checkers, animation timing 2022-01-26 22:55:22 +01:00
Matthias Melcher
573921677c Removed GL Button from test/cube 2022-01-26 17:40:38 +01:00
Matthias Melcher
5d9db35386 Fix for #381, backward function crash
when no menu item is selected.
2022-01-26 17:17:24 +01:00
Matthias Melcher
7308bcdb74
Preferences XDG path (#377)
* Preferences: remove CamelCase from public interface.

* Prefs: documentation.

* Prefs: updating Doxygen comments

* XDG conforming preferences path
2022-01-23 22:35:21 +01:00
Albrecht Schlosser
04ccc8cc46 Remove experimental platforms Android, Pico, SDL (PR #376)
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule"
https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-23 18:12:47 +01:00
Greg Ercolano
b275ff0715 Fix for fltk when make install used 2022-01-23 03:10:13 -08:00
Albrecht Schlosser
c0f5080cb0 Fix compiler warnings [-Wunused-variable]
... and missing return value [-Wreturn-type]
2022-01-21 13:38:26 +01:00
Matthias Melcher
09eff7243a
Fixing and upgrading Fl_Preferences (#374)
* Added filename function to Fl_Preferences

Static function to get filename before opening.
Member to get filename after opening.
Bug fixes for memory mapped preferences.

* ERROR is a macro on Windows, don't use it

* Added Fl_Preferences::dirty().

User can now check if the database will be written
when flushed or destroyed.
Flush returns a crude error code.

* Fl_Preferences::get binary data returns # of bytes read.

* Verified group deletion code

* Fl_Preferences ignores locale.

This will make .prefs files interchangeable
between different computers.

* Updating the Preferences Mode to ignore locale.

* Fixes in docs.
2022-01-19 16:08:29 +01:00
ManoloFLTK
793f4b90fa Remove potential compiler error with -Wc++11-narrowing 2022-01-19 12:03:45 +01:00
ManoloFLTK
86a9aa6099 Comment out deprecated Doxygen tag COLS_IN_ALPHA_INDEX. 2022-01-17 15:24:07 +01:00
Albrecht Schlosser
cd611e3957 Remove unnecessary CMake test statement (#358)
Sorry for the noise, this statement was included in my proposed patch.
2022-01-17 15:17:17 +01:00
Greg Ercolano
196430b016 Issue #358 cont'd: Fl_Cairo_Window coord system docs
Elaborated on Fl_Cairo_Window's use of FLTK style coordinates,
    and how this differs from cairo's default native normalized
    coordinate system, and shows how to switch from one to the other.

    Also, small comment fix to the cairo example regarding the "X" color.
2022-01-16 16:59:49 -08:00
Greg Ercolano
313212b497 Adding Albrecht's CMakeLists.txt patch
Albrecht submitted this in issue 358.
    Tested the variations:

    	cmake ..		                               -- examples and cairo off
	cmake -D FLTK_BUILD_EXAMPLES=on                        -- examples on, cairo off
	cmake -D FLTK_BUILD_EXAMPLES=on -D OPTION_CAIRO=on ..  -- examples on, cairo on

    When examples are 'on', they build into the bin/examples directory.
2022-01-16 15:42:23 -08:00
Greg Ercolano
6546814a23 For issue #358 - adds examples/cairo-draw-x.cxx
Since this is the first cairo example in the examples directory,
    it necessarily involved changes to the Makefile and to fltk-config
    to properly handle the absence/existance of the cairo libs.

    TBD: Add docs to the cario widget describing coordinate system
    and how it differs from the default cairo normalized coordinate system.
2022-01-16 15:22:16 -08:00