110 : priority(0), visible(0),
111 anchor_point(0), relative_pos(0),
112 anchor_vertical(0), anchor_horizontal(0),
113 row_count(0), column_count(0),
114 row_lock(0), column_lock(0),
115 pen_style(0), window_style(0),
117 fill_color(0), fill_opacity(0),
118 border_color(0), border_type(0),
119 scroll_dir(0), print_dir(0),
120 effect_dir(0), display_effect(0),
122 justify(0), word_wrap(0),
124 true_row_count(0), true_column_count(0),
126 changed(
true), lock(QMutex::Recursive)
131 int _anchor_point,
int _relative_pos,
132 int _anchor_vertical,
int _anchor_horizontal,
133 int _row_count,
int _column_count,
134 int _row_lock,
int _column_lock,
135 int _pen_style,
int _window_style)
147 QMutexLocker locker(&
lock);
161 if ((!_pen_style && !
exists) || _pen_style)
164 if ((!_window_style && !
exists) || _window_style)
167 Resize(_row_count, _column_count);
200 for (; j < new_columns; ++j)
201 new_text[i * new_columns + j].attr =
pen.
attr;
203 for (; i < new_rows; ++i)
204 for (j = 0; j < new_columns; ++j)
205 new_text[i * new_columns + j].attr =
pen.
attr;
223 for (
uint i = row_count; i < new_rows; ++i)
224 for (
uint j = 0; j < new_columns; ++j)
237 QMutexLocker locker(&
lock);
252 QMutexLocker locker(&
lock);
276 QMutexLocker locker(&
lock);
278 vector<CC708String*> list;
320 const uint style2justify[] =
326 if ((style < 1) || (style > 7))
339 justify = style2justify[style];
340 word_wrap = (style > 3) && (style < 7) ? 1 : 0;
354 QString dbg_char = ch;
355 if (ch.toLatin1() < 32)
356 dbg_char = QString(
"0x%1").arg( (
int)ch.toLatin1(), 0,16);
360 LOG(VB_VBI, LOG_INFO,
361 QString(
"AddChar(%1) at (c %2, r %3) INVALID win(%4,%5)")
367 if (ch.toLatin1() == 0x0D)
373 QMutexLocker locker(&
lock);
375 if (ch.toLatin1() == 0x08)
393 LOG(VB_VBI, LOG_INFO, QString(
"AddChar(%1) at (c %2, r %3) -> (%4,%5)")
399 QMutexLocker locker(&
lock);
407 for (
uint j = 0; j < true_row_count - 1; j++)
409 text[(true_column_count * j) + i] =
410 text[(true_column_count * (j+1)) + i];
416 text[(true_column_count * (true_row_count - 1)) + i] =
tmp;
418 pen.
row = true_row_count - 1;
442 LOG(VB_VBI, LOG_INFO, QString(
"IncrPen dir%1: (c %2, r %3) -> (%4,%5)")
444 .arg(new_column).arg(new_row));
457 new_column = (
int)true_column_count - 1;
460 Scroll(new_row, new_column);
465 pen.
row = max(new_row, 0);
484 LOG(VB_VBI, LOG_INFO, QString(
"DecrPen dir%1: (c %2, r %3) -> (%4,%5)")
486 .arg(new_column).arg(new_row));
499 new_column = (
int)true_column_count - 1;
502 Scroll(new_row, new_column);
507 pen.
row = max(new_row, 0);
533 static const uint style2font[] = { 0, 0, 1, 2, 3, 4, 3, 4 };
535 if ((style < 1) || (style > 7))
555 : attr(win.pen.attr), character(
' ')
582 static int X[] = {0, 96, 255, 255};
583 return QColor(X[(c>>4)&3], X[(c>>2)&3], X[c&3]);