| 7408 | } |
| 7409 | |
| 7410 | void Editor::AddStyledText ( char *buffer, int appendLength ) |
| 7411 | { |
| 7412 | // The buffer consists of alternating character bytes and style bytes |
| 7413 | int textLength = appendLength / 2; |
| 7414 | std::string text ( textLength, '\0' ); |
| 7415 | int i; |
| 7416 | for ( i = 0; i < textLength; i++ ) { |
| 7417 | text[i] = buffer[i * 2]; |
| 7418 | } |
| 7419 | pdoc->InsertString ( CurrentPosition(), text.c_str(), textLength ); |
| 7420 | for ( i = 0; i < textLength; i++ ) { |
| 7421 | text[i] = buffer[i * 2 + 1]; |
| 7422 | } |
| 7423 | pdoc->StartStyling ( CurrentPosition(), static_cast<char> ( 0xff ) ); |
| 7424 | pdoc->SetStyles ( textLength, text.c_str() ); |
| 7425 | SetEmptySelection ( sel.MainCaret() + textLength ); |
| 7426 | } |
| 7427 | |
| 7428 | static bool ValidMargin ( unsigned long wParam ) |
| 7429 | { |
nothing calls this directly
no test coverage detected