diff options
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 2 | ||||
-rw-r--r-- | cocoa/ScintillaView.mm | 8 | ||||
-rw-r--r-- | gtk/ScintillaGTK.cxx | 10 | ||||
-rw-r--r-- | qt/ScintillaEditBase/ScintillaEditBase.cpp | 10 | ||||
-rw-r--r-- | src/Decoration.cxx | 4 | ||||
-rw-r--r-- | src/Editor.cxx | 36 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 4 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 10 |
8 files changed, 42 insertions, 42 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 8271e7988..0f1a53e17 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2274,7 +2274,7 @@ void ScintillaCocoa::CompositionStart() { */ void ScintillaCocoa::CompositionCommit() { pdoc->TentativeCommit(); - pdoc->DecorationSetCurrentIndicator(INDIC_IME); + pdoc->DecorationSetCurrentIndicator(INDICATOR_IME); pdoc->DecorationFillRange(0, 0, pdoc->Length()); } diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 84dbff16a..fdf5c3374 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -624,7 +624,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { posRangeCurrent.length = lengthInserted; mMarkedTextRange = mOwner.backend->CharactersFromPositions(posRangeCurrent); // Mark the just inserted text. Keep the marked range for later reset. - [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INDIC_IME]; + [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INDICATOR_IME]; [mOwner setGeneralProperty: SCI_INDICATORFILLRANGE parameter: posRangeCurrent.location value: posRangeCurrent.length]; @@ -1374,10 +1374,10 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { * input composition, depending on language, keyboard etc. */ - (void) updateIndicatorIME { - [self setColorProperty: SCI_INDICSETFORE parameter: INDIC_IME fromHTML: @"#FF0000"]; + [self setColorProperty: SCI_INDICSETFORE parameter: INDICATOR_IME fromHTML: @"#FF0000"]; const bool drawInBackground = [self message: SCI_GETPHASESDRAW] != 0; - [self setGeneralProperty: SCI_INDICSETUNDER parameter: INDIC_IME value: drawInBackground]; - [self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDIC_IME value: INDIC_PLAIN]; + [self setGeneralProperty: SCI_INDICSETUNDER parameter: INDICATOR_IME value: drawInBackground]; + [self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDICATOR_IME value: INDIC_PLAIN]; [self setGeneralProperty: SCI_INDICSETALPHA parameter: INDIC_IME value: 100]; } diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index f138da131..3b1972880 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -91,10 +91,10 @@ #define IS_WIDGET_REALIZED(w) (gtk_widget_get_realized(GTK_WIDGET(w))) #define IS_WIDGET_MAPPED(w) (gtk_widget_get_mapped(GTK_WIDGET(w))) -#define SC_INDICATOR_INPUT INDIC_IME -#define SC_INDICATOR_TARGET INDIC_IME+1 -#define SC_INDICATOR_CONVERTED INDIC_IME+2 -#define SC_INDICATOR_UNKNOWN INDIC_IME_MAX +#define SC_INDICATOR_INPUT INDICATOR_IME +#define SC_INDICATOR_TARGET INDICATOR_IME+1 +#define SC_INDICATOR_CONVERTED INDICATOR_IME+2 +#define SC_INDICATOR_UNKNOWN INDICATOR_IME_MAX static GdkWindow *WindowFromWidget(GtkWidget *w) noexcept { return gtk_widget_get_window(w); @@ -2261,7 +2261,7 @@ void ScintillaGTK::DrawImeIndicator(int indicator, int len) { // Draw an indicator on the character before caret by the character bytes of len // so it should be called after InsertCharacter(). // It does not affect caret positions. - if (indicator < 8 || indicator > INDIC_MAX) { + if (indicator < 8 || indicator > INDICATOR_MAX) { return; } pdoc->DecorationSetCurrentIndicator(indicator); diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index a37adca1b..261dfa520 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -23,10 +23,10 @@ #define INDIC_INPUTMETHOD 24 -#define SC_INDICATOR_INPUT INDIC_IME -#define SC_INDICATOR_TARGET INDIC_IME+1 -#define SC_INDICATOR_CONVERTED INDIC_IME+2 -#define SC_INDICATOR_UNKNOWN INDIC_IME_MAX +#define SC_INDICATOR_INPUT INDICATOR_IME +#define SC_INDICATOR_TARGET INDICATOR_IME+1 +#define SC_INDICATOR_CONVERTED INDICATOR_IME+2 +#define SC_INDICATOR_UNKNOWN INDICATOR_IME_MAX // Q_WS_MAC and Q_WS_X11 aren't defined in Qt5 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) @@ -451,7 +451,7 @@ void ScintillaEditBase::DrawImeIndicator(int indicator, int len) // Draw an indicator on the character before caret by the character bytes of len // so it should be called after InsertCharacter(). // It does not affect caret positions. - if (indicator < 8 || indicator > INDIC_MAX) { + if (indicator < 8 || indicator > INDICATOR_MAX) { return; } sqt->pdoc->DecorationSetCurrentIndicator(indicator); diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 2094bca1a..91a2a6c6b 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -229,7 +229,7 @@ template <typename POS> void DecorationList<POS>::DeleteLexerDecorations() { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), [](const std::unique_ptr<Decoration<POS>> &deco) { - return deco->Indicator() < INDIC_CONTAINER; + return deco->Indicator() < INDICATOR_CONTAINER ; }), decorationList.end()); current = nullptr; SetView(); @@ -260,7 +260,7 @@ int DecorationList<POS>::AllOnFor(Sci::Position position) const { int mask = 0; for (const std::unique_ptr<Decoration<POS>> &deco : decorationList) { if (deco->rs.ValueAt(static_cast<POS>(position))) { - if (deco->Indicator() < INDIC_IME) { + if (deco->Indicator() < INDICATOR_IME) { mask |= 1 << deco->Indicator(); } } diff --git a/src/Editor.cxx b/src/Editor.cxx index 2f35862e8..497d92050 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7357,7 +7357,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_INDICSETSTYLE: - if (wParam <= INDIC_MAX) { + if (wParam <= INDICATOR_MAX) { vs.indicators[wParam].sacNormal.style = static_cast<int>(lParam); vs.indicators[wParam].sacHover.style = static_cast<int>(lParam); InvalidateStyleRedraw(); @@ -7365,10 +7365,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_INDICGETSTYLE: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacNormal.style : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].sacNormal.style : 0; case SCI_INDICSETFORE: - if (wParam <= INDIC_MAX) { + if (wParam <= INDICATOR_MAX) { vs.indicators[wParam].sacNormal.fore = ColourDesired(static_cast<int>(lParam)); vs.indicators[wParam].sacHover.fore = ColourDesired(static_cast<int>(lParam)); InvalidateStyleRedraw(); @@ -7376,67 +7376,67 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_INDICGETFORE: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacNormal.fore.AsInteger() : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].sacNormal.fore.AsInteger() : 0; case SCI_INDICSETHOVERSTYLE: - if (wParam <= INDIC_MAX) { + if (wParam <= INDICATOR_MAX) { vs.indicators[wParam].sacHover.style = static_cast<int>(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETHOVERSTYLE: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacHover.style : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].sacHover.style : 0; case SCI_INDICSETHOVERFORE: - if (wParam <= INDIC_MAX) { + if (wParam <= INDICATOR_MAX) { vs.indicators[wParam].sacHover.fore = ColourDesired(static_cast<int>(lParam)); InvalidateStyleRedraw(); } break; case SCI_INDICGETHOVERFORE: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacHover.fore.AsInteger() : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].sacHover.fore.AsInteger() : 0; case SCI_INDICSETFLAGS: - if (wParam <= INDIC_MAX) { + if (wParam <= INDICATOR_MAX) { vs.indicators[wParam].SetFlags(static_cast<int>(lParam)); InvalidateStyleRedraw(); } break; case SCI_INDICGETFLAGS: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].Flags() : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].Flags() : 0; case SCI_INDICSETUNDER: - if (wParam <= INDIC_MAX) { + if (wParam <= INDICATOR_MAX) { vs.indicators[wParam].under = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_INDICGETUNDER: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].under : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].under : 0; case SCI_INDICSETALPHA: - if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) { + if (wParam <= INDICATOR_MAX && lParam >=0 && lParam <= 255) { vs.indicators[wParam].fillAlpha = static_cast<int>(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETALPHA: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fillAlpha : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].fillAlpha : 0; case SCI_INDICSETOUTLINEALPHA: - if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) { + if (wParam <= INDICATOR_MAX && lParam >=0 && lParam <= 255) { vs.indicators[wParam].outlineAlpha = static_cast<int>(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETOUTLINEALPHA: - return (wParam <= INDIC_MAX) ? vs.indicators[wParam].outlineAlpha : 0; + return (wParam <= INDICATOR_MAX) ? vs.indicators[wParam].outlineAlpha : 0; case SCI_SETINDICATORCURRENT: pdoc->DecorationSetCurrentIndicator(static_cast<int>(wParam)); @@ -7571,7 +7571,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_BRACEHIGHLIGHTINDICATOR: - if (lParam >= 0 && lParam <= INDIC_MAX) { + if (lParam >= 0 && lParam <= INDICATOR_MAX) { vs.braceHighlightIndicatorSet = wParam != 0; vs.braceHighlightIndicator = static_cast<int>(lParam); } @@ -7582,7 +7582,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { break; case SCI_BRACEBADLIGHTINDICATOR: - if (lParam >= 0 && lParam <= INDIC_MAX) { + if (lParam >= 0 && lParam <= INDICATOR_MAX) { vs.braceBadLightIndicatorSet = wParam != 0; vs.braceBadLightIndicator = static_cast<int>(lParam); } diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index cfd9701ae..6b24e15fb 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -56,13 +56,13 @@ void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, cons spaceWidth = surface.WidthText(font, " "); } -ViewStyle::ViewStyle() : markers(MARKER_MAX + 1), indicators(INDIC_MAX + 1) { +ViewStyle::ViewStyle() : markers(MARKER_MAX + 1), indicators(INDICATOR_MAX + 1) { Init(); } // Copy constructor only called when printing copies the screen ViewStyle so it can be // modified for printing styles. -ViewStyle::ViewStyle(const ViewStyle &source) : markers(MARKER_MAX + 1), indicators(INDIC_MAX + 1) { +ViewStyle::ViewStyle(const ViewStyle &source) : markers(MARKER_MAX + 1), indicators(INDICATOR_MAX + 1) { Init(source.styles.size()); styles = source.styles; for (size_t sty=0; sty<source.styles.size(); sty++) { diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 6b3489349..0f79fccb5 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -128,10 +128,10 @@ constexpr UINT SC_WIN_IDLE = 5001; // and delivering SCN_UPDATEUI constexpr UINT SC_WORK_IDLE = 5002; -#define SC_INDICATOR_INPUT INDIC_IME -#define SC_INDICATOR_TARGET INDIC_IME+1 -#define SC_INDICATOR_CONVERTED INDIC_IME+2 -#define SC_INDICATOR_UNKNOWN INDIC_IME_MAX +#define SC_INDICATOR_INPUT INDICATOR_IME +#define SC_INDICATOR_TARGET INDICATOR_IME+1 +#define SC_INDICATOR_CONVERTED INDICATOR_IME+2 +#define SC_INDICATOR_UNKNOWN INDICATOR_IME_MAX #ifndef SCS_CAP_SETRECONVERTSTRING #define SCS_CAP_SETRECONVERTSTRING 0x00000004 @@ -926,7 +926,7 @@ void ScintillaWin::DrawImeIndicator(int indicator, int len) { // Draw an indicator on the character before caret by the character bytes of len // so it should be called after InsertCharacter(). // It does not affect caret positions. - if (indicator < 8 || indicator > INDIC_MAX) { + if (indicator < 8 || indicator > INDICATOR_MAX) { return; } pdoc->DecorationSetCurrentIndicator(indicator); |