aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/Platform.h
diff options
context:
space:
mode:
authormitchell <unknown>2018-05-25 13:33:38 -0400
committermitchell <unknown>2018-05-25 13:33:38 -0400
commit43566e4211e18057662ff5d8c8d3996b73090d43 (patch)
tree0b501aa992e9ccdcc36b25d10d72a51785a9a515 /include/Platform.h
parent7a4fd484cc8229d3518039c82d950b4fa7f673cb (diff)
downloadscintilla-mirror-43566e4211e18057662ff5d8c8d3996b73090d43.tar.gz
Backport: Modernize Platform.h (3) - update Surface to delete WidthChar, use size_t for Polygon and delete the standard copy and assignment methods.
Backport of changeset 6940:89fd29243232.
Diffstat (limited to 'include/Platform.h')
-rw-r--r--include/Platform.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/Platform.h b/include/Platform.h
index 97c4fca1d..d049ccc45 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -257,12 +257,12 @@ public:
* A surface abstracts a place to draw.
*/
class Surface {
-private:
- // Private so Surface objects can not be copied
- Surface(const Surface &) {}
- Surface &operator=(const Surface &) { return *this; }
public:
- Surface() {}
+ Surface() noexcept = default;
+ Surface(const Surface &) = delete;
+ Surface(Surface &&) = delete;
+ Surface &operator=(const Surface &) = delete;
+ Surface &operator=(Surface &&) = delete;
virtual ~Surface() {}
static Surface *Allocate(int technology);
@@ -277,7 +277,7 @@ public:
virtual int DeviceHeightFont(int points)=0;
virtual void MoveTo(int x_, int y_)=0;
virtual void LineTo(int x_, int y_)=0;
- virtual void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back)=0;
+ virtual void Polygon(Point *pts, size_t npts, ColourDesired fore, ColourDesired back)=0;
virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
virtual void FillRectangle(PRectangle rc, ColourDesired back)=0;
virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0;
@@ -293,7 +293,6 @@ public:
virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore)=0;
virtual void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions)=0;
virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0;
- virtual XYPOSITION WidthChar(Font &font_, char ch)=0;
virtual XYPOSITION Ascent(Font &font_)=0;
virtual XYPOSITION Descent(Font &font_)=0;
virtual XYPOSITION InternalLeading(Font &font_)=0;