diff options
| author | nyamatongwe <devnull@localhost> | 2002-11-22 10:07:02 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2002-11-22 10:07:02 +0000 | 
| commit | 283162c866d543988a5c31eb8dd5e823b50dc276 (patch) | |
| tree | d2f335826ccb8e7e559247aa6a25da7351545c49 /src/AutoComplete.cxx | |
| parent | 18fdf34e65a3827ab17a02538879e7daa975dceb (diff) | |
| download | scintilla-mirror-283162c866d543988a5c31eb8dd5e823b50dc276.tar.gz | |
More of the icons in autocompletion patch.
Diffstat (limited to 'src/AutoComplete.cxx')
| -rw-r--r-- | src/AutoComplete.cxx | 25 | 
1 files changed, 21 insertions, 4 deletions
| diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index d971fa12a..8b788be06 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -14,9 +14,10 @@  #include "PropSet.h"  #include "AutoComplete.h" -AutoComplete::AutoComplete() :  +AutoComplete::AutoComplete() :  	active(false),  	separator(' '), +	typesep('?'),  	ignoreCase(false),  	chooseSingle(false),  	posStart(0), @@ -63,7 +64,7 @@ void AutoComplete::SetFillUpChars(const char *fillUpChars_) {  bool AutoComplete::IsFillUpChar(char ch) {  	return ch && strchr(fillUpChars, ch);  } -  +  void AutoComplete::SetSeparator(char separator_) {  	separator = separator_;  } @@ -72,22 +73,38 @@ char AutoComplete::GetSeparator() {  	return separator;  } +void AutoComplete::SetTypesep(char separator_) { +	typesep = separator_; +} + +char AutoComplete::GetTypesep() { +	return typesep; +} +  void AutoComplete::SetList(const char *list) {  	lb.Clear();  	char *words = new char[strlen(list) + 1];  	if (words) {  		strcpy(words, list);  		char *startword = words; +		char *numword = NULL;  		int i = 0;  		for (; words && words[i]; i++) {  			if (words[i] == separator) {  				words[i] = '\0'; -				lb.Append(startword); +				if (numword) +					*numword = '\0'; +				lb.Append(startword, numword?atoi(numword + 1):0);  				startword = words + i + 1; +				numword = NULL; +			} else if (words[i] == typesep) { +				numword = words + i;  			}  		}  		if (startword) { -			lb.Append(startword); +			if (numword) +				*numword = '\0'; +			lb.Append(startword, numword?atoi(numword + 1):0);  		}  		delete []words;  	} | 
