diff options
author | nyamatongwe <unknown> | 2009-04-01 01:54:21 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-04-01 01:54:21 +0000 |
commit | 1cba55c0d91c4a423bc7c2096c6ff841e63244a1 (patch) | |
tree | 7ee5153591f173fb56c030d21dbc4601753d974a /src | |
parent | 6f4e00a1c5ef532b0c4c875d808037c9978cad19 (diff) | |
download | scintilla-mirror-1cba55c0d91c4a423bc7c2096c6ff841e63244a1.tar.gz |
Added commands to add extra ascent and descent space.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 16 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 6 | ||||
-rw-r--r-- | src/ViewStyle.h | 2 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index c4c3a8179..0a619d9a6 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7610,6 +7610,22 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETCHARACTERPOINTER: return reinterpret_cast<sptr_t>(pdoc->BufferPointer()); + case SCI_SETEXTRAASCENT: + vs.extraAscent = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETEXTRAASCENT: + return vs.extraAscent; + + case SCI_SETEXTRADESCENT: + vs.extraDescent = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETEXTRADESCENT: + return vs.extraDescent; + default: return DefWndProc(iMessage, wParam, lParam); } diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 811f79a6d..686862a2d 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -139,6 +139,8 @@ ViewStyle::ViewStyle(const ViewStyle &source) { viewEOL = source.viewEOL; showMarkedLines = source.showMarkedLines; extraFontFlag = source.extraFontFlag; + extraAscent = source.extraAscent; + extraDescent = source.extraDescent; } ViewStyle::~ViewStyle() { @@ -233,6 +235,8 @@ void ViewStyle::Init(size_t stylesSize_) { viewEOL = false; showMarkedLines = true; extraFontFlag = false; + extraAscent = 0; + extraDescent = 0; } void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { @@ -284,6 +288,8 @@ void ViewStyle::Refresh(Surface &surface) { someStylesProtected = true; } } + maxAscent += extraAscent; + maxDescent += extraDescent; lineHeight = maxAscent + maxDescent; aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth; diff --git a/src/ViewStyle.h b/src/ViewStyle.h index 2f2d52461..3f8b856b9 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -102,6 +102,8 @@ public: int caretWidth; bool someStylesProtected; bool extraFontFlag; + int extraAscent; + int extraDescent; ViewStyle(); ViewStyle(const ViewStyle &source); |