MCPcopy Create free account
hub / github.com/cxasm/notepad-- / DrawImeIndicator

Function DrawImeIndicator

src/qscint/src/InputMethod.cpp:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static void DrawImeIndicator(QsciScintillaQt *sqt, int indicator, int len)
58{
59 // Emulate the visual style of IME characters with indicators.
60 // Draw an indicator on the character before caret by the character bytes of len
61 // so it should be called after AddCharUTF().
62 // It does not affect caret positions.
63 if (indicator < 8 || indicator > INDIC_MAX) {
64 return;
65 }
66 sqt->pdoc->DecorationSetCurrentIndicator(indicator);
67 for (size_t r=0; r< sqt-> sel.Count(); r++) {
68 int positionInsert = sqt->sel.Range(r).Start().Position();
69 sqt->pdoc->DecorationFillRange(positionInsert - len, 1, len);
70 }
71}
72
73static int GetImeCaretPos(QInputMethodEvent *event)
74{

Callers 1

inputMethodEventMethod · 0.85

Calls 6

CountMethod · 0.80
PositionMethod · 0.80
RangeMethod · 0.80
DecorationFillRangeMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected