diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-14 13:42:24 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-14 13:42:24 +1000 |
commit | 8e94953b2d9f7d946445759fe31d169879b680c8 (patch) | |
tree | a5f38b198b2c82cec50b3bbe8def5907e6358ac2 /src | |
parent | 13c4548805a2a5ef718fc5dfa6f77bb60c6bed2b (diff) | |
download | scintilla-mirror-8e94953b2d9f7d946445759fe31d169879b680c8.tar.gz |
Backport: Modernize Platform.h (1) - noexcept, const, standard methods.
Changes made to FontParameters, Font, Window, ListBoxEvent, ListBox, Menu,
DynamicLibrary, and Platform.
Backport of changeset 6938:a42c7cc3254b.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 3 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index f30c08a59..abbb95917 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -307,8 +307,7 @@ Sci::Line Editor::TopLineOfMain() const { } PRectangle Editor::GetClientRectangle() const { - Window win = wMain; - return win.GetClientPosition(); + return wMain.GetClientPosition(); } PRectangle Editor::GetClientDrawingRectangle() { diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 10a70bd72..2dbca55d7 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -274,7 +274,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list Redraw(); pt = PointMainCaret(); } - if (wMargin.GetID()) { + if (wMargin.Created()) { const Point ptOrigin = GetVisibleOriginInMain(); pt.x += ptOrigin.x; pt.y += ptOrigin.y; @@ -293,7 +293,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list } rcac.right = rcac.left + widthLB; rcac.bottom = static_cast<XYPOSITION>(std::min(static_cast<int>(rcac.top) + heightLB, static_cast<int>(rcPopupBounds.bottom))); - ac.lb->SetPositionRelative(rcac, wMain); + ac.lb->SetPositionRelative(rcac, &wMain); ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font); const unsigned int aveCharWidth = static_cast<unsigned int>(vs.styles[STYLE_DEFAULT].aveCharWidth); ac.lb->SetAverageCharWidth(aveCharWidth); @@ -317,7 +317,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list rcList.top = pt.y + vs.lineHeight; } rcList.bottom = rcList.top + heightAlloced; - ac.lb->SetPositionRelative(rcList, wMain); + ac.lb->SetPositionRelative(rcList, &wMain); ac.Show(true); if (lenEntered != 0) { AutoCompleteMoveToCurrentWord(); @@ -461,7 +461,7 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) { if (ct.UseStyleCallTip()) { ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back); } - if (wMargin.GetID()) { + if (wMargin.Created()) { const Point ptOrigin = GetVisibleOriginInMain(); pt.x += ptOrigin.x; pt.y += ptOrigin.y; @@ -491,7 +491,7 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) { } // Now display the window. CreateCallTipWindow(rc); - ct.wCallTip.SetPositionRelative(rc, wMain); + ct.wCallTip.SetPositionRelative(rc, &wMain); ct.wCallTip.Show(); } |