diff options
author | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
commit | eed0eb6a476d54ce19aeff137984aa981d9e3976 (patch) | |
tree | 807891636efd2f87dcbd261e971216269973ae07 /iup/src/iup_layout.c | |
parent | ccc8261e4d48de89da4ddfe7b55e378ae0cd6f47 (diff) |
Upgrading to iup 3.1
Diffstat (limited to 'iup/src/iup_layout.c')
-rwxr-xr-x | iup/src/iup_layout.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/iup/src/iup_layout.c b/iup/src/iup_layout.c index b96293c..0ccd496 100755 --- a/iup/src/iup_layout.c +++ b/iup/src/iup_layout.c @@ -43,7 +43,7 @@ static void iLayoutDisplayUpdateChildren(Ihandle *ih) iLayoutDisplayUpdateChildren(child); if (child->handle && child->iclass->nativetype != IUP_TYPEVOID) - iupdrvDisplayUpdate(child); + iupdrvPostRedraw(child); } } @@ -54,7 +54,7 @@ void IupUpdate(Ihandle* ih) return; if (ih->handle && ih->iclass->nativetype != IUP_TYPEVOID) - iupdrvDisplayUpdate(ih); + iupdrvPostRedraw(ih); } void IupUpdateChildren(Ihandle* ih) @@ -74,7 +74,7 @@ static void iLayoutDisplayRedrawChildren(Ihandle *ih) iLayoutDisplayRedrawChildren(child); if (child->handle && child->iclass->nativetype != IUP_TYPEVOID) - iupdrvDisplayRedraw(child); + iupdrvRedrawNow(child); } } @@ -85,7 +85,7 @@ void IupRedraw(Ihandle* ih, int children) return; if (ih->handle && ih->iclass->nativetype != IUP_TYPEVOID) - iupdrvDisplayRedraw(ih); + iupdrvRedrawNow(ih); if (children) iLayoutDisplayRedrawChildren(ih); @@ -136,7 +136,7 @@ void iupLayoutCompute(Ihandle* ih) iupBaseSetPosition(ih, 0, 0); } -static void iLayoutSetMinMaxSize(Ihandle* ih, int *w, int *h) +void iupLayoutSetMinMaxSize(Ihandle* ih, int *w, int *h) { if (ih->has_minsize) { @@ -163,7 +163,8 @@ void iupBaseComputeNaturalSize(Ihandle* ih) ih->naturalwidth = ih->userwidth; ih->naturalheight = ih->userheight; - if (ih->iclass->childtype!=IUP_CHILDNONE || ih->iclass->nativetype == IUP_TYPEDIALOG) + if (ih->iclass->childtype!=IUP_CHILDNONE || + ih->iclass->nativetype == IUP_TYPEDIALOG) /* pre-defined dialogs can restrict the number of children */ { int w=0, h=0, children_expand; @@ -190,7 +191,7 @@ void iupBaseComputeNaturalSize(Ihandle* ih) ih->naturalheight = iupMAX(ih->naturalheight, h); /* crop the natural size */ - iLayoutSetMinMaxSize(ih, &(ih->naturalwidth), &(ih->naturalheight)); + iupLayoutSetMinMaxSize(ih, &(ih->naturalwidth), &(ih->naturalheight)); } } else @@ -198,15 +199,15 @@ void iupBaseComputeNaturalSize(Ihandle* ih) /* for non-container only compute if user size is not defined */ if (ih->naturalwidth <= 0 || ih->naturalheight <= 0) { - int w=0, h=0; - iupClassObjectComputeNaturalSize(ih, &w, &h, NULL); + int w=0, h=0, children_expand; + iupClassObjectComputeNaturalSize(ih, &w, &h, &children_expand); if (ih->naturalwidth <= 0) ih->naturalwidth = w; if (ih->naturalheight <= 0) ih->naturalheight = h; } /* crop the natural size */ - iLayoutSetMinMaxSize(ih, &(ih->naturalwidth), &(ih->naturalheight)); + iupLayoutSetMinMaxSize(ih, &(ih->naturalwidth), &(ih->naturalheight)); } } @@ -259,7 +260,7 @@ void iupBaseSetCurrentSize(Ihandle* ih, int w, int h, int shrink) /* crop the current size if expanded */ if (ih->expand & IUP_EXPAND_WIDTH || ih->expand & IUP_EXPAND_HEIGHT) - iLayoutSetMinMaxSize(ih, &(ih->currentwidth), &(ih->currentheight)); + iupLayoutSetMinMaxSize(ih, &(ih->currentwidth), &(ih->currentheight)); } } |