Added a dummy implementation of uiSpinbox on OS X.

This commit is contained in:
Pietro Gagliardi 2015-07-28 14:56:50 -04:00
parent 87e4245e34
commit 7e25241045
1 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@
struct spinbox {
uiSpinbox s;
OSTYPE *OSHANDLE;
NSTextField *dummy;
void (*onChanged)(uiSpinbox *, void *);
void *onChangedData;
};
@ -14,7 +14,7 @@ static uintptr_t spinboxHandle(uiControl *c)
{
struct spinbox *s = (struct spinbox *) c;
return PUT_CODE_HERE;
return (uintptr_t) (s->dummy);
}
static void defaultOnChanged(uiSpinbox *s, void *data)
@ -51,9 +51,11 @@ uiSpinbox *uiNewSpinbox(intmax_t min, intmax_t max)
if (min >= max)
complain("error: min >= max in uiNewSpinbox()");
s = (struct spinbox *) MAKE_CONTROL_INSTANCE(uiTypeSpinbox());
s = (struct spinbox *) uiNewControl(uiTypeSpinbox());
PUT_CODE_HERE;
s->dummy = [[NSTextField alloc] initWithFrame:NSZeroRect];
[s->dummy setStringValue:@"TODO uiSpinbox not implemented"];
uiDarwinMakeSingleViewControl(uiControl(s), s->dummy, YES);
s->onChanged = defaultOnChanged;