summaryrefslogtreecommitdiff
path: root/FL/Fl.H
diff options
context:
space:
mode:
Diffstat (limited to 'FL/Fl.H')
-rw-r--r--FL/Fl.H17
1 files changed, 16 insertions, 1 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 6bb1f7447..1075c3831 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -252,6 +252,10 @@ public:
/// if the GTK library is available on the platform (linux/unix only).
/// When switched off, GTK file dialogs aren't used even if the GTK library is available.
OPTION_FNFC_USES_GTK,
+ /// When switched on (default), the library shows in a transient yellow window the zoom factor
+ /// value.
+ /// When switched off, no such window gets displayed.
+ OPTION_SHOW_SCALING,
// don't change this, leave it always as the last element
/// For internal use only.
OPTION_LAST
@@ -989,7 +993,15 @@ int main() {
/** \defgroup fl_screen Screen functions
- fl global screen functions declared in <FL/Fl.H>
+ fl global screen functions declared in <FL/Fl.H>.
+ FLTK supports high-DPI screens using a screen scaling factor.
+ The scaling factor value can be changed by typing ctrl-/+/-/0/
+ (cmd-/+/-/0/ under MacOS). FLTK sends the FL_ZOOM_EVENT when the
+ factor value is changed, to which a callback can be associated with Fl::add_handler().
+ By default, FLTK also displays the new scaling factor value in a yellow, transient window.
+ This can be changed with Fl::option(OPTION_SHOW_SCALING, 0).
+ The scaling factor value is programmatically get and set with the Fl::screen_scale() functions.
+
@{ */
static int x(); // via screen driver
static int y(); // via screen driver
@@ -1009,6 +1021,9 @@ int main() {
static void screen_work_area(int &X, int &Y, int &W, int &H, int n); // via screen driver
static void screen_work_area(int &X, int &Y, int &W, int &H); // via screen driver
static float screen_scale(int n); // via screen driver
+ static void screen_scale(int n, float factor); // via screen driver
+ static int screen_scaling_supported();
+
/** @} */