diff options
| author | nyamatongwe <devnull@localhost> | 2009-04-01 01:54:21 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2009-04-01 01:54:21 +0000 | 
| commit | 803e7ff02753ff859e44b78ba1368aa4e1c07af9 (patch) | |
| tree | 7ee5153591f173fb56c030d21dbc4601753d974a /src | |
| parent | fd0b09668969d458642e1b7d9dbf447cfae6bc92 (diff) | |
| download | scintilla-mirror-803e7ff02753ff859e44b78ba1368aa4e1c07af9.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); | 
