diff options
author | nyamatongwe <unknown> | 2005-06-03 23:28:51 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2005-06-03 23:28:51 +0000 |
commit | 3729e5c1a48f20a790d488b70487b2b6c20dffeb (patch) | |
tree | cc69674ca7427baf06c320a7b817bf7caa035b7d /src/ScintillaBase.cxx | |
parent | 472a353e0f4d933ffaa745b4ef626855c50258fb (diff) | |
download | scintilla-mirror-3729e5c1a48f20a790d488b70487b2b6c20dffeb.tar.gz |
GetProperty* methods from Robert Roessler.
Diffstat (limited to 'src/ScintillaBase.cxx')
-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(); |