Merged back the basic controls on Mac OS X.
This commit is contained in:
parent
3249092061
commit
ec7f461af1
|
@ -3,8 +3,12 @@
|
||||||
osMFILES = \
|
osMFILES = \
|
||||||
darwin/alloc.m \
|
darwin/alloc.m \
|
||||||
darwin/bin.m \
|
darwin/bin.m \
|
||||||
|
darwin/button.m \
|
||||||
|
darwin/checkbox.m \
|
||||||
darwin/container.m \
|
darwin/container.m \
|
||||||
|
darwin/entry.m \
|
||||||
darwin/init.m \
|
darwin/init.m \
|
||||||
|
darwin/label.m \
|
||||||
darwin/main.m \
|
darwin/main.m \
|
||||||
darwin/menu.m \
|
darwin/menu.m \
|
||||||
darwin/newcontrol.m \
|
darwin/newcontrol.m \
|
||||||
|
|
|
@ -82,7 +82,7 @@ uiButton *uiNewButton(const char *text)
|
||||||
|
|
||||||
uiDarwinNewControl(uiControl(b), [NSButton class], NO, NO, destroy, b);
|
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 setTitle:toNSString(text)];
|
||||||
[b->button setButtonType:NSMomentaryPushInButton];
|
[b->button setButtonType:NSMomentaryPushInButton];
|
|
@ -100,7 +100,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
|
||||||
|
|
||||||
uiDarwinNewControl(uiControl(c), [NSButton class], NO, NO, destroy, c);
|
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 setTitle:toNSString(text)];
|
||||||
[c->checkbox setButtonType:NSSwitchButton];
|
[c->checkbox setButtonType:NSSwitchButton];
|
|
@ -51,7 +51,7 @@ uiEntry *uiNewEntry(void)
|
||||||
|
|
||||||
uiDarwinNewControl(uiControl(e), [NSTextField class], NO, NO, destroy, e);
|
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
|
[e->textfield setSelectable:YES]; // otherwise the setting is masked by the editable default of YES
|
||||||
finishNewTextField(e->textfield, YES);
|
finishNewTextField(e->textfield, YES);
|
|
@ -35,7 +35,7 @@ uiLabel *uiNewLabel(const char *text)
|
||||||
|
|
||||||
uiDarwinNewControl(uiControl(l), [NSTextField class], NO, NO, destroy, l);
|
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 setStringValue:toNSString(text)];
|
||||||
[l->label setEditable:NO];
|
[l->label setEditable:NO];
|
Loading…
Reference in New Issue