+// Retrieve a 'property' value previously set with SetProperty.
+wxString wxStyledTextCtrl::GetProperty(const wxString& key) {
+ int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), 0);
+ if (!len) return wxEmptyString;
+
+ wxMemoryBuffer mbuf(len+1);
+ char* buf = (char*)mbuf.GetWriteBuf(len+1);
+ SendMsg(4008, (long)(const char*)wx2stc(key), (long)buf);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Retrieve a 'property' value previously set with SetProperty,
+// with '$()' variable replacement on returned buffer.
+wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) {
+ int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), 0);
+ if (!len) return wxEmptyString;
+
+ wxMemoryBuffer mbuf(len+1);
+ char* buf = (char*)mbuf.GetWriteBuf(len+1);
+ SendMsg(4009, (long)(const char*)wx2stc(key), (long)buf);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Retrieve a 'property' value previously set with SetProperty,
+// interpreted as an int AFTER any '$()' variable replacement.
+int wxStyledTextCtrl::GetPropertyInt(const wxString& key) {
+ return SendMsg(4010, (long)(const char*)wx2stc(key), 0);
+}
+
+// Retrieve the number of bits the current lexer needs for styling.
+int wxStyledTextCtrl::GetStyleBitsNeeded() {
+ return SendMsg(4011, 0, 0);
+}
+