diff options
author | nyamatongwe <devnull@localhost> | 2000-12-17 12:01:49 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2000-12-17 12:01:49 +0000 |
commit | c9869d1a1a442cfd6b06b8ff8dc392e64af666be (patch) | |
tree | 2dd7176c01805d6c4602792085d3536afdf7f618 /src/ScintillaBase.cxx | |
parent | 277b10f2d35e82d8599f2faf3b82acc5f5aef7e2 (diff) | |
download | scintilla-mirror-c9869d1a1a442cfd6b06b8ff8dc392e64af666be.tar.gz |
Added Laurent's User List.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index b812426c2..703d6e534 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -34,6 +34,7 @@ #include "ScintillaBase.h" ScintillaBase::ScintillaBase() { + listType = 0; #ifdef SCI_LEXER lexLanguage = SCLEX_CONTAINER; for (int wl=0;wl<numWordLists;wl++) @@ -170,7 +171,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { //Platform::DebugPrintf("AutoComplete %s\n", list); ct.CallTipCancel(); - if (ac.chooseSingle) { + if (ac.chooseSingle && (listType == 0)) { if (list && !strchr(list, ac.GetSeparator())) { if (ac.ignoreCase) { SetEmptySelection(currentPos - lenEntered); @@ -279,6 +280,18 @@ void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) { } ac.Cancel(); + if (listType > 0) { + userListSelected = selected; + SCNotification scn; + scn.nmhdr.code = SCN_USERLISTSELECTION; + scn.message = 0; + scn.wParam = listType; + scn.lParam = 0; + scn.text = userListSelected.c_str(); + NotifyParent(scn); + return; + } + Position firstPos = ac.posStart - ac.startLen; if (currentPos < firstPos) return; @@ -356,6 +369,7 @@ void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) { long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { switch (iMessage) { case SCI_AUTOCSHOW: + listType = 0; AutoCompleteStart(wParam, reinterpret_cast<const char *>(lParam)); break; @@ -413,6 +427,11 @@ long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lP case SCI_AUTOCGETIGNORECASE: return ac.ignoreCase; + case SCI_USERLISTSHOW: + listType = wParam; + AutoCompleteStart(0, reinterpret_cast<const char *>(lParam)); + break; + case SCI_CALLTIPSHOW: { AutoCompleteCancel(); if (!ct.wCallTip.Created()) { |