Commit Graph

2245 Commits

Author SHA1 Message Date
ManoloFLTK
d096ec48d0 Documentation: add missing mentions of the Wayland platform. 2022-07-05 10:13:31 +02:00
ManoloFLTK
0fdef887d0 Documentation: add Wayland-related information for use of OpenGL 3. 2022-07-04 14:44:23 +02:00
ManoloFLTK
02870242ee Move input method support to Fl_Screen_Driver from Fl_Graphics_Driver 2022-06-19 10:23:24 +02:00
ManoloFLTK
4b30f78567 Remove warning: 'virtual void Fl_Graphics_Driver::xyline(int, int, int, int)' was hidden. 2022-05-11 15:57:44 +02:00
ManoloFLTK
20c50312fc Cleaner declaration of public function fl_wl_cairo(). 2022-05-09 09:41:50 +02:00
Albrecht Schlosser
804c48515d Improve docs of Fl_Image and related classes (#431)
Clarifications as discussed since April 15, 2022 07:00 UTC (see GitHub
issue #431).
2022-04-20 17:26:33 +02:00
Albrecht Schlosser
8bcfb88679 Fix documentation typo
Fix missing opening quote. (#431 cont'd)
2022-04-15 02:16:06 +02:00
Albrecht Schlosser
114dbc9c81 Clarify documentation of Fl_Image::copy() and more (#431)
- emphasize that Fl_Image::copy(W, H) creates an image with
  w() == data_w() == W and h() == data_h() == H
- clarify some more docs of Fl_Image methods (ensure that data_w()
  and data_h() are used where appropriate rather than w() and h()
- improve wording, examples, and formatting of related docs.

Closes #431
2022-04-15 02:01:33 +02:00
ManoloFLTK
d83d89679b Fix for issue #429 : Segfault with Ctrl+/- with current git version 2022-04-14 11:07:56 +02:00
Albrecht Schlosser
10537b7143 Make Fl_Image::copy() 'const', including all derived classes
Copying an image does not (and must not) change the original object,
hence copy() should always be 'const'.

This is *necessary* if the given Fl_Image object is 'const'.
2022-04-13 16:50:30 +02:00
ManoloFLTK
95b5623b96 Fix for issue #427 - continued. 2022-04-13 11:13:05 +02:00
ManoloFLTK
bfae813c4e Fix for issue #427: Problems with data_w, data_h, w, h of Fl_Image. 2022-04-12 15:06:21 +02:00
ManoloFLTK
04305ec7e3 Add note to doc of Fl_Cairo_Window about required build option. 2022-04-07 17:21:23 +02:00
ManoloFLTK
ee5b9974bb Update doc of struct Fl_Menu_Item whose shortcut_ member is now an int. 2022-04-07 12:12:20 +02:00
Albrecht Schlosser
717a7d266b Remove '#include <sys/stat.h>' from FL/platform_types.h
- Add this include statement only where needed.
- Rename Fl_System_Driver::stat() to flstat().

This fixes an issue when using some (!) MinGW 64-bit build systems
that obviously '#define stat _stat64' or similar. This would
result in compiler problems if 'stat()' is a member function of
Fl_System_Driver.
2022-04-03 22:01:41 +02:00
Albrecht Schlosser
e91d65cd2f Fix whitespace errors (no code changes) 2022-03-31 16:00:11 +02:00
ManoloFLTK
d9a6ec88e4 Add support of Fl_Region to the Cairo graphics driver
and remove it from the Wayland graphics driver.
2022-03-31 10:36:01 +02:00
Albrecht Schlosser
a638f5a545 Add method Fl_Shared_Image::image()
This public method returns a pointer to the internal Fl_Image
object (const Fl_Image *). This is only for reference, the internal
image must not be modified by user code but it can be inspected and
copied to another image.
2022-03-30 15:56:27 +02:00
ManoloFLTK
dc8c4b5676 Wayland: replace public fl_event_time by static wld_event_time. 2022-03-27 09:20:30 +02:00
YX
e9b1c2fed0 Add const to Fl_Image::fail() (PR #415) 2022-03-26 17:55:13 +01:00
Albrecht Schlosser
fc250a3aa2 Update documentation and dependencies 2022-03-25 17:27:46 +01:00
ManoloFLTK
427e4dbc7a Remove platform-dependent type Fl_Bitmask (not in documented public API). 2022-03-24 10:00:01 +01:00
ManoloFLTK
2d71a95b5d Wayland: replace global fl_display by function struct wl_display *fl_wl_display(). 2022-03-23 11:37:25 +01:00
ManoloFLTK
d87b62ea69 Avoid using same name (p) for distinct members of derived classes. 2022-03-21 15:56:50 +01:00
ManoloFLTK
bf5b902180 Rename member Fl_Graphics_Driver::p to xpoint to avoid shadowing. 2022-03-21 14:39:00 +01:00
ManoloFLTK
a9412b41bb Issue #359 RFE: access the MacOS windowid . 2022-03-21 11:41:51 +01:00
Albrecht Schlosser
4bcd5c467b Improve documentation of Fl_Image::copy()
Mention the new Fl_Image::release() method to delete all types of
images.
2022-03-20 15:52:08 +01:00
ManoloFLTK
9d869d73c1 Begin documenting the Wayland platform, new in FLTK version 1.4 2022-03-10 15:05:26 +01:00
Albrecht Schlosser
53b40f4138 Improve documentation on Fl_Menu_Item's and related methods (#332)
See discussion on GitHub Issue #332.

Summary: don't change FLTK code but document what to do and not to do.
2022-03-07 18:28:32 +01:00
ManoloFLTK
3718effc43 Add the Wayland platform to FLTK 1.4 2022-03-04 15:41:00 +01:00
Albrecht Schlosser
a773fdc44b Fix whitespace, update dependencies and fluid files 2022-03-03 17:20:24 +01:00
Albrecht Schlosser
091712bea8 Fix default size_range() calculation (issue #392, STR 3352) 2022-03-01 13:45:51 +01:00
Albrecht Schlosser
cdd1933661 X11: Disable "boxcheat" hack
For details see comment in src/Fl_x.cxx: this "Hack to speed up
bg box drawing" is now disabled for several reasons. The code
is still available if the macro ENABLE_BOXCHEAT is defined.
2022-02-22 19:55:11 +01:00
Albrecht Schlosser
84c06419bc Remove obsolete/disabled "boxcheat" code
Windows platform: Remove comments about obsolete code and one
exported declaration of the variable 'fl_background_pixel' which
is used only on the X11 platform.

X11 platform: Remove comments.

Other platforms: not affected.
2022-02-21 20:38:33 +01:00
Kevin Routley
2de8f8579c
DOC: Provide a link to the "FLTK Standard Box Types" image (#397)
* Provide a link to the "FLTK standard box types" image

The doc for Box Types has the text "see figure 1" which does not exist! [It is figure 5.3 in PDF, no number in HTML].

This change provides a hyperlink which allows the reader to actually navigate to the cited figure.

Confirmed to work as desired in HTML; I don't have LATEX so cannot confirm the PDF.

* Add figure title "Standard Box Types" (#397)

Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2022-02-21 16:42:08 +01:00
Kevin Routley
f196ffbb52
Fix documentation error in Fl_Tabs (#391) 2022-02-13 12:40:48 +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
ManoloFLTK
bf16e4e8aa More detailed doc of Fl_Window::decorated_h() for X11 platform. 2022-02-08 08:03:35 +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
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
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
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
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
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
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
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