Added uiWindowMargined() and implemented it on all platforms.
This commit is contained in:
parent
5c2ead2fea
commit
759feeb7a1
|
@ -59,7 +59,10 @@ uiLogObjCClassAllocations
|
|||
uiControlResize(self.child, x, y, width, height, &d);
|
||||
}
|
||||
|
||||
// TODO margined
|
||||
- (BOOL)uiMargined
|
||||
{
|
||||
return self->uimargined;
|
||||
}
|
||||
|
||||
- (void)uiSetMargined:(BOOL)margined
|
||||
{
|
||||
|
|
3
test.c
3
test.c
|
@ -102,7 +102,8 @@ static void showSpaced(uiControl *c, void *data)
|
|||
{
|
||||
char msg[] = { 'm', ' ', '0', ' ', 'p', ' ', '0', '\0' };
|
||||
|
||||
// TODO margined
|
||||
if (uiWindowMargined(w))
|
||||
msg[2] = '1';
|
||||
if (uiStackPadded(stacks[0]))
|
||||
msg[6] = '1';
|
||||
uiEntrySetText(e, msg);
|
||||
|
|
2
ui.h
2
ui.h
|
@ -53,7 +53,7 @@ void uiWindowShow(uiWindow *);
|
|||
void uiWindowHide(uiWindow *);
|
||||
void uiWindowOnClosing(uiWindow *, int (*)(uiWindow *, void *), void *);
|
||||
void uiWindowSetChild(uiWindow *, uiControl *);
|
||||
// TODO uiWindowMargined()
|
||||
int uiWindowMargined(uiWindow *);
|
||||
void uiWindowSetMargined(uiWindow *, int);
|
||||
|
||||
uiControl *uiNewButton(const char *);
|
||||
|
|
|
@ -36,5 +36,6 @@ extern void setStandardControlFont(NSControl *);
|
|||
// TODO rename to uiChild
|
||||
@property uiControl *child;
|
||||
- (void)uiUpdateNow;
|
||||
- (BOOL)uiMargined;
|
||||
- (void)uiSetMargined:(BOOL)margined;
|
||||
@end
|
||||
|
|
|
@ -111,7 +111,12 @@ void uiWindowSetChild(uiWindow *w, uiControl *c)
|
|||
uiControlSetParent(D.container.child, (uintptr_t) (D.container));
|
||||
}
|
||||
|
||||
// TODO margined
|
||||
int uiWindowMargined(uiWindow *w)
|
||||
{
|
||||
if ([D.container uiMargined])
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void uiWindowSetMargined(uiWindow *w, int margined)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,10 @@ void uiWindowSetChild(uiWindow *w, uiControl *c)
|
|||
uiControlSetParent(uiContainer(w->container)->child, (uintptr_t) (w->container));
|
||||
}
|
||||
|
||||
// TODO margined
|
||||
int uiWindowMargined(uiWindow *w)
|
||||
{
|
||||
return uiContainer(w->container)->margined;
|
||||
}
|
||||
|
||||
void uiWindowSetMargined(uiWindow *w, int margined)
|
||||
{
|
||||
|
|
|
@ -180,7 +180,10 @@ void uiWindowSetChild(uiWindow *w, uiControl *c)
|
|||
uiControlSetParent(w->child, (uintptr_t) (w->hwnd));
|
||||
}
|
||||
|
||||
// TODO uiWindowMargined
|
||||
int uiWindowMargined(uiWindow *w)
|
||||
{
|
||||
return w->margined;
|
||||
}
|
||||
|
||||
void uiWindowSetMargined(uiWindow *w, int margined)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue