Merged back the basic controls on Mac OS X.

This commit is contained in:
Pietro Gagliardi 2015-04-29 10:28:17 -04:00
parent 3249092061
commit ec7f461af1
5 changed files with 8 additions and 4 deletions

View File

@ -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 \

View File

@ -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];

View File

@ -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];

View File

@ -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);

View File

@ -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];