parent
68e0498c7d
commit
da99126da6
|
@ -342,7 +342,8 @@ evas_textblock2_style_set(Evas_Textblock_Style *ts, const char *text)
|
||||||
|
|
||||||
obj = l->data;
|
obj = l->data;
|
||||||
o = (Evas_Object_Textblock *)(obj->object_data);
|
o = (Evas_Object_Textblock *)(obj->object_data);
|
||||||
evas_object_textblock2_text_markup_set(obj, o->markup_text);
|
if (o->markup_text)
|
||||||
|
evas_object_textblock2_text_markup_set(obj, o->markup_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +379,8 @@ evas_object_textblock2_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
|
||||||
{
|
{
|
||||||
o->style = NULL;
|
o->style = NULL;
|
||||||
}
|
}
|
||||||
evas_object_textblock2_text_markup_set(obj, o->markup_text);
|
if (o->markup_text)
|
||||||
|
evas_object_textblock2_text_markup_set(obj, o->markup_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Evas_Textblock_Style *
|
const Evas_Textblock_Style *
|
||||||
|
@ -505,17 +507,17 @@ _format_free(Evas_Object *obj, Evas_Object_Textblock_Format *fmt)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_lines_clear(Evas_Object *obj)
|
_lines_clear(Evas_Object *obj, Evas_Object_Textblock_Line *lines)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock *o;
|
Evas_Object_Textblock *o;
|
||||||
|
|
||||||
o = (Evas_Object_Textblock *)(obj->object_data);
|
o = (Evas_Object_Textblock *)(obj->object_data);
|
||||||
while (o->lines)
|
while (lines)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock_Line *ln;
|
Evas_Object_Textblock_Line *ln;
|
||||||
|
|
||||||
ln = (Evas_Object_Textblock_Line *)o->lines;
|
ln = (Evas_Object_Textblock_Line *)lines;
|
||||||
o->lines = evas_object_list_remove(o->lines, ln);
|
lines = evas_object_list_remove(lines, ln);
|
||||||
while (ln->items)
|
while (ln->items)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock_Item *it;
|
Evas_Object_Textblock_Item *it;
|
||||||
|
@ -811,9 +813,15 @@ evas_object_textblock2_text_markup_set(Evas_Object *obj, const char *text)
|
||||||
o->markup_text = NULL;
|
o->markup_text = NULL;
|
||||||
}
|
}
|
||||||
_nodes_clear(obj);
|
_nodes_clear(obj);
|
||||||
_lines_clear(obj);
|
_lines_clear(obj, o->lines);
|
||||||
|
o->lines = NULL;
|
||||||
o->changed = 1;
|
o->changed = 1;
|
||||||
evas_object_change(obj);
|
evas_object_change(obj);
|
||||||
|
if (!o->style)
|
||||||
|
{
|
||||||
|
o->markup_text = strdup(text);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
char *s, *p;
|
char *s, *p;
|
||||||
|
@ -1139,7 +1147,8 @@ evas_textblock2_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text)
|
||||||
n->text = _strbuf_append(n->text, (char *)text, &(n->len), &(n->alloc));
|
n->text = _strbuf_append(n->text, (char *)text, &(n->len), &(n->alloc));
|
||||||
cur->node = n;
|
cur->node = n;
|
||||||
cur->pos = n->len - 1;
|
cur->pos = n->len - 1;
|
||||||
_lines_clear(cur->obj);
|
_lines_clear(cur->obj, o->lines);
|
||||||
|
o->lines = NULL;
|
||||||
o->changed = 1;
|
o->changed = 1;
|
||||||
evas_object_change(cur->obj);
|
evas_object_change(cur->obj);
|
||||||
}
|
}
|
||||||
|
@ -1171,7 +1180,8 @@ evas_textblock2_cursor_format_append(Evas_Textblock_Cursor *cur, const char *for
|
||||||
n->text = _strbuf_append(n->text, (char *)format, &(n->len), &(n->alloc));
|
n->text = _strbuf_append(n->text, (char *)format, &(n->len), &(n->alloc));
|
||||||
cur->node = n;
|
cur->node = n;
|
||||||
cur->pos = 0;
|
cur->pos = 0;
|
||||||
_lines_clear(cur->obj);
|
_lines_clear(cur->obj, o->lines);
|
||||||
|
o->lines = NULL;
|
||||||
o->changed = 1;
|
o->changed = 1;
|
||||||
evas_object_change(cur->obj);
|
evas_object_change(cur->obj);
|
||||||
}
|
}
|
||||||
|
@ -1211,7 +1221,8 @@ evas_object_textblock2_clear(Evas_Object *obj)
|
||||||
free(o->markup_text);
|
free(o->markup_text);
|
||||||
o->markup_text = NULL;
|
o->markup_text = NULL;
|
||||||
}
|
}
|
||||||
_lines_clear(obj);
|
_lines_clear(obj, o->lines);
|
||||||
|
o->lines = NULL;
|
||||||
o->changed = 1;
|
o->changed = 1;
|
||||||
evas_object_change(obj);
|
evas_object_change(obj);
|
||||||
}
|
}
|
||||||
|
@ -2264,7 +2275,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
|
||||||
o = (Evas_Object_Textblock *)(obj->object_data);
|
o = (Evas_Object_Textblock *)(obj->object_data);
|
||||||
obj->layer->evas->engine.func->context_multiplier_unset(output,
|
obj->layer->evas->engine.func->context_multiplier_unset(output,
|
||||||
context);
|
context);
|
||||||
#if 1 /* using for some debugging. will go soon */
|
#if 0 /* using for some debugging. will go soon */
|
||||||
obj->layer->evas->engine.func->context_color_set(output,
|
obj->layer->evas->engine.func->context_color_set(output,
|
||||||
context,
|
context,
|
||||||
230, 160, 30, 100);
|
230, 160, 30, 100);
|
||||||
|
@ -2326,11 +2337,15 @@ evas_object_textblock_render_pre(Evas_Object *obj)
|
||||||
if ((o->changed) ||
|
if ((o->changed) ||
|
||||||
(o->last_w != obj->cur.geometry.w))
|
(o->last_w != obj->cur.geometry.w))
|
||||||
{
|
{
|
||||||
_lines_clear(obj);
|
Evas_Object_Textblock_Line *lines;
|
||||||
|
|
||||||
|
lines = o->lines;
|
||||||
|
o->lines = NULL;
|
||||||
_layout(obj,
|
_layout(obj,
|
||||||
0,
|
0,
|
||||||
obj->cur.geometry.w, obj->cur.geometry.h,
|
obj->cur.geometry.w, obj->cur.geometry.h,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
_lines_clear(obj, lines);
|
||||||
o->last_w = obj->cur.geometry.w;
|
o->last_w = obj->cur.geometry.w;
|
||||||
updates = evas_object_render_pre_prev_cur_add(updates, obj);
|
updates = evas_object_render_pre_prev_cur_add(updates, obj);
|
||||||
o->changed = 0;
|
o->changed = 0;
|
||||||
|
|
Loading…
Reference in New Issue