mirror of
https://github.com/libretro/RetroArch
synced 2025-01-16 16:29:28 +00:00
43 lines
1.0 KiB
Mathematica
43 lines
1.0 KiB
Mathematica
|
// 14 august 2015
|
||
|
#import "uipriv_darwin.h"
|
||
|
|
||
|
struct uiDateTimePicker {
|
||
|
uiDarwinControl c;
|
||
|
NSDatePicker *dp;
|
||
|
};
|
||
|
|
||
|
uiDarwinControlAllDefaults(uiDateTimePicker, dp)
|
||
|
|
||
|
static uiDateTimePicker *finishNewDateTimePicker(NSDatePickerElementFlags elements)
|
||
|
{
|
||
|
uiDateTimePicker *d;
|
||
|
|
||
|
uiDarwinNewControl(uiDateTimePicker, d);
|
||
|
|
||
|
d->dp = [[NSDatePicker alloc] initWithFrame:NSZeroRect];
|
||
|
[d->dp setBordered:NO];
|
||
|
[d->dp setBezeled:YES];
|
||
|
[d->dp setDrawsBackground:YES];
|
||
|
[d->dp setDatePickerStyle:NSTextFieldAndStepperDatePickerStyle];
|
||
|
[d->dp setDatePickerElements:elements];
|
||
|
[d->dp setDatePickerMode:NSSingleDateMode];
|
||
|
uiDarwinSetControlFont(d->dp, NSRegularControlSize);
|
||
|
|
||
|
return d;
|
||
|
}
|
||
|
|
||
|
uiDateTimePicker *uiNewDateTimePicker(void)
|
||
|
{
|
||
|
return finishNewDateTimePicker(NSYearMonthDayDatePickerElementFlag | NSHourMinuteSecondDatePickerElementFlag);
|
||
|
}
|
||
|
|
||
|
uiDateTimePicker *uiNewDatePicker(void)
|
||
|
{
|
||
|
return finishNewDateTimePicker(NSYearMonthDayDatePickerElementFlag);
|
||
|
}
|
||
|
|
||
|
uiDateTimePicker *uiNewTimePicker(void)
|
||
|
{
|
||
|
return finishNewDateTimePicker(NSHourMinuteSecondDatePickerElementFlag);
|
||
|
}
|