Adds a message entry to the message box.
| 565 | |
| 566 | // Adds a message entry to the message box. |
| 567 | void ScrollView::AddMessage(const char* format, ...) { |
| 568 | va_list args; |
| 569 | char message[kMaxMsgSize]; |
| 570 | char form[kMaxMsgSize]; |
| 571 | |
| 572 | va_start(args, format); // variable list |
| 573 | vsnprintf(message, kMaxMsgSize, format, args); |
| 574 | va_end(args); |
| 575 | |
| 576 | snprintf(form, kMaxMsgSize, "w%u:%s", window_id_, message); |
| 577 | |
| 578 | char* esc = AddEscapeChars(form); |
| 579 | SendMsg("addMessage(\"%s\")", esc); |
| 580 | delete[] esc; |
| 581 | } |
| 582 | |
| 583 | // Set a messagebox. |
| 584 | void ScrollView::AddMessageBox() { |
no outgoing calls
no test coverage detected