diff options
author | Neil <nyamatongwe@gmail.com> | 2014-07-08 13:08:02 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-07-08 13:08:02 +1000 |
commit | 0e655d49868553951a036a203b7407d9d2afc532 (patch) | |
tree | 5978f0a1f036cdf273de14eb5b940ed03bb056ef /gtk/ScintillaGTK.cxx | |
parent | 126d13674fa63256b6576e5317791b6f77ebefb3 (diff) | |
download | scintilla-mirror-0e655d49868553951a036a203b7407d9d2afc532.tar.gz |
Specifying some methods as const as they are used from display and measurement
code that will be changed to have read-only access.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index f74971b1b..fe3547fe2 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -192,7 +192,7 @@ private: virtual bool HaveMouseCapture(); virtual bool PaintContains(PRectangle rc); void FullPaint(); - virtual PRectangle GetClientRectangle(); + virtual PRectangle GetClientRectangle() const; virtual void ScrollText(int linesToMove); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); @@ -1121,8 +1121,9 @@ void ScintillaGTK::FullPaint() { wText.InvalidateAll(); } -PRectangle ScintillaGTK::GetClientRectangle() { - PRectangle rc = wMain.GetClientPosition(); +PRectangle ScintillaGTK::GetClientRectangle() const { + Window &win = const_cast<Window &>(wMain); + PRectangle rc = win.GetClientPosition(); if (verticalScrollBarVisible) rc.right -= verticalScrollBarWidth; if (horizontalScrollBarVisible && !Wrapping()) |