diff options
| author | Mook <marky@activestate.com> | 2012-05-29 12:44:34 -0700 | 
|---|---|---|
| committer | Mook <marky@activestate.com> | 2012-05-29 12:44:34 -0700 | 
| commit | 7e9e5b1e059efa957d2d7e9fa6b364706f621711 (patch) | |
| tree | 24e9e113362f6a3f05f39e64ef9207f712b4e1a9 /src/Editor.cxx | |
| parent | 08d35504786635e06b870b2674da38c0e89521cd (diff) | |
| download | scintilla-mirror-7e9e5b1e059efa957d2d7e9fa6b364706f621711.tar.gz | |
add CharClassifier::GetCharsOfClass
add SCI_GETWORDCHARS(<unused>, stringresult chars) command to get word chars
add SCI_GETWHITESPACECHARS(<unused>, stringresult chars) to get whitespace chars
add SCI_GETPUNCTUATIONCHARS(<unused>, stringresult chars) to get punctutation
also add tests for {Set,Get}{Word,Whitespce,Punctuation}Chars, CharClassifier
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index d72ff302c..2bc89ba1f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7510,6 +7510,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		caret.period = wParam;  		break; +	case SCI_GETWORDCHARS: +		return pdoc->GetCharsOfClass(CharClassify::ccWord, reinterpret_cast<unsigned char *>(lParam)); +  	case SCI_SETWORDCHARS: {  			pdoc->SetDefaultCharClasses(false);  			if (lParam == 0) @@ -7518,6 +7521,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		}  		break; +	case SCI_GETWHITESPACECHARS: +		return pdoc->GetCharsOfClass(CharClassify::ccSpace, reinterpret_cast<unsigned char *>(lParam)); +  	case SCI_SETWHITESPACECHARS: {  			if (lParam == 0)  				return 0; @@ -7525,6 +7531,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		}  		break; +	case SCI_GETPUNCTUATIONCHARS: +		return pdoc->GetCharsOfClass(CharClassify::ccPunctuation, reinterpret_cast<unsigned char *>(lParam)); + +	case SCI_SETPUNCTUATIONCHARS: { +			if (lParam == 0) +				return 0; +			pdoc->SetCharClasses(reinterpret_cast<unsigned char *>(lParam), CharClassify::ccPunctuation); +		} +		break; +  	case SCI_SETCHARSDEFAULT:  		pdoc->SetDefaultCharClasses(true);  		break;  | 
