Adds uiGridDelete for windows

This commit is contained in:
emersion 2016-06-17 22:32:31 +02:00
parent 65f078102a
commit 8ae27ee3be
1 changed files with 13 additions and 0 deletions

View File

@ -627,6 +627,19 @@ void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt at, int x
add(g, gc); add(g, gc);
} }
void uiGridDelete(uiGrid *g, int index)
{
uiControl *c;
c = (*(g->children))[index]->c;
uiControlSetParent(c, NULL);
uiWindowsControlSetParentHWND(uiWindowsControl(c), NULL);
g->children->erase(g->children->begin() + index);
gridRecomputeMinMax(g);
gridArrangeChildren(g);
uiWindowsControlMinimumSizeChanged(uiWindowsControl(g));
}
int uiGridPadded(uiGrid *g) int uiGridPadded(uiGrid *g)
{ {
return g->padded; return g->padded;