diff options
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/PlatWin.cxx | 206 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 84 | 
2 files changed, 145 insertions, 145 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;  	}  }; diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index d189f226e..265789330 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -273,11 +273,11 @@ class ScintillaWin :  	explicit ScintillaWin(HWND hwnd);  	ScintillaWin(const ScintillaWin &); -	virtual ~ScintillaWin(); +	~ScintillaWin() override;  	ScintillaWin &operator=(const ScintillaWin &); -	virtual void Initialise(); -	virtual void Finalise(); +	void Initialise() override; +	void Finalise() override;  #if defined(USE_D2D)  	void EnsureRenderTarget(HDC hdc);  	void DropRenderTarget(); @@ -293,8 +293,8 @@ class ScintillaWin :  	enum { invalidTimerID, standardTimerID, idleTimerID, fineTimerStart }; -	virtual bool DragThreshold(Point ptStart, Point ptNow); -	virtual void StartDrag(); +	bool DragThreshold(Point ptStart, Point ptNow) override; +	void StartDrag() override;  	int TargetAsUTF8(char *text);  	void AddCharUTF16(wchar_t const *wcs, unsigned int wclen);  	int EncodedFromUTF8(char *utf8, char *encoded) const; @@ -312,39 +312,39 @@ class ScintillaWin :  	void AddWString(std::wstring wcs);  	UINT CodePageOfDocument() const; -	virtual bool ValidCodePage(int codePage) const; -	virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); -	virtual bool SetIdle(bool on); +	bool ValidCodePage(int codePage) const override; +	sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override; +	bool SetIdle(bool on) override;  	UINT_PTR timers[tickDwell+1]; -	virtual bool FineTickerAvailable(); -	virtual bool FineTickerRunning(TickReason reason); -	virtual void FineTickerStart(TickReason reason, int millis, int tolerance); -	virtual void FineTickerCancel(TickReason reason); -	virtual void SetMouseCapture(bool on); -	virtual bool HaveMouseCapture(); -	virtual void SetTrackMouseLeaveEvent(bool on); -	virtual bool PaintContains(PRectangle rc); -	virtual void ScrollText(int linesToMove); -	virtual void NotifyCaretMove(); -	virtual void UpdateSystemCaret(); -	virtual void SetVerticalScrollPos(); -	virtual void SetHorizontalScrollPos(); -	virtual bool ModifyScrollBars(int nMax, int nPage); -	virtual void NotifyChange(); -	virtual void NotifyFocus(bool focus); -	virtual void SetCtrlID(int identifier); -	virtual int GetCtrlID(); -	virtual void NotifyParent(SCNotification scn); -	virtual void NotifyDoubleClick(Point pt, int modifiers); -	virtual CaseFolder *CaseFolderForEncoding(); -	virtual std::string CaseMapString(const std::string &s, int caseMapping); -	virtual void Copy(); -	virtual void CopyAllowLine(); -	virtual bool CanPaste(); -	virtual void Paste(); -	virtual void CreateCallTipWindow(PRectangle rc); -	virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); -	virtual void ClaimSelection(); +	bool FineTickerAvailable() override; +	bool FineTickerRunning(TickReason reason) override; +	void FineTickerStart(TickReason reason, int millis, int tolerance) override; +	void FineTickerCancel(TickReason reason) override; +	void SetMouseCapture(bool on) override; +	bool HaveMouseCapture() override; +	void SetTrackMouseLeaveEvent(bool on); +	bool PaintContains(PRectangle rc) override; +	void ScrollText(int linesToMove) override; +	void NotifyCaretMove() override; +	void UpdateSystemCaret() override; +	void SetVerticalScrollPos() override; +	void SetHorizontalScrollPos() override; +	bool ModifyScrollBars(int nMax, int nPage) override; +	void NotifyChange() override; +	void NotifyFocus(bool focus) override; +	void SetCtrlID(int identifier) override; +	int GetCtrlID() override; +	void NotifyParent(SCNotification scn) override; +	void NotifyDoubleClick(Point pt, int modifiers) override; +	CaseFolder *CaseFolderForEncoding() override; +	std::string CaseMapString(const std::string &s, int caseMapping) override; +	void Copy() override; +	void CopyAllowLine() override; +	bool CanPaste() override; +	void Paste() override; +	void CreateCallTipWindow(PRectangle rc) override; +	void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override; +	void ClaimSelection() override;  	// DBCS  	void ImeStartComposition(); @@ -352,7 +352,7 @@ class ScintillaWin :  	LRESULT ImeOnReconvert(LPARAM lParam);  	void GetIntelliMouseParameters(); -	virtual void CopyToClipboard(const SelectionText &selectedText); +	void CopyToClipboard(const SelectionText &selectedText) override;  	void ScrollMessage(WPARAM wParam);  	void HorizontalScrollMessage(WPARAM wParam);  	void FullPaint(); @@ -360,15 +360,15 @@ class ScintillaWin :  	bool IsCompatibleDC(HDC dc);  	DWORD EffectFromState(DWORD grfKeyState) const; -	virtual int SetScrollInfo(int nBar, LPCSCROLLINFO lpsi, BOOL bRedraw); -	virtual bool GetScrollInfo(int nBar, LPSCROLLINFO lpsi); +	int SetScrollInfo(int nBar, LPCSCROLLINFO lpsi, BOOL bRedraw); +	bool GetScrollInfo(int nBar, LPSCROLLINFO lpsi);  	void ChangeScrollPos(int barType, int pos);  	sptr_t GetTextLength();  	sptr_t GetText(uptr_t wParam, sptr_t lParam);  public:  	// Public for benefit of Scintilla_DirectFunction -	virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); +	sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override;  	/// Implement IUnknown  	STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv); @@ -2012,7 +2012,7 @@ public:  	explicit CaseFolderDBCS(UINT cp_) : cp(cp_) {  		StandardASCII();  	} -	virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { +	size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override {  		if ((lenMixed == 1) && (sizeFolded > 0)) {  			folded[0] = mapping[static_cast<unsigned char>(mixed[0])];  			return 1; | 
