From c238f727943fd3b4b8a46be816da54e10aca35d2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 10 Sep 2010 00:30:10 +0200 Subject: The User object may have children now, and adding the CLEANOUT boolean to the formattag bulk system. --- iup/src/iup_text.c | 6 ++++++ iup/src/iup_user.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'iup/src') diff --git a/iup/src/iup_text.c b/iup/src/iup_text.c index 06c6915..6042970 100755 --- a/iup/src/iup_text.c +++ b/iup/src/iup_text.c @@ -116,6 +116,12 @@ int iupTextSetAddFormatTagHandleAttrib(Ihandle* ih, const char* value) { Ihandle* child = NULL; void* state = iupdrvTextAddFormatTagStartBulk(ih); + char* cleanout = iupAttribGet(formattag, "CLEANOUT"); + if (cleanout && iupStrBoolean(cleanout)) + { + iupAttribSetStr(ih, "SELECTION", "ALL"); + iupAttribSetStr(ih, "REMOVEFORMATTING", NULL); + } for (child = IupGetNextChild(formattag, NULL); child; child = IupGetNextChild(formattag, child)) iupdrvTextAddFormatTag(ih, child, 1); iupdrvTextAddFormatTagStopBulk(ih, state); diff --git a/iup/src/iup_user.c b/iup/src/iup_user.c index 842f436..90a9fb7 100755 --- a/iup/src/iup_user.c +++ b/iup/src/iup_user.c @@ -32,7 +32,7 @@ Iclass* iupUserGetClass(void) ic->name = "user"; ic->format = NULL; /* no parameters */ ic->nativetype = IUP_TYPEVOID; - ic->childtype = IUP_CHILDNONE; + ic->childtype = IUP_CHILDMANY; ic->is_interactive = 0; iupClassRegisterAttribute(ic, "CLEARATTRIBUTES", NULL, iUserSetClearAttributesAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); -- cgit v1.2.3