summaryrefslogtreecommitdiff
path: root/iup/src/iup_text.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 22:30:21 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 23:00:56 +0200
commitf067ce79b19e7f23940510dfa88fb5fc9febc41d (patch)
tree8ea080376ce5689d8249abcb2edc18637beb9cc7 /iup/src/iup_text.c
parent118211dab6af167167ce643d40607e6753b0e000 (diff)
Removing SetRedraw, and trying a bulk method instead.
Diffstat (limited to 'iup/src/iup_text.c')
-rwxr-xr-xiup/src/iup_text.c25
1 files changed, 23 insertions, 2 deletions
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