Made the necessary previous commits changes on the Mac OS X backend. Untested yet.
This commit is contained in:
parent
025b9f576b
commit
fff86431e3
|
@ -32,22 +32,19 @@ static void singleSetParent(uiControl *c, uiParent *parent)
|
||||||
{
|
{
|
||||||
singleView *s = (singleView *) (c->internal);
|
singleView *s = (singleView *) (c->internal);
|
||||||
NSView *parentView;
|
NSView *parentView;
|
||||||
|
|
||||||
s->parent = parent;
|
|
||||||
parentView = (NSView *) uiParentHandle(s->parent);
|
|
||||||
[parentView addSubview:s->immediate];
|
|
||||||
uiParentUpdate(s->parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void singleRemoveParent(uiControl *c)
|
|
||||||
{
|
|
||||||
singleView *s = (singleView *) (c->internal);
|
|
||||||
uiParent *oldparent;
|
uiParent *oldparent;
|
||||||
|
|
||||||
oldparent = s->parent;
|
oldparent = s->parent;
|
||||||
s->parent = NULL;
|
s->parent = parent;
|
||||||
[s->immediate removeFromSuperview];
|
if (oldparent != NULL) {
|
||||||
uiParentUpdate(oldparent);
|
[s->immediate removeFromSuperview];
|
||||||
|
uiParentUpdate(oldparent);
|
||||||
|
}
|
||||||
|
if (s->parent != NULL) {
|
||||||
|
parentView = (NSView *) uiParentHandle(s->parent);
|
||||||
|
[parentView addSubview:s->immediate];
|
||||||
|
uiParentUpdate(s->parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// also good for NSBox and NSProgressIndicator
|
// also good for NSBox and NSProgressIndicator
|
||||||
|
@ -209,7 +206,6 @@ uiControl *uiDarwinNewControl(Class class, BOOL inScrollView, BOOL scrollViewHas
|
||||||
c->destroy = singleDestroy;
|
c->destroy = singleDestroy;
|
||||||
c->handle = singleHandle;
|
c->handle = singleHandle;
|
||||||
c->setParent = singleSetParent;
|
c->setParent = singleSetParent;
|
||||||
c->removeParent = singleRemoveParent;
|
|
||||||
c->preferredSize = singlePreferredSize;
|
c->preferredSize = singlePreferredSize;
|
||||||
c->resize = singleResize;
|
c->resize = singleResize;
|
||||||
c->visible = singleVisible;
|
c->visible = singleVisible;
|
||||||
|
|
Loading…
Reference in New Issue