diff options
Diffstat (limited to 'iup/src/iup_text.c')
-rwxr-xr-x | iup/src/iup_text.c | 25 |
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 |