summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--new/container_darwin.m5
-rw-r--r--new/test.c3
-rw-r--r--new/ui.h2
-rw-r--r--new/uipriv_darwin.h1
-rw-r--r--new/window_darwin.m7
-rw-r--r--new/window_unix.c5
-rw-r--r--new/window_windows.c5
7 files changed, 22 insertions, 6 deletions
diff --git a/new/container_darwin.m b/new/container_darwin.m
index 51cd1e7..8b2899c 100644
--- a/new/container_darwin.m
+++ b/new/container_darwin.m
@@ -59,7 +59,10 @@ uiLogObjCClassAllocations
uiControlResize(self.child, x, y, width, height, &d);
}
-// TODO margined
+- (BOOL)uiMargined
+{
+ return self->uimargined;
+}
- (void)uiSetMargined:(BOOL)margined
{
diff --git a/new/test.c b/new/test.c
index 6d43afb..e63ed89 100644
--- a/new/test.c
+++ b/new/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);
diff --git a/new/ui.h b/new/ui.h
index 5a4ed3f..9bf8601 100644
--- a/new/ui.h
+++ b/new/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 *);
diff --git a/new/uipriv_darwin.h b/new/uipriv_darwin.h
index ced12fc..0aa348d 100644
--- a/new/uipriv_darwin.h
+++ b/new/uipriv_darwin.h
@@ -36,5 +36,6 @@ extern void setStandardControlFont(NSControl *);
// TODO rename to uiChild
@property uiControl *child;
- (void)uiUpdateNow;
+- (BOOL)uiMargined;
- (void)uiSetMargined:(BOOL)margined;
@end
diff --git a/new/window_darwin.m b/new/window_darwin.m
index 0b8f1c3..2822a35 100644
--- a/new/window_darwin.m
+++ b/new/window_darwin.m
@@ -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)
{
diff --git a/new/window_unix.c b/new/window_unix.c
index 9a614af..ba9b7ef 100644
--- a/new/window_unix.c
+++ b/new/window_unix.c
@@ -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)
{
diff --git a/new/window_windows.c b/new/window_windows.c
index c3cd93d..cb0bffb 100644
--- a/new/window_windows.c
+++ b/new/window_windows.c
@@ -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)
{