aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx206
1 files changed, 103 insertions, 103 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index b9926a366..c79db58a3 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -306,9 +306,9 @@ class FontCached : Font {
int technology;
int hash;
explicit FontCached(const FontParameters &fp);
- ~FontCached() {}
+ ~FontCached() override {}
bool SameAs(const FontParameters &fp);
- virtual void Release();
+ void Release() override;
static FontCached *first;
public:
@@ -521,49 +521,49 @@ class SurfaceGDI : public Surface {
SurfaceGDI &operator=(const SurfaceGDI &);
public:
SurfaceGDI();
- virtual ~SurfaceGDI();
-
- void Init(WindowID wid);
- void Init(SurfaceID sid, WindowID wid);
- void InitPixMap(int width, int height, Surface *surface_, WindowID wid);
-
- void Release();
- bool Initialised();
- void PenColour(ColourDesired fore);
- int LogPixelsY();
- int DeviceHeightFont(int points);
- void MoveTo(int x_, int y_);
- void LineTo(int x_, int y_);
- void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back);
- void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back);
- void FillRectangle(PRectangle rc, ColourDesired back);
- void FillRectangle(PRectangle rc, Surface &surfacePattern);
- void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back);
+ ~SurfaceGDI() override;
+
+ void Init(WindowID wid) override;
+ void Init(SurfaceID sid, WindowID wid) override;
+ void InitPixMap(int width, int height, Surface *surface_, WindowID wid) override;
+
+ void Release() override;
+ bool Initialised() override;
+ void PenColour(ColourDesired fore) override;
+ int LogPixelsY() override;
+ int DeviceHeightFont(int points) override;
+ void MoveTo(int x_, int y_) override;
+ void LineTo(int x_, int y_) override;
+ void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) override;
+ void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) override;
+ void FillRectangle(PRectangle rc, ColourDesired back) override;
+ void FillRectangle(PRectangle rc, Surface &surfacePattern) override;
+ void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back) override;
void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
- ColourDesired outline, int alphaOutline, int flags);
- void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage);
- void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back);
- void Copy(PRectangle rc, Point from, Surface &surfaceSource);
+ ColourDesired outline, int alphaOutline, int flags) override;
+ void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;
+ void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) override;
+ void Copy(PRectangle rc, Point from, Surface &surfaceSource) override;
void DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, UINT fuOptions);
- void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back);
- void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back);
- void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore);
- void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions);
- XYPOSITION WidthText(Font &font_, const char *s, int len);
- XYPOSITION WidthChar(Font &font_, char ch);
- XYPOSITION Ascent(Font &font_);
- XYPOSITION Descent(Font &font_);
- XYPOSITION InternalLeading(Font &font_);
- XYPOSITION ExternalLeading(Font &font_);
- XYPOSITION Height(Font &font_);
- XYPOSITION AverageCharWidth(Font &font_);
-
- void SetClip(PRectangle rc);
- void FlushCachedState();
-
- void SetUnicodeMode(bool unicodeMode_);
- void SetDBCSMode(int codePage_);
+ void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) override;
+ void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) override;
+ void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) override;
+ void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions) override;
+ XYPOSITION WidthText(Font &font_, const char *s, int len) override;
+ XYPOSITION WidthChar(Font &font_, char ch) override;
+ XYPOSITION Ascent(Font &font_) override;
+ XYPOSITION Descent(Font &font_) override;
+ XYPOSITION InternalLeading(Font &font_) override;
+ XYPOSITION ExternalLeading(Font &font_) override;
+ XYPOSITION Height(Font &font_) override;
+ XYPOSITION AverageCharWidth(Font &font_) override;
+
+ void SetClip(PRectangle rc) override;
+ void FlushCachedState() override;
+
+ void SetUnicodeMode(bool unicodeMode_) override;
+ void SetDBCSMode(int codePage_) override;
};
SurfaceGDI::SurfaceGDI() :
@@ -1086,54 +1086,54 @@ class SurfaceD2D : public Surface {
SurfaceD2D &operator=(const SurfaceD2D &);
public:
SurfaceD2D();
- virtual ~SurfaceD2D();
+ virtual ~SurfaceD2D() override;
void SetScale();
- void Init(WindowID wid);
- void Init(SurfaceID sid, WindowID wid);
- void InitPixMap(int width, int height, Surface *surface_, WindowID wid);
+ void Init(WindowID wid) override;
+ void Init(SurfaceID sid, WindowID wid) override;
+ void InitPixMap(int width, int height, Surface *surface_, WindowID wid) override;
- void Release();
- bool Initialised();
+ void Release() override;
+ bool Initialised() override;
HRESULT FlushDrawing();
- void PenColour(ColourDesired fore);
+ void PenColour(ColourDesired fore) override;
void D2DPenColour(ColourDesired fore, int alpha=255);
- int LogPixelsY();
- int DeviceHeightFont(int points);
- void MoveTo(int x_, int y_);
- void LineTo(int x_, int y_);
- void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back);
- void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back);
- void FillRectangle(PRectangle rc, ColourDesired back);
- void FillRectangle(PRectangle rc, Surface &surfacePattern);
- void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back);
+ int LogPixelsY() override;
+ int DeviceHeightFont(int points) override;
+ void MoveTo(int x_, int y_) override;
+ void LineTo(int x_, int y_) override;
+ void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) override;
+ void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) override;
+ void FillRectangle(PRectangle rc, ColourDesired back) override;
+ void FillRectangle(PRectangle rc, Surface &surfacePattern) override;
+ void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back) override;
void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
- ColourDesired outline, int alphaOutline, int flags);
- void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage);
- void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back);
- void Copy(PRectangle rc, Point from, Surface &surfaceSource);
+ ColourDesired outline, int alphaOutline, int flags) override;
+ void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;
+ void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) override;
+ void Copy(PRectangle rc, Point from, Surface &surfaceSource) override;
void DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, UINT fuOptions);
- void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back);
- void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back);
- void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore);
- void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions);
- XYPOSITION WidthText(Font &font_, const char *s, int len);
- XYPOSITION WidthChar(Font &font_, char ch);
- XYPOSITION Ascent(Font &font_);
- XYPOSITION Descent(Font &font_);
- XYPOSITION InternalLeading(Font &font_);
- XYPOSITION ExternalLeading(Font &font_);
- XYPOSITION Height(Font &font_);
- XYPOSITION AverageCharWidth(Font &font_);
-
- void SetClip(PRectangle rc);
- void FlushCachedState();
-
- void SetUnicodeMode(bool unicodeMode_);
- void SetDBCSMode(int codePage_);
+ void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) override;
+ void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) override;
+ void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) override;
+ void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions) override;
+ XYPOSITION WidthText(Font &font_, const char *s, int len) override;
+ XYPOSITION WidthChar(Font &font_, char ch) override;
+ XYPOSITION Ascent(Font &font_) override;
+ XYPOSITION Descent(Font &font_) override;
+ XYPOSITION InternalLeading(Font &font_) override;
+ XYPOSITION ExternalLeading(Font &font_) override;
+ XYPOSITION Height(Font &font_) override;
+ XYPOSITION AverageCharWidth(Font &font_) override;
+
+ void SetClip(PRectangle rc) override;
+ void FlushCachedState() override;
+
+ void SetUnicodeMode(bool unicodeMode_) override;
+ void SetDBCSMode(int codePage_) override;
};
SurfaceD2D::SurfaceD2D() :
@@ -2091,34 +2091,34 @@ public:
parent(NULL), ctrlID(0), doubleClickAction(NULL), doubleClickActionData(NULL),
widestItem(NULL), maxCharWidth(1), resizeHit(0), wheelDelta(0) {
}
- virtual ~ListBoxX() {
+ ~ListBoxX() override {
if (fontCopy) {
::DeleteObject(fontCopy);
fontCopy = 0;
}
}
- virtual void SetFont(Font &font);
- virtual void Create(Window &parent_, int ctrlID_, Point location_, int lineHeight_, bool unicodeMode_, int technology_);
- virtual void SetAverageCharWidth(int width);
- virtual void SetVisibleRows(int rows);
- virtual int GetVisibleRows() const;
- virtual PRectangle GetDesiredRect();
- virtual int CaretFromEdge();
- virtual void Clear();
- virtual void Append(char *s, int type = -1);
- virtual int Length();
- virtual void Select(int n);
- virtual int GetSelection();
- virtual int Find(const char *prefix);
- virtual void GetValue(int n, char *value, int len);
- virtual void RegisterImage(int type, const char *xpm_data);
- virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage);
- virtual void ClearRegisteredImages();
- virtual void SetDoubleClickAction(CallBackAction action, void *data) {
+ virtual void SetFont(Font &font) override;
+ virtual void Create(Window &parent_, int ctrlID_, Point location_, int lineHeight_, bool unicodeMode_, int technology_) override;
+ virtual void SetAverageCharWidth(int width) override;
+ virtual void SetVisibleRows(int rows) override;
+ virtual int GetVisibleRows() const override;
+ virtual PRectangle GetDesiredRect() override;
+ virtual int CaretFromEdge() override;
+ virtual void Clear() override;
+ virtual void Append(char *s, int type = -1) override;
+ virtual int Length() override;
+ virtual void Select(int n) override;
+ virtual int GetSelection() override;
+ virtual int Find(const char *prefix) override;
+ virtual void GetValue(int n, char *value, int len) override;
+ virtual void RegisterImage(int type, const char *xpm_data) override;
+ virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) override;
+ virtual void ClearRegisteredImages() override;
+ virtual void SetDoubleClickAction(CallBackAction action, void *data) override {
doubleClickAction = action;
doubleClickActionData = data;
}
- virtual void SetList(const char *list, char separator, char typesep);
+ virtual void SetList(const char *list, char separator, char typesep) override;
void Draw(DRAWITEMSTRUCT *pDrawItem);
LRESULT WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);
static LRESULT PASCAL StaticWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);
@@ -2983,13 +2983,13 @@ public:
h = ::LoadLibraryA(modulePath);
}
- virtual ~DynamicLibraryImpl() {
+ ~DynamicLibraryImpl() override {
if (h != NULL)
::FreeLibrary(h);
}
// Use GetProcAddress to get a pointer to the relevant function.
- virtual Function FindFunction(const char *name) {
+ Function FindFunction(const char *name) override {
if (h != NULL) {
// C++ standard doesn't like casts between function pointers and void pointers so use a union
union {
@@ -3003,7 +3003,7 @@ public:
}
}
- virtual bool IsValid() {
+ bool IsValid() override {
return h != NULL;
}
};