void uiWindowSetChild(uiWindow *w, uiControl *child) { if (w->child != NULL) { uiControlSetParent(w->child, NULL); uiWindowsControlSetParentHWND(uiWindowsControl(w->child), NULL); } w->child = child; if (w->child != NULL) { uiControlSetParent(w->child, uiControl(w)); uiWindowsControlSetParentHWND(uiWindowsControl(w->child), w->hwnd); uiWindowsControlAssignSoleControlIDZOrder(uiWindowsControl(w->child)); windowRelayout(w); } }
void uiGroupSetChild(uiGroup *g, uiControl *child) { if (g->child != NULL) { uiControlSetParent(g->child, NULL); uiWindowsControlSetParentHWND(uiWindowsControl(g->child), NULL); } g->child = child; if (g->child != NULL) { uiControlSetParent(g->child, uiControl(g)); uiWindowsControlSetParentHWND(uiWindowsControl(g->child), g->hwnd); uiWindowsControlAssignSoleControlIDZOrder(uiWindowsControl(g->child)); uiWindowsControlMinimumSizeChanged(uiWindowsControl(g)); } }