diff options
| author | nyamatongwe <unknown> | 2001-09-07 08:01:30 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2001-09-07 08:01:30 +0000 | 
| commit | e8dd68d54a56f505c1cdd901c31a4629ba19b524 (patch) | |
| tree | ff44f1a8ea2ef437516aafcf704e5d24cf096f8e /src | |
| parent | 30f4bacfe06eb177307585e54398a8ac7288448b (diff) | |
| download | scintilla-mirror-e8dd68d54a56f505c1cdd901c31a4629ba19b524.tar.gz | |
Marker can be any character.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 2 | ||||
| -rw-r--r-- | src/LineMarker.cxx | 12 | ||||
| -rw-r--r-- | src/LineMarker.h | 2 | 
3 files changed, 13 insertions, 3 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 73114f103..fecd4b08e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -859,7 +859,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) {  				if (marks) {  					for (int markBit = 0; (markBit < 32) && marks; markBit++) {  						if (marks & 1) { -							vs.markers[markBit].Draw(surface, rcMarker); +							vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font);  						}  						marks >>= 1;  					} diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index dc1468d83..9cb5d0d79 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -40,7 +40,7 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C  	surface->FillRectangle(rcH, fore);  } -void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) { +void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter) {  	// Restrict most shapes a bit  	PRectangle rc = rcWhole;  	rc.top++; @@ -230,6 +230,16 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) {  		surface->MoveTo(centreX, rcWhole.top);  		surface->LineTo(centreX, centreY - blobSize); +	} else if (markType >= SC_MARK_CHARACTER) { +		char character[2]; +		character[0] = ' '; +		character[0] = markType - SC_MARK_CHARACTER; +		int width = surface->WidthText(fontForCharacter, character, 1); +		rc.left += (rc.Width() - width) / 2; +		rc.right = rc.left + width; +		surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2,  +			character, 1, fore.allocated, back.allocated); +  	} else { // SC_MARK_SHORTARROW  		Point pts[] = {  			Point(centreX, centreY + dimOn2), diff --git a/src/LineMarker.h b/src/LineMarker.h index ee0f36c25..b9dd15d06 100644 --- a/src/LineMarker.h +++ b/src/LineMarker.h @@ -20,7 +20,7 @@ public:  		fore = Colour(0,0,0);  		back = Colour(0xff,0xff,0xff);  	} -	void Draw(Surface *surface, PRectangle &rc); +	void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter);  };  #endif | 
