From df546440a47b65f89bd4ed81e511ac27bf47ddc6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 3 Jun 2005 23:28:51 +0000 Subject: GetProperty* methods from Robert Roessler. --- src/ScintillaBase.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src') 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(lParam)); break; + case SCI_GETPROPERTY: { + SString val = props.Get(reinterpret_cast(wParam)); + const int n = val.length(); + if (lParam != 0) { + char *ptr = reinterpret_cast(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(wParam)); + const int n = val.length(); + if (lParam != 0) { + char *ptr = reinterpret_cast(lParam); + memcpy(ptr, val.c_str(), n); + ptr[n] = '\0'; // terminate + } + return n; // Not including NUL + } + + case SCI_GETPROPERTYINT: + return props.GetInt(reinterpret_cast(wParam), lParam); + case SCI_SETKEYWORDS: if (wParam < numWordLists) { keyWordLists[wParam]->Clear(); -- cgit v1.2.3