gwinRedrawChildren()

This commit is contained in:
Joel Bodenmann 2014-01-06 21:43:25 +01:00
parent 6aa34e4fdc
commit b479a10383
2 changed files with 18 additions and 0 deletions

View File

@ -409,6 +409,18 @@ extern "C" {
*/ */
void gwinRemoveChild(GHandle child); void gwinRemoveChild(GHandle child);
/**
* @brief Redraw only the children of a parent but not the parent itself
*
* @details This routine does exactly the same as @p gwinRedraw() but does not
* issue a redraw of the passed widget but only of it's children.
*
* @param[in] gh The widget
*
* @api
*/
void gwinRedrawChildren(GHandle gh);
/** /**
* @brief Get first child of a widget * @brief Get first child of a widget
* *

View File

@ -363,6 +363,12 @@ void gwinRedraw(GHandle gh) {
} }
} }
void gwinRedrawChildren(GHandle gh) {
GHandle tmp;
for (tmp = gh->child; tmp; tmp = tmp->sibling)
gwinRedraw(tmp);
}
GHandle gwinGetFirstChild(GHandle gh) { GHandle gwinGetFirstChild(GHandle gh) {
return gh->child; return gh->child;
} }