-// Extract style settings from a spec-string which is composed of one or
-// more of the following comma separated elements:
-//
-// bold turns on bold
-// italic turns on italics
-// fore:#RRGGBB sets the foreground colour
-// back:#RRGGBB sets the background colour
-// face:[facename] sets the font face name to use
-// size:[num] sets the font size in points
-// eol turns on eol filling
-//
-
-void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) {
-
- wxStringTokenizer tkz(spec, ",");
- while (tkz.HasMoreTokens()) {
- wxString token = tkz.GetNextToken();
-
- wxString option = token.BeforeFirst(':');
- wxString val = token.AfterFirst(':');
-
- if (option == "bold")
- StyleSetBold(styleNum, true);
-
- else if (option == "italic")
- StyleSetItalic(styleNum, true);
-
- else if (option == "eol")
- StyleSetEOLFilled(styleNum, true);
-
- else if (option == "size") {
- long points;
- if (val.ToLong(&points))
- StyleSetSize(styleNum, points);
- }
-
- else if (option == "face")
- StyleSetFaceName(styleNum, val);
+ int wxStyledTextCtrl::ReplaceTarget(const wxString& text) {
+ wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+ return SendMsg(2194, strlen(buf), (long)(const char*)buf);
+}