1 // Scintilla source code edit control
\r
2 /** @file ScintillaBase.cxx
\r
3 ** An enhanced subclass of Editor with calltips, autocomplete and context menu.
\r
5 // Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
\r
6 // The License.txt file describes the conditions under which this software may be distributed.
\r
13 #include "Platform.h"
\r
15 #include "Scintilla.h"
\r
16 #include "PropSet.h"
\r
18 #include "SciLexer.h"
\r
19 #include "Accessor.h"
\r
20 #include "DocumentAccessor.h"
\r
21 #include "KeyWords.h"
\r
23 #include "SplitVector.h"
\r
24 #include "Partitioning.h"
\r
25 #include "RunStyles.h"
\r
26 #include "ContractionState.h"
\r
27 #include "CellBuffer.h"
\r
28 #include "CallTip.h"
\r
30 #include "Indicator.h"
\r
32 #include "LineMarker.h"
\r
34 #include "ViewStyle.h"
\r
35 #include "AutoComplete.h"
\r
36 #include "CharClassify.h"
\r
37 #include "Decoration.h"
\r
38 #include "Document.h"
\r
39 #include "PositionCache.h"
\r
41 #include "ScintillaBase.h"
\r
43 #ifdef SCI_NAMESPACE
\r
44 using namespace Scintilla;
\r
47 ScintillaBase::ScintillaBase() {
\r
48 displayPopupMenu = true;
\r
52 lexLanguage = SCLEX_CONTAINER;
\r
53 performingStyle = false;
\r
55 for (int wl = 0;wl < numWordLists;wl++)
\r
56 keyWordLists[wl] = new WordList;
\r
57 keyWordLists[numWordLists] = 0;
\r
61 ScintillaBase::~ScintillaBase() {
\r
63 for (int wl = 0;wl < numWordLists;wl++)
\r
64 delete keyWordLists[wl];
\r
68 void ScintillaBase::Finalise() {
\r
73 void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) {
\r
74 Editor::RefreshColourPalette(pal, want);
\r
75 ct.RefreshColourPalette(pal, want);
\r
78 void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
\r
79 bool isFillUp = ac.Active() && ac.IsFillUpChar(*s);
\r
81 Editor::AddCharUTF(s, len, treatAsDBCS);
\r
84 AutoCompleteCharacterAdded(s[0]);
\r
85 // For fill ups add the character after the autocompletion has
\r
86 // triggered so containers see the key so can display a calltip.
\r
88 Editor::AddCharUTF(s, len, treatAsDBCS);
\r
93 void ScintillaBase::Command(int cmdId) {
\r
97 case idAutoComplete: // Nothing to do
\r
101 case idCallTip: // Nothing to do
\r
106 WndProc(SCI_UNDO, 0, 0);
\r
110 WndProc(SCI_REDO, 0, 0);
\r
114 WndProc(SCI_CUT, 0, 0);
\r
118 WndProc(SCI_COPY, 0, 0);
\r
122 WndProc(SCI_PASTE, 0, 0);
\r
126 WndProc(SCI_CLEAR, 0, 0);
\r
129 case idcmdSelectAll:
\r
130 WndProc(SCI_SELECTALL, 0, 0);
\r
135 int ScintillaBase::KeyCommand(unsigned int iMessage) {
\r
136 // Most key commands cancel autocompletion mode
\r
138 switch (iMessage) {
\r
139 // Except for these
\r
141 AutoCompleteMove(1);
\r
144 AutoCompleteMove( -1);
\r
147 AutoCompleteMove(5);
\r
150 AutoCompleteMove( -5);
\r
153 AutoCompleteMove( -5000);
\r
156 AutoCompleteMove(5000);
\r
158 case SCI_DELETEBACK:
\r
160 AutoCompleteCharacterDeleted();
\r
161 EnsureCaretVisible();
\r
163 case SCI_DELETEBACKNOTLINE:
\r
164 DelCharBack(false);
\r
165 AutoCompleteCharacterDeleted();
\r
166 EnsureCaretVisible();
\r
169 AutoCompleteCompleted();
\r
172 AutoCompleteCompleted();
\r
176 AutoCompleteCancel();
\r
180 if (ct.inCallTipMode) {
\r
182 (iMessage != SCI_CHARLEFT) &&
\r
183 (iMessage != SCI_CHARLEFTEXTEND) &&
\r
184 (iMessage != SCI_CHARRIGHT) &&
\r
185 (iMessage != SCI_CHARRIGHTEXTEND) &&
\r
186 (iMessage != SCI_EDITTOGGLEOVERTYPE) &&
\r
187 (iMessage != SCI_DELETEBACK) &&
\r
188 (iMessage != SCI_DELETEBACKNOTLINE)
\r
190 ct.CallTipCancel();
\r
192 if ((iMessage == SCI_DELETEBACK) || (iMessage == SCI_DELETEBACKNOTLINE)) {
\r
193 if (currentPos <= ct.posStartCallTip) {
\r
194 ct.CallTipCancel();
\r
198 return Editor::KeyCommand(iMessage);
\r
201 void ScintillaBase::AutoCompleteDoubleClick(void* p) {
\r
202 ScintillaBase* sci = reinterpret_cast<ScintillaBase*>(p);
\r
203 sci->AutoCompleteCompleted();
\r
206 void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
\r
207 //Platform::DebugPrintf("AutoComplete %s\n", list);
\r
208 ct.CallTipCancel();
\r
210 if (ac.chooseSingle && (listType == 0)) {
\r
211 if (list && !strchr(list, ac.GetSeparator())) {
\r
212 const char *typeSep = strchr(list, ac.GetTypesep());
\r
213 size_t lenInsert = (typeSep) ? (typeSep-list) : strlen(list);
\r
214 if (ac.ignoreCase) {
\r
215 SetEmptySelection(currentPos - lenEntered);
\r
216 pdoc->DeleteChars(currentPos, lenEntered);
\r
217 SetEmptySelection(currentPos);
\r
218 pdoc->InsertString(currentPos, list, lenInsert);
\r
219 SetEmptySelection(currentPos + lenInsert);
\r
221 SetEmptySelection(currentPos);
\r
222 pdoc->InsertString(currentPos, list + lenEntered, lenInsert - lenEntered);
\r
223 SetEmptySelection(currentPos + lenInsert - lenEntered);
\r
228 ac.Start(wMain, idAutoComplete, currentPos, LocationFromPosition(currentPos),
\r
229 lenEntered, vs.lineHeight, IsUnicodeMode());
\r
231 PRectangle rcClient = GetClientRectangle();
\r
232 Point pt = LocationFromPosition(currentPos - lenEntered);
\r
233 PRectangle rcPopupBounds = wMain.GetMonitorRect(pt);
\r
234 if (rcPopupBounds.Height() == 0)
\r
235 rcPopupBounds = rcClient;
\r
237 int heightLB = 100;
\r
239 if (pt.x >= rcClient.right - widthLB) {
\r
240 HorizontalScrollTo(xOffset + pt.x - rcClient.right + widthLB);
\r
242 pt = LocationFromPosition(currentPos);
\r
245 rcac.left = pt.x - ac.lb->CaretFromEdge();
\r
246 if (pt.y >= rcPopupBounds.bottom - heightLB && // Wont fit below.
\r
247 pt.y >= (rcPopupBounds.bottom + rcPopupBounds.top) / 2) { // and there is more room above.
\r
248 rcac.top = pt.y - heightLB;
\r
249 if (rcac.top < rcPopupBounds.top) {
\r
250 heightLB -= (rcPopupBounds.top - rcac.top);
\r
251 rcac.top = rcPopupBounds.top;
\r
254 rcac.top = pt.y + vs.lineHeight;
\r
256 rcac.right = rcac.left + widthLB;
\r
257 rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcPopupBounds.bottom);
\r
258 ac.lb->SetPositionRelative(rcac, wMain);
\r
259 ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font);
\r
260 unsigned int aveCharWidth = vs.styles[STYLE_DEFAULT].aveCharWidth;
\r
261 ac.lb->SetAverageCharWidth(aveCharWidth);
\r
262 ac.lb->SetDoubleClickAction(AutoCompleteDoubleClick, this);
\r
266 // Fiddle the position of the list so it is right next to the target and wide enough for all its strings
\r
267 PRectangle rcList = ac.lb->GetDesiredRect();
\r
268 int heightAlloced = rcList.bottom - rcList.top;
\r
269 widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left);
\r
270 if (maxListWidth != 0)
\r
271 widthLB = Platform::Minimum(widthLB, aveCharWidth*maxListWidth);
\r
272 // Make an allowance for large strings in list
\r
273 rcList.left = pt.x - ac.lb->CaretFromEdge();
\r
274 rcList.right = rcList.left + widthLB;
\r
275 if (((pt.y + vs.lineHeight) >= (rcPopupBounds.bottom - heightAlloced)) && // Wont fit below.
\r
276 ((pt.y + vs.lineHeight / 2) >= (rcPopupBounds.bottom + rcPopupBounds.top) / 2)) { // and there is more room above.
\r
277 rcList.top = pt.y - heightAlloced;
\r
279 rcList.top = pt.y + vs.lineHeight;
\r
281 rcList.bottom = rcList.top + heightAlloced;
\r
282 ac.lb->SetPositionRelative(rcList, wMain);
\r
284 if (lenEntered != 0) {
\r
285 AutoCompleteMoveToCurrentWord();
\r
289 void ScintillaBase::AutoCompleteCancel() {
\r
291 SCNotification scn = {0};
\r
292 scn.nmhdr.code = SCN_AUTOCCANCELLED;
\r
300 void ScintillaBase::AutoCompleteMove(int delta) {
\r
304 void ScintillaBase::AutoCompleteMoveToCurrentWord() {
\r
305 char wordCurrent[1000];
\r
307 int startWord = ac.posStart - ac.startLen;
\r
308 for (i = startWord; i < currentPos && i - startWord < 1000; i++)
\r
309 wordCurrent[i - startWord] = pdoc->CharAt(i);
\r
310 wordCurrent[Platform::Minimum(i - startWord, 999)] = '\0';
\r
311 ac.Select(wordCurrent);
\r
314 void ScintillaBase::AutoCompleteCharacterAdded(char ch) {
\r
315 if (ac.IsFillUpChar(ch)) {
\r
316 AutoCompleteCompleted();
\r
317 } else if (ac.IsStopChar(ch)) {
\r
318 AutoCompleteCancel();
\r
320 AutoCompleteMoveToCurrentWord();
\r
324 void ScintillaBase::AutoCompleteCharacterDeleted() {
\r
325 if (currentPos < ac.posStart - ac.startLen) {
\r
326 AutoCompleteCancel();
\r
327 } else if (ac.cancelAtStartPos && (currentPos <= ac.posStart)) {
\r
328 AutoCompleteCancel();
\r
330 AutoCompleteMoveToCurrentWord();
\r
334 void ScintillaBase::AutoCompleteCompleted() {
\r
335 int item = ac.lb->GetSelection();
\r
336 char selected[1000];
\r
337 selected[0] = '\0';
\r
339 ac.lb->GetValue(item, selected, sizeof(selected));
\r
341 AutoCompleteCancel();
\r
347 listSelected = selected;
\r
348 SCNotification scn = {0};
\r
349 scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION;
\r
351 scn.wParam = listType;
\r
352 scn.listType = listType;
\r
353 Position firstPos = ac.posStart - ac.startLen;
\r
354 scn.lParam = firstPos;
\r
355 scn.text = listSelected.c_str();
\r
365 Position endPos = currentPos;
\r
366 if (ac.dropRestOfWord)
\r
367 endPos = pdoc->ExtendWordSelect(endPos, 1, true);
\r
368 if (endPos < firstPos)
\r
370 pdoc->BeginUndoAction();
\r
371 if (endPos != firstPos) {
\r
372 pdoc->DeleteChars(firstPos, endPos - firstPos);
\r
374 SetEmptySelection(ac.posStart);
\r
376 SString piece = selected;
\r
377 pdoc->InsertCString(firstPos, piece.c_str());
\r
378 SetEmptySelection(firstPos + static_cast<int>(piece.length()));
\r
380 pdoc->EndUndoAction();
\r
383 int ScintillaBase::AutoCompleteGetCurrent() {
\r
384 return ac.lb->GetSelection();
\r
387 void ScintillaBase::CallTipShow(Point pt, const char *defn) {
\r
389 pt.y += vs.lineHeight;
\r
390 // If container knows about STYLE_CALLTIP then use it in place of the
\r
391 // STYLE_DEFAULT for the face name, size and character set. Also use it
\r
392 // for the foreground and background colour.
\r
393 int ctStyle = ct.UseStyleCallTip() ? STYLE_CALLTIP : STYLE_DEFAULT;
\r
394 if (ct.UseStyleCallTip()) {
\r
395 ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back);
\r
397 PRectangle rc = ct.CallTipStart(currentPos, pt,
\r
399 vs.styles[ctStyle].fontName,
\r
400 vs.styles[ctStyle].sizeZoomed,
\r
402 vs.styles[ctStyle].characterSet,
\r
404 // If the call-tip window would be out of the client
\r
405 // space, adjust so it displays above the text.
\r
406 PRectangle rcClient = GetClientRectangle();
\r
407 if (rc.bottom > rcClient.bottom) {
\r
408 int offset = vs.lineHeight + rc.Height();
\r
410 rc.bottom -= offset;
\r
412 // Now display the window.
\r
413 CreateCallTipWindow(rc);
\r
414 ct.wCallTip.SetPositionRelative(rc, wMain);
\r
415 ct.wCallTip.Show();
\r
418 void ScintillaBase::CallTipClick() {
\r
419 SCNotification scn = {0};
\r
420 scn.nmhdr.code = SCN_CALLTIPCLICK;
\r
421 scn.position = ct.clickPlace;
\r
425 void ScintillaBase::ContextMenu(Point pt) {
\r
426 if (displayPopupMenu) {
\r
427 bool writable = !WndProc(SCI_GETREADONLY, 0, 0);
\r
428 popup.CreatePopUp();
\r
429 AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo());
\r
430 AddToPopUp("Redo", idcmdRedo, writable && pdoc->CanRedo());
\r
432 AddToPopUp("Cut", idcmdCut, writable && currentPos != anchor);
\r
433 AddToPopUp("Copy", idcmdCopy, currentPos != anchor);
\r
434 AddToPopUp("Paste", idcmdPaste, writable && WndProc(SCI_CANPASTE, 0, 0));
\r
435 AddToPopUp("Delete", idcmdDelete, writable && currentPos != anchor);
\r
437 AddToPopUp("Select All", idcmdSelectAll);
\r
438 popup.Show(pt, wMain);
\r
442 void ScintillaBase::CancelModes() {
\r
443 AutoCompleteCancel();
\r
444 ct.CallTipCancel();
\r
445 Editor::CancelModes();
\r
448 void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
\r
450 Editor::ButtonDown(pt, curTime, shift, ctrl, alt);
\r
454 void ScintillaBase::SetLexer(uptr_t wParam) {
\r
455 lexLanguage = wParam;
\r
456 lexCurrent = LexerModule::Find(lexLanguage);
\r
458 lexCurrent = LexerModule::Find(SCLEX_NULL);
\r
461 void ScintillaBase::SetLexerLanguage(const char *languageName) {
\r
462 lexLanguage = SCLEX_CONTAINER;
\r
463 lexCurrent = LexerModule::Find(languageName);
\r
465 lexCurrent = LexerModule::Find(SCLEX_NULL);
\r
467 lexLanguage = lexCurrent->GetLanguage();
\r
470 void ScintillaBase::Colourise(int start, int end) {
\r
471 if (!performingStyle) {
\r
472 // Protect against reentrance, which may occur, for example, when
\r
473 // fold points are discovered while performing styling and the folding
\r
474 // code looks for child lines which may trigger styling.
\r
475 performingStyle = true;
\r
477 int lengthDoc = pdoc->Length();
\r
480 int len = end - start;
\r
482 PLATFORM_ASSERT(len >= 0);
\r
483 PLATFORM_ASSERT(start + len <= lengthDoc);
\r
485 //WindowAccessor styler(wMain.GetID(), props);
\r
486 DocumentAccessor styler(pdoc, props, wMain.GetID());
\r
488 int styleStart = 0;
\r
490 styleStart = styler.StyleAt(start - 1) & pdoc->stylingBitsMask;
\r
491 styler.SetCodePage(pdoc->dbcsCodePage);
\r
493 if (lexCurrent && (len > 0)) { // Should always succeed as null lexer should always be available
\r
494 lexCurrent->Lex(start, len, styleStart, keyWordLists, styler);
\r
496 if (styler.GetPropertyInt("fold")) {
\r
497 lexCurrent->Fold(start, len, styleStart, keyWordLists, styler);
\r
502 performingStyle = false;
\r
507 void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) {
\r
509 if (lexLanguage != SCLEX_CONTAINER) {
\r
510 int endStyled = WndProc(SCI_GETENDSTYLED, 0, 0);
\r
511 int lineEndStyled = WndProc(SCI_LINEFROMPOSITION, endStyled, 0);
\r
512 endStyled = WndProc(SCI_POSITIONFROMLINE, lineEndStyled, 0);
\r
513 Colourise(endStyled, endStyleNeeded);
\r
517 Editor::NotifyStyleToNeeded(endStyleNeeded);
\r
520 sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
\r
521 switch (iMessage) {
\r
522 case SCI_AUTOCSHOW:
\r
524 AutoCompleteStart(wParam, reinterpret_cast<const char *>(lParam));
\r
527 case SCI_AUTOCCANCEL:
\r
531 case SCI_AUTOCACTIVE:
\r
532 return ac.Active();
\r
534 case SCI_AUTOCPOSSTART:
\r
535 return ac.posStart;
\r
537 case SCI_AUTOCCOMPLETE:
\r
538 AutoCompleteCompleted();
\r
541 case SCI_AUTOCSETSEPARATOR:
\r
542 ac.SetSeparator(static_cast<char>(wParam));
\r
545 case SCI_AUTOCGETSEPARATOR:
\r
546 return ac.GetSeparator();
\r
548 case SCI_AUTOCSTOPS:
\r
549 ac.SetStopChars(reinterpret_cast<char *>(lParam));
\r
552 case SCI_AUTOCSELECT:
\r
553 ac.Select(reinterpret_cast<char *>(lParam));
\r
556 case SCI_AUTOCGETCURRENT:
\r
557 return AutoCompleteGetCurrent();
\r
559 case SCI_AUTOCSETCANCELATSTART:
\r
560 ac.cancelAtStartPos = wParam != 0;
\r
563 case SCI_AUTOCGETCANCELATSTART:
\r
564 return ac.cancelAtStartPos;
\r
566 case SCI_AUTOCSETFILLUPS:
\r
567 ac.SetFillUpChars(reinterpret_cast<char *>(lParam));
\r
570 case SCI_AUTOCSETCHOOSESINGLE:
\r
571 ac.chooseSingle = wParam != 0;
\r
574 case SCI_AUTOCGETCHOOSESINGLE:
\r
575 return ac.chooseSingle;
\r
577 case SCI_AUTOCSETIGNORECASE:
\r
578 ac.ignoreCase = wParam != 0;
\r
581 case SCI_AUTOCGETIGNORECASE:
\r
582 return ac.ignoreCase;
\r
584 case SCI_USERLISTSHOW:
\r
586 AutoCompleteStart(0, reinterpret_cast<const char *>(lParam));
\r
589 case SCI_AUTOCSETAUTOHIDE:
\r
590 ac.autoHide = wParam != 0;
\r
593 case SCI_AUTOCGETAUTOHIDE:
\r
594 return ac.autoHide;
\r
596 case SCI_AUTOCSETDROPRESTOFWORD:
\r
597 ac.dropRestOfWord = wParam != 0;
\r
600 case SCI_AUTOCGETDROPRESTOFWORD:
\r
601 return ac.dropRestOfWord;
\r
603 case SCI_AUTOCSETMAXHEIGHT:
\r
604 ac.lb->SetVisibleRows(wParam);
\r
607 case SCI_AUTOCGETMAXHEIGHT:
\r
608 return ac.lb->GetVisibleRows();
\r
610 case SCI_AUTOCSETMAXWIDTH:
\r
611 maxListWidth = wParam;
\r
614 case SCI_AUTOCGETMAXWIDTH:
\r
615 return maxListWidth;
\r
617 case SCI_REGISTERIMAGE:
\r
618 ac.lb->RegisterImage(wParam, reinterpret_cast<const char *>(lParam));
\r
621 case SCI_CLEARREGISTEREDIMAGES:
\r
622 ac.lb->ClearRegisteredImages();
\r
625 case SCI_AUTOCSETTYPESEPARATOR:
\r
626 ac.SetTypesep(static_cast<char>(wParam));
\r
629 case SCI_AUTOCGETTYPESEPARATOR:
\r
630 return ac.GetTypesep();
\r
632 case SCI_CALLTIPSHOW:
\r
633 CallTipShow(LocationFromPosition(wParam),
\r
634 reinterpret_cast<const char *>(lParam));
\r
637 case SCI_CALLTIPCANCEL:
\r
638 ct.CallTipCancel();
\r
641 case SCI_CALLTIPACTIVE:
\r
642 return ct.inCallTipMode;
\r
644 case SCI_CALLTIPPOSSTART:
\r
645 return ct.posStartCallTip;
\r
647 case SCI_CALLTIPSETHLT:
\r
648 ct.SetHighlight(wParam, lParam);
\r
651 case SCI_CALLTIPSETBACK:
\r
652 ct.colourBG = ColourDesired(wParam);
\r
653 vs.styles[STYLE_CALLTIP].back = ct.colourBG;
\r
654 InvalidateStyleRedraw();
\r
657 case SCI_CALLTIPSETFORE:
\r
658 ct.colourUnSel = ColourDesired(wParam);
\r
659 vs.styles[STYLE_CALLTIP].fore = ct.colourUnSel;
\r
660 InvalidateStyleRedraw();
\r
663 case SCI_CALLTIPSETFOREHLT:
\r
664 ct.colourSel = ColourDesired(wParam);
\r
665 InvalidateStyleRedraw();
\r
668 case SCI_CALLTIPUSESTYLE:
\r
669 ct.SetTabSize((int)wParam);
\r
670 InvalidateStyleRedraw();
\r
674 displayPopupMenu = wParam != 0;
\r
680 lexLanguage = wParam;
\r
684 return lexLanguage;
\r
686 case SCI_COLOURISE:
\r
687 if (lexLanguage == SCLEX_CONTAINER) {
\r
688 pdoc->ModifiedAt(wParam);
\r
689 NotifyStyleToNeeded((lParam == -1) ? pdoc->Length() : lParam);
\r
691 Colourise(wParam, lParam);
\r
696 case SCI_SETPROPERTY:
\r
697 props.Set(reinterpret_cast<const char *>(wParam),
\r
698 reinterpret_cast<const char *>(lParam));
\r
701 case SCI_GETPROPERTY: {
\r
702 SString val = props.Get(reinterpret_cast<const char *>(wParam));
\r
703 const int n = val.length();
\r
705 char *ptr = reinterpret_cast<char *>(lParam);
\r
706 memcpy(ptr, val.c_str(), n);
\r
707 ptr[n] = '\0'; // terminate
\r
709 return n; // Not including NUL
\r
712 case SCI_GETPROPERTYEXPANDED: {
\r
713 SString val = props.GetExpanded(reinterpret_cast<const char *>(wParam));
\r
714 const int n = val.length();
\r
716 char *ptr = reinterpret_cast<char *>(lParam);
\r
717 memcpy(ptr, val.c_str(), n);
\r
718 ptr[n] = '\0'; // terminate
\r
720 return n; // Not including NUL
\r
723 case SCI_GETPROPERTYINT:
\r
724 return props.GetInt(reinterpret_cast<const char *>(wParam), lParam);
\r
726 case SCI_SETKEYWORDS:
\r
727 if (wParam < numWordLists) {
\r
728 keyWordLists[wParam]->Clear();
\r
729 keyWordLists[wParam]->Set(reinterpret_cast<const char *>(lParam));
\r
733 case SCI_SETLEXERLANGUAGE:
\r
734 SetLexerLanguage(reinterpret_cast<const char *>(lParam));
\r
737 case SCI_GETSTYLEBITSNEEDED:
\r
738 return lexCurrent ? lexCurrent->GetStyleBitsNeeded() : 5;
\r
742 return Editor::WndProc(iMessage, wParam, lParam);
\r