summaryrefslogtreecommitdiff
path: root/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-12-18 08:52:55 +0000
committerManolo Gouy <Manolo>2017-12-18 08:52:55 +0000
commit3f9f4debbba0527658ce09044fbff90e332235cc (patch)
treea3a4852ab786012432666a1fe07fdca9f05387dc /src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
parent31f16205cb31d724ee93444f5b9b17e7fa3ae3b1 (diff)
STR#3444: Add MacOS support for application rescaling (not quite complete)
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes. A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly. GLUT apps can also be scaled (across platforms). SVG images are re-rasterized after app scaling for optimal drawing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
index 3335a39ff..5e318a2e3 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
@@ -4,7 +4,7 @@
// Definition of Apple Cocoa Screen interface
// for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2016 by Bill Spitzak and others.
+// Copyright 2010-2017 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -97,6 +97,12 @@ public:
// --- compute dimensions of an Fl_Offscreen
virtual void offscreen_size(Fl_Offscreen o, int &width, int &height);
virtual float retina_factor() { return 2; }
+
+ virtual APP_SCALING_CAPABILITY rescalable() { return SYSTEMWIDE_APP_SCALING; }
+ virtual float scale(int n) {return scale_;}
+ virtual void scale(int n, float f) { scale_ = f;}
+private:
+ float scale_;
};