3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "rowpainter.h"
19 #include "CoordCache.h"
21 #include "BufferParams.h"
22 #include "BufferView.h"
25 #include "support/gettext.h"
30 #include "MetricsInfo.h"
31 #include "Paragraph.h"
32 #include "ParagraphMetrics.h"
33 #include "paragraph_funcs.h"
34 #include "ParagraphParameters.h"
35 #include "TextMetrics.h"
38 #include "frontends/FontMetrics.h"
39 #include "frontends/Painter.h"
41 #include "insets/InsetText.h"
43 #include "support/debug.h"
44 #include "support/textutils.h"
46 #include "support/lassert.h"
47 #include <boost/crc.hpp>
53 using frontend::Painter;
54 using frontend::FontMetrics;
56 RowPainter::RowPainter(PainterInfo & pi,
57 Text const & text, pit_type pit, Row const & row, Bidi & bidi, int x, int y)
58 : pi_(pi), text_(text),
59 text_metrics_(pi_.base.bv->textMetrics(&text)),
60 pars_(text.paragraphs()),
61 row_(row), pit_(pit), par_(text.paragraphs()[pit]),
62 pm_(text_metrics_.parMetrics(pit)),
63 bidi_(bidi), change_(pi_.change_),
64 xo_(x), yo_(y), width_(text_metrics_.width())
66 bidi_.computeTables(par_, pi_.base.bv->buffer(), row_);
69 //lyxerr << "RowPainter: x: " << x_ << " xo: " << xo_ << " yo: " << yo_ << endl;
72 LASSERT(pit >= 0, /**/);
73 LASSERT(pit < int(text.paragraphs().size()), /**/);
77 FontInfo RowPainter::labelFont() const
79 return text_.labelFont(pi_.base.bv->buffer(), par_);
83 int RowPainter::leftMargin() const
85 return text_metrics_.leftMargin(text_metrics_.width(), pit_,
89 // If you want to debug inset metrics uncomment the following line:
90 //#define DEBUG_METRICS
91 // This draws green lines around each inset.
94 void RowPainter::paintInset(Inset const * inset, pos_type const pos)
96 Font const font = text_metrics_.displayFont(pit_, pos);
98 LASSERT(inset, return);
99 // Backup full_repaint status because some insets (InsetTabular)
100 // requires a full repaint
101 bool pi_full_repaint = pi_.full_repaint;
103 // FIXME: We should always use font, see documentation of
104 // noFontChange() in Inset.h.
105 pi_.base.font = inset->noFontChange() ?
106 pi_.base.bv->buffer().params().getFont().fontInfo() :
108 pi_.ltr_pos = (bidi_.level(pos) % 2 == 0);
109 pi_.change_ = change_.changed() ? change_ : par_.lookupChange(pos);
111 int const x1 = int(x_);
112 pi_.base.bv->coordCache().insets().add(inset, x1, yo_);
113 // insets are painted completely. Recursive
114 inset->drawBackground(pi_, x1, yo_);
115 inset->drawSelection(pi_, x1, yo_);
116 inset->draw(pi_, x1, yo_);
118 Dimension const & dim = pm_.insetDimension(inset);
120 paintForeignMark(x_, font.language(), dim.descent());
124 // Restore full_repaint status.
125 pi_.full_repaint = pi_full_repaint;
128 int const x2 = x1 + dim.wid;
129 int const y1 = yo_ + dim.des;
130 int const y2 = yo_ - dim.asc;
131 pi_.pain.line(x1, y1, x1, y2, Color_green);
132 pi_.pain.line(x1, y1, x2, y1, Color_green);
133 pi_.pain.line(x2, y1, x2, y2, Color_green);
134 pi_.pain.line(x1, y2, x2, y2, Color_green);
139 void RowPainter::paintHebrewComposeChar(pos_type & vpos, FontInfo const & font)
141 pos_type pos = bidi_.vis2log(vpos);
146 char_type c = par_.getChar(pos);
150 int const width = theFontMetrics(font).width(c);
153 for (pos_type i = pos - 1; i >= 0; --i) {
155 if (!Encodings::isHebrewComposeChar(c)) {
156 if (isPrintableNonspace(c)) {
157 int const width2 = pm_.singleWidth(i,
158 text_metrics_.displayFont(pit_, i));
159 dx = (c == 0x05e8 || // resh
160 c == 0x05d3) // dalet
162 : (width2 - width) / 2;
169 pi_.pain.text(int(x_) + dx, yo_, str, font);
173 void RowPainter::paintArabicComposeChar(pos_type & vpos, FontInfo const & font)
175 pos_type pos = bidi_.vis2log(vpos);
179 char_type c = par_.getChar(pos);
180 c = par_.transformChar(c, pos);
184 int const width = theFontMetrics(font).width(c);
187 for (pos_type i = pos - 1; i >= 0; --i) {
189 if (!Encodings::isArabicComposeChar(c)) {
190 if (isPrintableNonspace(c)) {
191 int const width2 = pm_.singleWidth(i,
192 text_metrics_.displayFont(pit_, i));
193 dx = (width2 - width) / 2;
199 pi_.pain.text(int(x_) + dx, yo_, str, font);
203 void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
204 bool hebrew, bool arabic)
206 // This method takes up 70% of time when typing
207 pos_type pos = bidi_.vis2log(vpos);
209 vector<char_type> str;
211 str.push_back(par_.getChar(pos));
214 char_type c = str[0];
219 str[0] = par_.transformChar(c, pos);
222 pos_type const end = row_.endpos();
223 FontSpan const font_span = par_.fontSpan(pos);
224 // Track-change status.
225 Change const & change_running = par_.lookupChange(pos);
228 bool const selection = pos >= row_.sel_beg && pos < row_.sel_end;
230 char_type prev_char = ' ';
231 // collect as much similar chars as we can
232 for (++vpos ; vpos < end ; ++vpos) {
233 pos = bidi_.vis2log(vpos);
234 if (pos < font_span.first || pos > font_span.last)
237 bool const new_selection = pos >= row_.sel_beg && pos < row_.sel_end;
238 if (new_selection != selection)
239 // Selection ends or starts here.
242 Change const & change = par_.lookupChange(pos);
243 if (!change_running.isSimilarTo(change))
244 // Track change type or author has changed.
247 char_type c = par_.getChar(pos);
249 if (c == '\t' || prev_char == '\t') {
254 if (!isPrintableNonspace(c))
257 /* Because we do our own bidi, at this point the strings are
258 * already in visual order. However, Qt also applies its own
259 * bidi algorithm to strings that it paints to the screen.
260 * Therefore, if we were to paint Hebrew/Arabic words as a
261 * single string, the letters in the words would get reversed
262 * again. In order to avoid that, we don't collect Hebrew/
263 * Arabic characters, but rather paint them one at a time.
264 * See also http://thread.gmane.org/gmane.editors.lyx.devel/79740
269 /* FIXME: these checks are irrelevant, since 'arabic' and
270 * 'hebrew' alone are already going to trigger a break.
271 * However, this should not be removed completely, because
272 * if an alternative solution is found which allows grouping
273 * of arabic and hebrew characters, then these breaks may have
276 if (arabic && Encodings::isArabicComposeChar(c))
279 if (hebrew && Encodings::isHebrewComposeChar(c))
288 c = par_.transformChar(c, pos);
289 /* see comment in hebrew, explaining why we break */
296 docstring s(&str[0], str.size());
299 s.replace(0,1,from_ascii(" "));
301 if (!selection && !change_running.changed()) {
302 x_ += pi_.pain.text(int(x_), yo_, s, font);
306 FontInfo copy = font;
307 if (change_running.changed())
308 copy.setPaintColor(change_running.color());
310 copy.setPaintColor(Color_selectiontext);
312 x_ += pi_.pain.text(int(x_), yo_, s, copy);
316 void RowPainter::paintForeignMark(double orig_x, Language const * lang,
319 if (!lyxrc.mark_foreign_language)
321 if (lang == latex_language)
323 if (lang == pi_.base.bv->buffer().params().language)
326 int const y = yo_ + 1 + desc;
327 pi_.pain.line(int(orig_x), y, int(x_), y, Color_language);
331 void RowPainter::paintFromPos(pos_type & vpos)
333 pos_type const pos = bidi_.vis2log(vpos);
334 Font const orig_font = text_metrics_.displayFont(pit_, pos);
335 double const orig_x = x_;
337 // usual characters, no insets
338 char_type const c = par_.getChar(pos);
340 // special case languages
341 string const & lang = orig_font.language()->lang();
342 bool const hebrew = lang == "hebrew";
343 bool const arabic = lang == "arabic_arabtex" || lang == "arabic_arabi" ||
346 // draw as many chars as we can
347 if ((!hebrew && !arabic)
348 || (hebrew && !Encodings::isHebrewComposeChar(c))
349 || (arabic && !Encodings::isArabicComposeChar(c))) {
350 paintChars(vpos, orig_font.fontInfo(), hebrew, arabic);
352 paintHebrewComposeChar(vpos, orig_font.fontInfo());
354 paintArabicComposeChar(vpos, orig_font.fontInfo());
357 paintForeignMark(orig_x, orig_font.language());
361 void RowPainter::paintChangeBar()
363 pos_type const start = row_.pos();
364 pos_type end = row_.endpos();
366 if (par_.size() == end) {
367 // this is the last row of the paragraph;
368 // thus, we must also consider the imaginary end-of-par character
372 if (start == end || !par_.isChanged(start, end))
375 int const height = text_metrics_.isLastRow(pit_, row_)
379 pi_.pain.fillRectangle(5, yo_ - row_.ascent(), 3, height, Color_changebar);
383 void RowPainter::paintAppendix()
385 // only draw the appendix frame once (for the main text)
386 if (!par_.params().appendix() || !text_.isMainText(pi_.base.bv->buffer()))
389 int y = yo_ - row_.ascent();
391 if (par_.params().startOfAppendix())
392 y += 2 * defaultRowHeight();
394 pi_.pain.line(1, y, 1, yo_ + row_.height(), Color_appendix);
395 pi_.pain.line(width_ - 2, y, width_ - 2, yo_ + row_.height(), Color_appendix);
399 void RowPainter::paintDepthBar()
401 depth_type const depth = par_.getDepth();
406 depth_type prev_depth = 0;
407 if (!text_metrics_.isFirstRow(pit_, row_)) {
408 pit_type pit2 = pit_;
411 prev_depth = pars_[pit2].getDepth();
414 depth_type next_depth = 0;
415 if (!text_metrics_.isLastRow(pit_, row_)) {
416 pit_type pit2 = pit_;
417 if (row_.endpos() >= pars_[pit2].size())
419 next_depth = pars_[pit2].getDepth();
422 for (depth_type i = 1; i <= depth; ++i) {
423 int const w = nestMargin() / 5;
424 int x = int(xo_) + w * i;
425 // only consider the changebar space if we're drawing outermost text
426 if (text_.isMainText(pi_.base.bv->buffer()))
427 x += changebarMargin();
429 int const starty = yo_ - row_.ascent();
430 int const h = row_.height() - 1 - (i - next_depth - 1) * 3;
432 pi_.pain.line(x, starty, x, starty + h, Color_depthbar);
435 pi_.pain.fillRectangle(x, starty, w, 2, Color_depthbar);
437 pi_.pain.fillRectangle(x, starty + h, w, 2, Color_depthbar);
442 int RowPainter::paintAppendixStart(int y)
444 FontInfo pb_font = sane_font;
445 pb_font.setColor(Color_appendix);
452 docstring const label = _("Appendix");
453 theFontMetrics(pb_font).rectText(label, w, a, d);
455 int const text_start = int(xo_ + (width_ - w) / 2);
456 int const text_end = text_start + w;
458 pi_.pain.rectText(text_start, y + d, label, pb_font, Color_none, Color_none);
460 pi_.pain.line(int(xo_ + 1), y, text_start, y, Color_appendix);
461 pi_.pain.line(text_end, y, int(xo_ + width_ - 2), y, Color_appendix);
463 return 3 * defaultRowHeight();
467 void RowPainter::paintFirst()
469 ParagraphParameters const & parparams = par_.params();
473 // start of appendix?
474 if (parparams.startOfAppendix())
475 y_top += paintAppendixStart(yo_ - row_.ascent() + 2 * defaultRowHeight());
477 Buffer const & buffer = pi_.base.bv->buffer();
478 Layout const & layout = par_.layout();
480 if (buffer.params().paragraph_separation == BufferParams::ParagraphSkipSeparation) {
482 if (layout.latextype == LATEX_PARAGRAPH
483 && !par_.getDepth()) {
484 y_top += buffer.params().getDefSkip().inPixels(*pi_.base.bv);
486 Layout const & playout = pars_[pit_ - 1].layout();
487 if (playout.latextype == LATEX_PARAGRAPH
488 && !pars_[pit_ - 1].getDepth()) {
489 // is it right to use defskip here, too? (AS)
490 y_top += buffer.params().getDefSkip().inPixels(*pi_.base.bv);
496 bool const is_rtl = text_.isRTL(buffer, par_);
497 bool const is_seq = isFirstInSequence(pit_, text_.paragraphs());
498 //lyxerr << "paintFirst: " << par_.id() << " is_seq: " << is_seq << endl;
500 // should we print a label?
501 if (layout.labeltype >= LABEL_STATIC
502 && (layout.labeltype != LABEL_STATIC
503 || layout.latextype != LATEX_ENVIRONMENT
506 FontInfo const font = labelFont();
507 FontMetrics const & fm = theFontMetrics(font);
509 docstring const str = par_.labelString();
513 // this is special code for the chapter layout. This is
514 // printed in an extra row and has a pagebreak at
516 if (layout.counter == "chapter") {
517 double spacing_val = 1.0;
518 if (!parparams.spacing().isDefault()) {
519 spacing_val = parparams.spacing().getValue();
521 spacing_val = buffer.params().spacing().getValue();
524 int const labeladdon = int(fm.maxHeight() * layout.spacing.getValue() * spacing_val);
526 int const maxdesc = int(fm.maxDescent() * layout.spacing.getValue() * spacing_val)
527 + int(layout.parsep) * defaultRowHeight();
530 x = width_ - leftMargin() -
534 pi_.pain.text(int(x), yo_ - maxdesc - labeladdon, str, font);
537 x = width_ - leftMargin()
538 + fm.width(layout.labelsep);
540 x = x_ - fm.width(layout.labelsep)
544 pi_.pain.text(int(x), yo_, str, font);
548 // the labels at the top of an environment.
549 // More or less for bibliography
551 (layout.labeltype == LABEL_TOP_ENVIRONMENT ||
552 layout.labeltype == LABEL_BIBLIO ||
553 layout.labeltype == LABEL_CENTERED_TOP_ENVIRONMENT)) {
554 FontInfo const font = labelFont();
555 docstring const str = par_.labelString();
557 double spacing_val = 1.0;
558 if (!parparams.spacing().isDefault())
559 spacing_val = parparams.spacing().getValue();
561 spacing_val = buffer.params().spacing().getValue();
563 FontMetrics const & fm = theFontMetrics(font);
565 int const labeladdon = int(fm.maxHeight()
566 * layout.spacing.getValue() * spacing_val);
569 int(fm.maxDescent() * layout.spacing.getValue() * spacing_val
570 + (layout.labelbottomsep * defaultRowHeight()));
573 if (layout.labeltype == LABEL_CENTERED_TOP_ENVIRONMENT) {
576 x += (width_ - text_metrics_.rightMargin(pm_) - leftMargin()) / 2;
577 x -= fm.width(str) / 2;
579 x = width_ - leftMargin() - fm.width(str);
581 pi_.pain.text(int(x), yo_ - maxdesc - labeladdon, str, font);
587 void RowPainter::paintLast()
589 bool const is_rtl = text_.isRTL(pi_.base.bv->buffer(), par_);
590 int const endlabel = getEndLabel(pit_, text_.paragraphs());
592 // paint imaginary end-of-paragraph character
594 Change const & change = par_.lookupChange(par_.size());
595 if (change.changed()) {
596 FontMetrics const & fm =
597 theFontMetrics(pi_.base.bv->buffer().params().getFont());
598 int const length = fm.maxAscent() / 2;
599 Color col = change.color();
601 pi_.pain.line(int(x_) + 1, yo_ + 2, int(x_) + 1, yo_ + 2 - length, col,
602 Painter::line_solid, Painter::line_thick);
604 if (change.deleted()) {
605 pi_.pain.line(int(x_) + 1 - length, yo_ + 2, int(x_) + 1 + length,
606 yo_ + 2, col, Painter::line_solid, Painter::line_thick);
608 pi_.pain.line(int(x_) + 1 - length, yo_ + 2, int(x_) + 1,
609 yo_ + 2, col, Painter::line_solid, Painter::line_thick);
618 case END_LABEL_FILLED_BOX: {
619 FontInfo const font = labelFont();
620 FontMetrics const & fm = theFontMetrics(font);
621 int const size = int(0.75 * fm.maxAscent());
622 int const y = yo_ - size;
623 int const max_row_width = width_ - size - Inset::TEXT_TO_INSET_OFFSET;
624 int x = is_rtl ? nestMargin() + changebarMargin()
625 : max_row_width - text_metrics_.rightMargin(pm_);
627 // If needed, move the box a bit to avoid overlapping with text.
628 int const rem = max_row_width - row_.width();
630 x += is_rtl ? rem : - rem;
632 if (endlabel == END_LABEL_BOX)
633 pi_.pain.rectangle(x, y, size, size, Color_eolmarker);
635 pi_.pain.fillRectangle(x, y, size, size, Color_eolmarker);
639 case END_LABEL_STATIC: {
640 FontInfo const font = labelFont();
641 FontMetrics const & fm = theFontMetrics(font);
642 docstring const & str = par_.layout().endlabelstring();
643 double const x = is_rtl ?
645 : - text_metrics_.rightMargin(pm_) - row_.width();
646 pi_.pain.text(int(x), yo_, str, font);
650 case END_LABEL_NO_LABEL:
656 void RowPainter::paintOnlyInsets()
658 CoordCache const & cache = pi_.base.bv->coordCache();
659 pos_type const end = row_.endpos();
660 for (pos_type pos = row_.pos(); pos != end; ++pos) {
661 // If outer row has changed, nested insets are repaint completely.
662 Inset const * inset = par_.getInset(pos);
665 if (x_ > pi_.base.bv->workWidth()
666 || !cache.getInsets().has(inset))
668 x_ = cache.getInsets().x(inset);
670 bool const pi_selected = pi_.selected;
671 Cursor const & cur = pi_.base.bv->cursor();
672 if (cur.selection() && cur.text() == &text_
673 && cur.anchor().text() == &text_)
674 pi_.selected = row_.sel_beg <= pos && row_.sel_end > pos;
675 paintInset(inset, pos);
676 pi_.selected = pi_selected;
681 void RowPainter::paintText()
683 pos_type const end = row_.endpos();
684 // Spaces at logical line breaks in bidi text must be skipped during
685 // painting. However, they may appear visually in the middle
686 // of a row; they must be skipped, wherever they are...
687 // * logically "abc_[HEBREW_\nHEBREW]"
688 // * visually "abc_[_WERBEH\nWERBEH]"
689 pos_type skipped_sep_vpos = -1;
690 pos_type body_pos = par_.beginOfBody();
692 (body_pos > end || !par_.isLineSeparator(body_pos - 1))) {
696 Layout const & layout = par_.layout();
698 Change change_running;
699 int change_last_x = 0;
701 // check for possible inline completion
702 DocIterator const & inlineCompletionPos = pi_.base.bv->inlineCompletionPos();
703 pos_type inlineCompletionVPos = -1;
704 if (inlineCompletionPos.inTexted()
705 && inlineCompletionPos.text() == &text_
706 && inlineCompletionPos.pit() == pit_
707 && inlineCompletionPos.pos() - 1 >= row_.pos()
708 && inlineCompletionPos.pos() - 1 < row_.endpos()) {
709 // draw logically behind the previous character
710 inlineCompletionVPos = bidi_.log2vis(inlineCompletionPos.pos() - 1);
713 // Use font span to speed things up, see below
717 // If the last logical character is a separator, don't paint it, unless
718 // it's in the last row of a paragraph; see skipped_sep_vpos declaration
719 if (end > 0 && end < par_.size() && par_.isSeparator(end - 1))
720 skipped_sep_vpos = bidi_.log2vis(end - 1);
722 for (pos_type vpos = row_.pos(); vpos < end; ) {
723 if (x_ > pi_.base.bv->workWidth())
726 // Skip the separator at the logical end of the row
727 if (vpos == skipped_sep_vpos) {
732 pos_type const pos = bidi_.vis2log(vpos);
734 if (pos >= par_.size()) {
739 // Use font span to speed things up, see above
740 if (vpos < font_span.first || vpos > font_span.last) {
741 font_span = par_.fontSpan(vpos);
742 font = text_metrics_.displayFont(pit_, vpos);
744 // split font span if inline completion is inside
745 if (font_span.first <= inlineCompletionVPos
746 && font_span.last > inlineCompletionVPos)
747 font_span.last = inlineCompletionVPos;
750 const int width_pos = pm_.singleWidth(pos, font);
752 if (x_ + width_pos < 0) {
757 Change const & change = par_.lookupChange(pos);
758 if (change.changed() && !change_running.changed()) {
759 change_running = change;
760 change_last_x = int(x_);
763 Inset const * inset = par_.getInset(pos);
764 bool const highly_editable_inset = inset
765 && inset->editable() == Inset::HIGHLY_EDITABLE;
767 // If we reach the end of a change or if the author changes, paint it.
768 // We also don't paint across things like tables
769 if (change_running.changed() && (highly_editable_inset
770 || !change.changed() || !change_running.isSimilarTo(change))) {
771 // Calculate 1/3 height of the buffer's default font
772 FontMetrics const & fm
773 = theFontMetrics(pi_.base.bv->buffer().params().getFont());
774 int const y_bar = change_running.deleted() ?
775 yo_ - fm.maxAscent() / 3 : yo_ + fm.maxAscent() / 6;
776 pi_.pain.line(change_last_x, y_bar, int(x_), y_bar,
777 change_running.color(), Painter::line_solid,
780 // Change might continue with a different author or type
781 if (change.changed() && !highly_editable_inset) {
782 change_running = change;
783 change_last_x = int(x_);
785 change_running.setUnchanged();
788 if (body_pos > 0 && pos == body_pos - 1) {
789 int const lwidth = theFontMetrics(labelFont())
790 .width(layout.labelsep);
792 x_ += row_.label_hfill + lwidth - width_pos;
795 // Is the inline completion in front of character?
796 if (font.isRightToLeft() && vpos == inlineCompletionVPos)
797 paintInlineCompletion(font);
799 if (par_.isSeparator(pos)) {
800 Font const orig_font = text_metrics_.displayFont(pit_, pos);
801 double const orig_x = x_;
804 x_ += row_.separator;
805 paintForeignMark(orig_x, orig_font.language());
809 // If outer row has changed, nested insets are repaint completely.
810 pi_.base.bv->coordCache().insets().add(inset, int(x_), yo_);
812 bool const pi_selected = pi_.selected;
813 Cursor const & cur = pi_.base.bv->cursor();
814 if (cur.selection() && cur.text() == &text_
815 && cur.anchor().text() == &text_)
816 pi_.selected = row_.sel_beg <= pos && row_.sel_end > pos;
817 paintInset(inset, pos);
818 pi_.selected = pi_selected;
822 // paint as many characters as possible.
826 // Is the inline completion after character?
827 if (!font.isRightToLeft() && vpos - 1 == inlineCompletionVPos)
828 paintInlineCompletion(font);
831 // if we reach the end of a struck out range, paint it
832 if (change_running.changed()) {
833 FontMetrics const & fm
834 = theFontMetrics(pi_.base.bv->buffer().params().getFont());
835 int const y_bar = change_running.deleted() ?
836 yo_ - fm.maxAscent() / 3 : yo_ + fm.maxAscent() / 6;
837 pi_.pain.line(change_last_x, y_bar, int(x_), y_bar,
838 change_running.color(), Painter::line_solid, Painter::line_thin);
839 change_running.setUnchanged();
844 void RowPainter::paintInlineCompletion(Font const & font)
846 docstring completion = pi_.base.bv->inlineCompletion();
847 FontInfo f = font.fontInfo();
848 bool rtl = font.isRightToLeft();
850 // draw the unique and the non-unique completion part
851 // Note: this is not time-critical as it is
852 // only done once per screen.
853 size_t uniqueTo = pi_.base.bv->inlineCompletionUniqueChars();
854 docstring s1 = completion.substr(0, uniqueTo);
855 docstring s2 = completion.substr(uniqueTo);
856 ColorCode c1 = Color_inlinecompletion;
857 ColorCode c2 = Color_nonunique_inlinecompletion;
867 pi_.pain.text(int(x_), yo_, s1, f);
868 x_ += theFontMetrics(font).width(s1);
873 pi_.pain.text(int(x_), yo_, s2, f);
874 x_ += theFontMetrics(font).width(s2);