EDGE_FULL_BACKGROUND
"'seasoned_geek' via scintilla-interest" <[email protected]> Wed, 28 Aug 2024 10:37:43 -0700 (PDT)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
Neil,
Been away from this for quite a while. EDGE_FULL_BACKGROUND changes have a
text file with diffs attached to this.
Started with 552 zip file. Built and tested on Manjaro. Used this as SciTE
User properties.
=====
save.recent=1
save.session=1
save.position=1
line.margin.visible=1
line.margin.width=6
font.base=font:Liberation Mono,size:10
font.text=font:DejaVu Serif,size:10
font.embedded.base=font:Serif,size:9
font.embedded.comment=font:Serif,size:9
font.monospace=font:DejaVu Sans Mono,size:9
font.vbs=font:DejaVu Sans Mono,size:9
check.if.already.open=1
caret.line.back=#F7F36D
title.full.path=1
title.show.buffers=1
braces,check=1
edge.mode=4
edge.column=80
edge.colour=#E7FAFA
# #F9E7FA #F3FAE7
statusbar.visible=1
statusbar.text.1=Lines:$(NbOfLines) Cursor $(LineNumber):$(ColumnNumber)
$(OverType) $(ReadOnly) EOL:$(EOLMode)
wrap=0
=====
Wanted to see if this gets accepted before I started on tab-list and
MULTI_BACKGROUND.
Only spot I was a bit uncertain of was this
int farRight = 500; // just a big number because we could be 2+ monitors
wide
if ((ll->widthLine != 0) && (ll->widthLine !=
LineLayout::wrapWidthInfinite)) {
farRight = ll->widthLine;
}
It "appeared" that widthLine only had a value when wrap=1 by the time it
got to DrawEdgeLine(). But somehow, I could drag two screens wide and it
kept the color like I wanted. Did not add field to LineLayout class to
always carry the display width because I wanted minimal footprint and
thought I could be mistaken.
Could not test performance as I've basically gotten rid of everything with
fewer than 16-core.
Appreciate your feedback.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/d5781293-a982-430b-bf7a-4841a72213e2n%40googlegroups.com.
for-neil-20240828.txt
(text/plain, 3.9 KB)
[roland@roland-hpz820workstation Scintilla-work]$ diff -rn original-code/scintilla/README modifications/scintilla/README
a15 14
If you modified Scintilla.iface or just want to be certain before building
cd scintilla/scripts
python3 HFacer.py
python3 ScintillaAPIFacer.py
cd ../..
to regenerate:
Scintilla.h
SciLexer.h
ScintillaMessages.h
ScintillaTypes.h
ScintillaCall.h
ScintillaCall.cxx
files from the Scintilla.iface interface definition file.
You probably want to take out the "Bluefish" line
[roland@roland-hpz820workstation Scintilla-work]$ diff -rn original-code/scintilla/doc/ScintillaDoc.html modifications/scintilla/doc/ScintillaDoc.html
d9 1
a9 1
<meta name="generator" content="Bluefish 2.2.15" />
d8443 2
a8444 2
</tr>
a8453 10
</tr>
<tr>
<td align="left"><code>EDGE_FULL_BACKGROUND</code></td>
<td align="center">4</td>
<td>The background colour after the column limit is changed to the colour set by
<code>SCI_SETEDGECOLOUR</code> whether it has text or not. This is recommended for
proportional fonts.</td>
a8454 1
[roland@roland-hpz820workstation Scintilla-work]$ diff -rn original-code/scintilla/include/Scintilla.iface modifications/scintilla/include/Scintilla.iface
d2167 1
a2167 2
val EDGE_MULTILINE=3
val EDGE_FULL_BACKGROUND=4
d2175 1
a2175 2
# If text goes past the edge then it is highlighted.
# if EDGE_FULL_BACKGROUND then all space past this column highlighted
[roland@roland-hpz820workstation Scintilla-work]$ diff -rn original-code/scintilla/src/EditView.cxx modifications/scintilla/src/EditView.cxx
d1729 11
a1739 27
switch(vsDraw.edgeState) {
case EdgeVisualStyle::Line: {
PRectangle rcSegment = rcLine;
const int edgeX = static_cast<int>(vsDraw.theEdge.column * vsDraw.spaceWidth);
rcSegment.left = static_cast<XYPOSITION>(edgeX + xStart);
if ((ll->wrapIndent != 0) && (lineRange.start != 0))
rcSegment.left -= ll->wrapIndent;
rcSegment.right = rcSegment.left + 1;
surface->FillRectangleAligned(rcSegment, Fill(vsDraw.theEdge.colour));
}
break;
case EdgeVisualStyle::MultiLine: {
for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) {
if (vsDraw.theMultiEdge[edge].column >= 0) {
PRectangle rcSegment = rcLine;
const int edgeX = static_cast<int>(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth);
rcSegment.left = static_cast<XYPOSITION>(edgeX + xStart);
if ((ll->wrapIndent != 0) && (lineRange.start != 0))
rcSegment.left -= ll->wrapIndent;
rcSegment.right = rcSegment.left + 1;
surface->FillRectangleAligned(rcSegment, Fill(vsDraw.theMultiEdge[edge].colour));
}
}
}
break;
case EdgeVisualStyle::FullBackground: {
if (vsDraw.theEdge.column > 0) {
d1741 6
a1746 17
const int edgeX = static_cast<int>(vsDraw.theEdge.column * vsDraw.spaceWidth);
/* left and right are backwards for some reason. Deal with it.
* It would be nice if there were a function to compute distance between
* theEdge.column and last theoretically visible column if it had a character.
* Supporting wrap makes little sense. It "could" be done but wrap happens at
* visible edge which changes with window size. If line 0 of the wrap
* crossed theEdge.column we could continue theEdge.colour on each of the following
* wrapped lines . . . but FullBackground is more for ANSI card formatted
* languages, UseNet posts, special data editing, etc.
*/
rcSegment.right = static_cast<XYPOSITION>(edgeX);
int farRight = 500; // just a big number because we could be 2+ monitors wide
if ((ll->widthLine != 0) && (ll->widthLine != LineLayout::wrapWidthInfinite)) {
farRight = ll->widthLine;
}
rcSegment.left = static_cast<int>(farRight * vsDraw.spaceWidth);
surface->FillRectangle(rcSegment, Fill(vsDraw.theEdge.colour));
a1748 3
break;
default:
break;