| 12 | } |
| 13 | |
| 14 | void CtrlrTextEditor::setAttributedText (const AttributedString &text) |
| 15 | { |
| 16 | clear(); |
| 17 | |
| 18 | for (int i=0; i<text.getNumAttributes(); i++) |
| 19 | { |
| 20 | const AttributedString::Attribute a = text.getAttribute(i); |
| 21 | setFont (a.font); |
| 22 | setColour (TextEditor::textColourId, a.colour); |
| 23 | |
| 24 | insertTextAtCaret (text.getText().substring (a.range.getStart(), a.range.getEnd())); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | void CtrlrTextEditor::insertText (const String &text, const Font &font, const Colour &colour) |
| 29 | { |
nothing calls this directly
no test coverage detected