aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-17 15:43:24 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-17 15:43:24 +1100
commitf0861077dfa88fd1e2846b164701eca5de63c292 (patch)
tree73e7cca1b5b22a65cb2d1f2549982ce9c6463036
parent1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4 (diff)
downloadscintilla-mirror-f0861077dfa88fd1e2846b164701eca5de63c292.tar.gz
Remove Window::SetFont as never used.
-rw-r--r--cocoa/PlatCocoa.mm6
-rwxr-xr-xgtk/PlatGTK.cxx4
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp6
-rw-r--r--src/Platform.h3
-rw-r--r--win32/PlatWin.cxx5
5 files changed, 1 insertions, 23 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index 149949048..66ddddb41 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -1406,12 +1406,6 @@ void Window::InvalidateRectangle(PRectangle rc) {
//--------------------------------------------------------------------------------------------------
-void Window::SetFont(const Font *) {
- // Implemented on list subclass on Cocoa.
-}
-
-//--------------------------------------------------------------------------------------------------
-
/**
* Converts the Scintilla cursor enum into an NSCursor and stores it in the associated NSView,
* which then will take care to set up a new mouse tracking rectangle.
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 5471a7289..9fe312121 100755
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1067,10 +1067,6 @@ void Window::InvalidateRectangle(PRectangle rc) {
}
}
-void Window::SetFont(const Font *) {
- // Can not be done generically but only needed for ListBox
-}
-
void Window::SetCursor(Cursor curs) {
// We don't set the cursor to same value numerous times under gtk because
// it stores the cursor in the window once it's set
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index ee17bf0f7..9cd68a2df 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -710,12 +710,6 @@ void Window::InvalidateRectangle(PRectangle rc)
window(wid)->update(QRectFromPRect(rc));
}
-void Window::SetFont(const Font *font)
-{
- if (wid)
- window(wid)->setFont(*FontPointer(font));
-}
-
void Window::SetCursor(Cursor curs)
{
if (wid) {
diff --git a/src/Platform.h b/src/Platform.h
index cd096af6b..5b2116fcd 100644
--- a/src/Platform.h
+++ b/src/Platform.h
@@ -245,7 +245,6 @@ public:
void Show(bool show=true);
void InvalidateAll();
void InvalidateRectangle(PRectangle rc);
- virtual void SetFont(const Font *font);
enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand };
void SetCursor(Cursor curs);
PRectangle GetMonitorRect(Point pt);
@@ -276,7 +275,7 @@ public:
~ListBox() override;
static ListBox *Allocate();
- void SetFont(const Font *font) override =0;
+ virtual void SetFont(const Font *font)=0;
virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0;
virtual void SetAverageCharWidth(int width)=0;
virtual void SetVisibleRows(int rows)=0;
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index f63262cfe..cade8d005 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -2341,11 +2341,6 @@ void Window::InvalidateRectangle(PRectangle rc) {
::InvalidateRect(HwndFromWindowID(wid), &rcw, FALSE);
}
-void Window::SetFont(const Font *font) {
- const FontWin *pfm = dynamic_cast<const FontWin *>(font);
- SetWindowFont(HwndFromWindowID(wid), pfm->HFont(), 0);
-}
-
namespace {
void FlipBitmap(HBITMAP bitmap, int width, int height) noexcept {