Commit Graph

8733 Commits

Author SHA1 Message Date
ManoloFLTK
d6aa3a67a0 Add screen scaling support to Fl_Cairo_Window under X11 platform. 2020-02-09 07:52:20 +01:00
ManoloFLTK
83bd04e0a3 Fix Fl_Cocoa_Window_Driver::resize when called before the window is show()'n. 2020-02-07 17:11:22 +01:00
ManoloFLTK
d068fbf9de Fix state of visible() flag after Fl_Window(x, y, w, h, t).
The doc states:
"Top-level windows initially have visible() set to 0 and parent() set to NULL.
Subwindows initially have visible() set to 1 and parent() set to the parent window pointer."
The first statement was not satisfied when a window was constructed
with the Fl_Window(x, y, w, h, t) constructor.
2020-02-07 15:23:50 +01:00
ManoloFLTK
7cb0c2311c Fix computation of Fl_Window::decorated_h() on macOS when screen is scaled. 2020-02-06 16:01:19 +01:00
Albrecht Schlosser
c0b4fed619 Documentation: update cairo_test screenshot 2020-02-05 19:12:58 +01:00
Albrecht Schlosser
97554a88cc Move fl_font(face, size) to fl_draw.cxx
I believe this is a better place.

Also: add FL_EXPORT since it's no longer inline.
2020-02-03 17:30:54 +01:00
Albrecht Schlosser
dd3485c57a Fix regression calling fl_font() w/o draw context
According to the documentation fl_font(face, size) may be called
"outside a draw context if necessary to call fl_width()".

This worked in 1.3.5 but did not in 1.4 (so far). I reworded the
docs to make clear that other measurement functions can be called
as well and refactored the code to make sure that fl_font(face, size)
will open the display if necessary.
2020-02-03 16:35:28 +01:00
Albrecht Schlosser
b8ab77e39c Don't "export" X11 specific fl_open_display() function
The X11 specific overloaded function fl_open_display(Display *)
has never been documented but exposed (and "exported" in the ABI)
in FL/platform.H which is not necessary. This internal function
is now static and no longer exposed in the ABI.

Don't confuse with fl_open_display() w/o arguments which is still
exported and declared in FL/platform.H.
2020-02-03 15:58:13 +01:00
Albrecht Schlosser
a9bdb7a7b4 Fix disabling of deprecated warnings
Fix cut'n'paste error: needs #pragma pop instead of push.
2020-01-31 15:54:51 +01:00
Albrecht Schlosser
f93b825b08 Update Fl::keyboard_screen_scaling()
- make the internal variable static
- make it callable after fl_open_display()
- document that it's currently only usable to switch scaling off
2020-01-31 15:48:21 +01:00
Albrecht Schlosser
65a798f9a2 Disable X11 "deprecated declaration" warning
... for GCC >= 4.6 and clang compilers.

This annoying warning exists on X11 (Linux/Unix/macOS) platforms
because we need to use XKeycodeToKeysym() although it is deprecated.
See STR 2913 for discussion and details.
2020-01-31 15:06:21 +01:00
Albrecht Schlosser
a71c5f4c10 Fix typo 2020-01-31 13:13:49 +01:00
ManoloFLTK
4ba6cef0b9 Add Fl::keyboard_screen_scaling(int) to control recognition of ctrl/+/-/0/ 2020-01-31 09:42:36 +01:00
ManoloFLTK
9d4d5ffdeb Mention the new "Preview" switch of the GTK native file dialog. 2020-01-31 08:10:37 +01:00
ManoloFLTK
d1afac2150 Add a "Preview" switch to the GTK native file chooser.
The button state is recorded in a preference so is recovered the next
time the GTK file chooser runs.
2020-01-31 08:07:57 +01:00
ManoloFLTK
b9ea732d02 Mention new public variable Fl_Image::register_images_done. 2020-01-30 19:14:02 +01:00
ManoloFLTK
325c4b8666 New public static variable bool Fl_Image::register_images_done
Allows an app to detect whether fl_register_images() was called or not.
2020-01-30 18:54:18 +01:00
ManoloFLTK
fbf20b7225 Protect against situation where HAVE_DLSYM && HAVE_DLFCN_H && !defined(RTLD_DEFAULT) 2020-01-30 18:49:34 +01:00
ManoloFLTK
b45a18a231 Fix Doxygen formatting problem. 2020-01-28 18:36:03 +01:00
ManoloFLTK
982892a98b Restore compilability when HAVE_DLFCN_H = 0 2020-01-27 17:38:46 +01:00
ManoloFLTK
62cc0bba74 Restore compilability when HAVE_DLFCN_H = 0 2020-01-27 17:34:56 +01:00
ManoloFLTK
1e9e742245 Fix 2 typos in Fl_Widget::shortcut_label() Doxygen doc. 2020-01-26 19:23:59 +01:00
ManoloFLTK
3384fe93df Add Fl_Widget::shortcut_label(int) to control effect of '&' in some widget labels 2020-01-26 19:15:30 +01:00
Albrecht Schlosser
d2cb11369c Improve migration docs on Fl_Preferences 2020-01-26 15:11:40 +01:00
Albrecht Schlosser
30a868dc0f Improve Unicode / UTF-8 documentation 2020-01-26 15:10:53 +01:00
Albrecht Schlosser
f3724f7488 [CMake] Remove unnecessary dependency
Building the documentation need not depend on building the library.
This change can speed up changing, building, and viewing modified
docs.
2020-01-26 15:07:15 +01:00
Albrecht Schlosser
9fa1c3182e Fix documentation of Fl_Shortcut
Unfortunately this typedef for shortcuts in Fl_Menu_Items etc.
can currently not be used with the full (21-bit) range of Unicode.

These restrictions are now documented but should be removed in a
future version, if possible.
2020-01-26 14:30:33 +01:00
ManoloFLTK
794eb962eb GTK printer chooser: add code to support choice of paper size and orientation 2020-01-24 18:05:46 +01:00
ManoloFLTK
59295b52a1 Remove unnecessary extern declaration 2020-01-23 15:44:14 +01:00
ManoloFLTK
a47df74431 Fix preservation of the caller's locale when running GTK dialogs.
There are now 2 kinds of GTK libraries (V2 and V3) and two dialogs
the file chooser and the printer chooser.
2020-01-22 18:44:49 +01:00
Albrecht Schlosser
bcc2f4c575 Fix Fl_PostScript_Graphics_Driver::clip_box() 2020-01-20 12:56:32 +01:00
Albrecht Schlosser
fc36bfd88b Improve documentation of clipping functions
Clarify functionality of fl_not_clipped() and fl_clip_box().

Add developer documentation for Fl_Graphics_Driver::clip_box().

Documentation only, no code changes in this commit.
2020-01-20 12:51:47 +01:00
ManoloFLTK
6aa9357b17 Have Fl_Quartz_Copy_Surface_Driver use retina resolution for resulting bitmap 2020-01-19 12:02:51 +01:00
ManoloFLTK
ea09ea1009 Use visible size information when copying macOS image from clipboard. 2020-01-18 17:09:10 +01:00
ManoloFLTK
ed0c443253 Set OPTION_USE_SYSTEM_LIBPNG/JPEG off under macOS by default 2020-01-18 16:05:29 +01:00
Albrecht Schlosser
2a9cdbf252 Add convenience options to glpuzzle demo
The demo exhibits a sometimes annoying /feature/ to spin the entire
puzzle if a user happens to click and/or drag the mouse somewhere on
the puzzle's background rather than on a puzzle piece.

A new command line option '-n' disables this feature entirely.

The extended menu and keyboard commands learned a new option and
keyboard shortcut 'n' => "Normal Position" to stop spinning and
to reset the puzzle to its original position.

The space key is another (hidden) shortcut for 'n'.
2020-01-18 14:40:53 +01:00
Albrecht Schlosser
088eedb0ad Update CMake instructions for cross compilation
Add CMAKE_RC_COMPILER variable, switch to 64-bit toolchain, add
a note to replace the toolchain location as required, fix typos.
2020-01-18 14:29:01 +01:00
ManoloFLTK
ef48a0ddb9 Use cross-platform code to set the window icon. 2020-01-18 13:03:29 +01:00
ManoloFLTK
ae29e4d0e4 Remove temporary CMake option OPTION_HIDPI no longer used. 2020-01-18 09:14:51 +01:00
ManoloFLTK
0a7b5b19bf Make Fl::screen_scale(int, float) functional also after initial window display. 2020-01-17 15:07:06 +01:00
Albrecht Schlosser
3e4baae6fc Fix DND in read-only Fl_Input (Fl_Output)
See report in fltk.coredev as of today (Jan 16, 2020):
  "Fl_Input in readonly mode - wrong behaviour".

Summary: Drag and drop within a read-only Fl_Input (i.e. Fl_Output)
  widget would not insert the dragged text (correct) but removed
  the dragged text from the widget (error). This is now fixed.
2020-01-16 17:12:24 +01:00
OKAMURA, Yasunobu
dd3bf0791e Fix JIS Keyboard dead keys 2020-01-16 16:17:36 +01:00
Albrecht Schlosser
33825df108 Don't include 'src/flstring.h' in menubar demo
src/flstring.h should only be used in library code because it
  includes <config.h>.

Document this fact in src/flstring.h.
2020-01-16 15:59:00 +01:00
Albrecht Schlosser
dfaab4ae90 Fix uninitialized vars in calls to fl_clip_box() (issue #6)
The main fixes are only to avoid static code analyzer warnings reported
in issue #5, but there are also minor bug fixes included. These bug
fixes are more of theoretical concerns though.

Close #6.
2020-01-15 21:23:26 +01:00
ManoloFLTK
3265d439f3 Slightly improve Fl_Quartz_Graphics_Driver::copy_offscreen() when macOS ≥ 10.4 2020-01-15 18:18:59 +01:00
Matthias Melcher
afcc79c3f7 Merge remote-tracking branch 'refs/remotes/origin/master' 2020-01-14 19:22:03 +01:00
Matthias Melcher
ed80d9cef0 Fixed some documentation for Fl_Preferences and fl_make_path. 2020-01-14 19:21:58 +01:00
ManoloFLTK
d598f9ea06 Fix typo in comment 2020-01-14 16:31:47 +01:00
Albrecht Schlosser
2437a75d5f Add missing Fl_Image_Reader files
Forgot to add these files. Sorry for the noise.
2020-01-13 23:15:00 +01:00
Albrecht Schlosser
115a6025f6 Fix Doxygen warnings and errors 2020-01-13 23:11:35 +01:00