From 6c1e837c5ebb40996f9a65dfa925774d5b10a109 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 22 May 2001 01:33:04 +0000 Subject: Support for forced upper and lower case styles. --- src/Editor.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index d10a8cee0..b455376ae 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -810,6 +810,10 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll.chars[numCharsInLine] = chDoc; ll.styles[numCharsInLine] = static_cast(styleByte & styleMask); ll.indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); + if (vstyle.styles[ll.styles[numCharsInLine]].caseForce == Style::caseUpper) + ll.chars[numCharsInLine] = static_cast(toupper(chDoc)); + else if (vstyle.styles[ll.styles[numCharsInLine]].caseForce == Style::caseLower) + ll.chars[numCharsInLine] = static_cast(tolower(chDoc)); numCharsInLine++; } } @@ -4322,6 +4326,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { InvalidateStyleRedraw(); } break; + case SCI_STYLESETCASE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].caseForce = static_cast(lParam); + InvalidateStyleRedraw(); + } + break; case SCI_STYLESETCHARACTERSET: if (wParam <= STYLE_MAX) { vs.styles[wParam].characterSet = lParam; -- cgit v1.2.3