diff options
| author | nyamatongwe <devnull@localhost> | 2005-06-03 23:28:51 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2005-06-03 23:28:51 +0000 | 
| commit | df546440a47b65f89bd4ed81e511ac27bf47ddc6 (patch) | |
| tree | cc69674ca7427baf06c320a7b817bf7caa035b7d /src | |
| parent | 788f2fff04ce33f9c287b8cf79c5c51a90f9f1b4 (diff) | |
| download | scintilla-mirror-df546440a47b65f89bd4ed81e511ac27bf47ddc6.tar.gz | |
GetProperty* methods from Robert Roessler.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ScintillaBase.cxx | 25 | 
1 files changed, 25 insertions, 0 deletions
| diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index adf21ce6b..c70e2055d 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -655,6 +655,31 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara  		          reinterpret_cast<const char *>(lParam));  		break; +	case SCI_GETPROPERTY: { +			SString val = props.Get(reinterpret_cast<const char *>(wParam)); +			const int n = val.length(); +			if (lParam != 0) { +				char *ptr = reinterpret_cast<char *>(lParam); +				memcpy(ptr, val.c_str(), n); +				ptr[n] = '\0';	// terminate +			} +			return n;	// Not including NUL +		} + +	case SCI_GETPROPERTYEXPANDED: { +			SString val = props.GetExpanded(reinterpret_cast<const char *>(wParam)); +			const int n = val.length(); +			if (lParam != 0) { +				char *ptr = reinterpret_cast<char *>(lParam); +				memcpy(ptr, val.c_str(), n); +				ptr[n] = '\0';	// terminate +			} +			return n;	// Not including NUL +		} + +	case SCI_GETPROPERTYINT: +		return props.GetInt(reinterpret_cast<const char *>(wParam), lParam); +  	case SCI_SETKEYWORDS:  		if (wParam < numWordLists) {  			keyWordLists[wParam]->Clear(); | 
