Greg Smith:
> I think I suggested moving the codes (before folks started using them), but a more flexible and compatible way would be to be able to code markers as foreground/background.
That would require more APIs and some more code but I only have limited time for working on this. Instead I might just special-case MarkerSymbol::Bar (which already has special code for the top, middle, and end of a range) and place them beneath other markers by drawing them first like this:
if (marks) {
{
int markers = marks;
for (int markBit = 0; (markBit < 32) && markers; markBit++) {
if (markers & 1) {
if (vs.markers[markBit].markType == MarkerSymbol::Bar) {
const int mask = 1 << markBit;
const bool markBefore = firstSubLine ? (model.GetMark(lineDoc - 1) & mask) : true;
const bool markAfter = lastSubLine ? (model.GetMark(lineDoc + 1) & mask) : true;
vs.markers[markBit].Draw(surface, rcMarker, vs.styles[StyleLineNumber].font.get(),
PartForBar(markBefore, markAfter), marginStyle.style);
}
}
markers >>= 1;
}
}
for (int markBit = 0; (markBit < 32) && marks; markBit++) {
if (marks & 1) {
if (vs.markers[markBit].markType != MarkerSymbol::Bar) {
LineMarker::FoldPart part = LineMarker::FoldPart::undefined;
if (marginStyle.ShowsFolding()) {
part = PartForFoldHighlight(highlightDelimiter, lineDoc, firstSubLine, headWithTail, isExpanded);
}
vs.markers[markBit].Draw(surface, rcMarker, vs.styles[StyleLineNumber].font.get(), part, marginStyle.style);
}
}
marks >>= 1;
}
}
Neil