From f067ce79b19e7f23940510dfa88fb5fc9febc41d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 9 Sep 2010 22:30:21 +0200 Subject: Removing SetRedraw, and trying a bulk method instead. --- iup/src/iup_text.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'iup/src/iup_text.c') diff --git a/iup/src/iup_text.c b/iup/src/iup_text.c index d2e2e36..cd8f400 100755 --- a/iup/src/iup_text.c +++ b/iup/src/iup_text.c @@ -83,7 +83,17 @@ void iupTextUpdateFormatTags(Ihandle* ih) for (i = 0; i < count; i++) { - iupdrvTextAddFormatTag(ih, tag_array[i]); + char* bulk = iupAttribGet(tag_array[i], "BULK"); + if (format && iupStrBoolean(format)) + { + Ihandle* child = NULL; + void* state = iupdrvTextAddFormatTagStartBulk(ih); + for (child = IupGetNextChild(tag_array[i], NULL); child; child = IupGetNextChild(tag_array[i], child)) + iupdrvTextAddFormatTag(ih, child, 1); + iupdrvTextAddFormatTagStopBulk(ih, state); + } + else + iupdrvTextAddFormatTag(ih, tag_array[i], 0); IupDestroy(tag_array[i]); } iupArrayDestroy(ih->data->formattags); @@ -101,7 +111,18 @@ int iupTextSetAddFormatTagHandleAttrib(Ihandle* ih, const char* value) /* must update VALUE before updating the format */ iTextUpdateValueAttrib(ih); - iupdrvTextAddFormatTag(ih, formattag); + char* bulk = iupAttribGet(formattag, "BULK"); + if (format && iupStrBoolean(format)) + { + Ihandle* child = NULL; + void* state = iupdrvTextAddFormatTagStartBulk(ih); + for (child = IupGetNextChild(formattag, NULL); child; child = IupGetNextChild(formattag, child)) + iupdrvTextAddFormatTag(ih, child, 1); + iupdrvTextAddFormatTagStopBulk(ih, state); + } + else + iupdrvTextAddFormatTag(ih, formattag, 0); + IupDestroy(formattag); } else -- cgit v1.2.3