From ec7f461af1569e18b99422c1d1e232574718cfe8 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 29 Apr 2015 10:28:17 -0400 Subject: [PATCH] Merged back the basic controls on Mac OS X. --- new/darwin/GNUmakeinc.mk | 4 ++++ {darwin => new/darwin}/button.m | 2 +- {darwin => new/darwin}/checkbox.m | 2 +- {darwin => new/darwin}/entry.m | 2 +- {darwin => new/darwin}/label.m | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) rename {darwin => new/darwin}/button.m (97%) rename {darwin => new/darwin}/checkbox.m (97%) rename {darwin => new/darwin}/entry.m (95%) rename {darwin => new/darwin}/label.m (93%) diff --git a/new/darwin/GNUmakeinc.mk b/new/darwin/GNUmakeinc.mk index 06610975..26ca3ba3 100644 --- a/new/darwin/GNUmakeinc.mk +++ b/new/darwin/GNUmakeinc.mk @@ -3,8 +3,12 @@ osMFILES = \ darwin/alloc.m \ darwin/bin.m \ + darwin/button.m \ + darwin/checkbox.m \ darwin/container.m \ + darwin/entry.m \ darwin/init.m \ + darwin/label.m \ darwin/main.m \ darwin/menu.m \ darwin/newcontrol.m \ diff --git a/darwin/button.m b/new/darwin/button.m similarity index 97% rename from darwin/button.m rename to new/darwin/button.m index 2d742458..7ec5f6ac 100644 --- a/darwin/button.m +++ b/new/darwin/button.m @@ -82,7 +82,7 @@ uiButton *uiNewButton(const char *text) uiDarwinNewControl(uiControl(b), [NSButton class], NO, NO, destroy, b); - b->button = (NSButton *) VIEW(b); + b->button = (NSButton *) uiControlHandle(uiControl(b)); [b->button setTitle:toNSString(text)]; [b->button setButtonType:NSMomentaryPushInButton]; diff --git a/darwin/checkbox.m b/new/darwin/checkbox.m similarity index 97% rename from darwin/checkbox.m rename to new/darwin/checkbox.m index f1e4195f..94927cb8 100644 --- a/darwin/checkbox.m +++ b/new/darwin/checkbox.m @@ -100,7 +100,7 @@ uiCheckbox *uiNewCheckbox(const char *text) uiDarwinNewControl(uiControl(c), [NSButton class], NO, NO, destroy, c); - c->checkbox = (NSButton *) VIEW(c); + c->checkbox = (NSButton *) uiControlHandle(uiControl(c)); [c->checkbox setTitle:toNSString(text)]; [c->checkbox setButtonType:NSSwitchButton]; diff --git a/darwin/entry.m b/new/darwin/entry.m similarity index 95% rename from darwin/entry.m rename to new/darwin/entry.m index 59fede13..f42d043f 100644 --- a/darwin/entry.m +++ b/new/darwin/entry.m @@ -51,7 +51,7 @@ uiEntry *uiNewEntry(void) uiDarwinNewControl(uiControl(e), [NSTextField class], NO, NO, destroy, e); - e->textfield = (NSTextField *) VIEW(e); + e->textfield = (NSTextField *) uiControlHandle(uiControl(e)); [e->textfield setSelectable:YES]; // otherwise the setting is masked by the editable default of YES finishNewTextField(e->textfield, YES); diff --git a/darwin/label.m b/new/darwin/label.m similarity index 93% rename from darwin/label.m rename to new/darwin/label.m index c8768bfc..0b3cfc28 100644 --- a/darwin/label.m +++ b/new/darwin/label.m @@ -35,7 +35,7 @@ uiLabel *uiNewLabel(const char *text) uiDarwinNewControl(uiControl(l), [NSTextField class], NO, NO, destroy, l); - l->label = (NSTextField *) VIEW(l); + l->label = (NSTextField *) uiControlHandle(uiControl(l)); [l->label setStringValue:toNSString(text)]; [l->label setEditable:NO];