Even more TODO resolution and control completion.
This commit is contained in:
parent
50bab453e6
commit
b7db41d7e8
|
@ -17,7 +17,10 @@ uiDarwinDefineControl(
|
|||
|
||||
void uiComboboxAppend(uiCombobox *c, const char *text)
|
||||
{
|
||||
// TODO
|
||||
if (c->editable)
|
||||
[c->cb addItemWithObjectValue:toNSString(text)];
|
||||
else
|
||||
[c->pb addItemWithTitle:toNSString(text)];
|
||||
}
|
||||
|
||||
static uiCombobox *finishNewCombobox(BOOL editable)
|
||||
|
@ -35,9 +38,12 @@ static uiCombobox *finishNewCombobox(BOOL editable)
|
|||
uiDarwinSetControlFont(c->cb, NSRegularControlSize);
|
||||
c->handle = c->cb;
|
||||
} else {
|
||||
NSPopUpButtonCell *pbcell;
|
||||
|
||||
c->pb = [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:NO];
|
||||
// TODO preferred edge
|
||||
// TODO arrow position
|
||||
[c->pb setPreferredEdge:NSMinYEdge];
|
||||
pbcell = (NSPopUpButtonCell *) [c->pb cell];
|
||||
[pbcell setArrowPosition:NSPopUpArrowAtBottom];
|
||||
// TODO font
|
||||
c->handle = c->pb;
|
||||
}
|
||||
|
|
|
@ -19,11 +19,13 @@ static uiDateTimePicker *finishNewDateTimePicker(NSDatePickerElementFlags elemen
|
|||
d = (uiDateTimePicker *) uiNewControl(uiDateTimePickerType());
|
||||
|
||||
d->dp = [[NSDatePicker alloc] initWithFrame:NSZeroRect];
|
||||
// TODO text field stuff
|
||||
[d->dp setBordered:NO];
|
||||
[d->dp setBezeled:YES];
|
||||
[d->dp setDrawsBackground:YES];
|
||||
[d->dp setDatePickerStyle:NSTextFieldAndStepperDatePickerStyle];
|
||||
[d->dp setDatePickerElements:elements];
|
||||
[d->dp setDatePickerMode:NSSingleDateMode];
|
||||
// TODO get date picker font
|
||||
uiDarwinSetControlFont(d->dp, NSRegularControlSize);
|
||||
|
||||
uiDarwinFinishNewControl(d, uiDateTimePicker);
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
// 14 august 2015
|
||||
#import "uipriv_darwin.h"
|
||||
|
||||
// TODO sizing
|
||||
// namely, figure out how horizontal and vertical work
|
||||
// A separator NSBox is horizontal if width >= height.
|
||||
// Use Interface Builder's initial size as our initial size, to be safe.
|
||||
#define separatorFrameWidth 96 /* alignment rect 96 */
|
||||
#define separatorFrameHeight 5 /* alignment rect 1 */
|
||||
|
||||
struct uiSeparator {
|
||||
uiDarwinControl c;
|
||||
|
@ -21,9 +23,9 @@ uiSeparator *uiNewHorizontalSeparator(void)
|
|||
|
||||
s = (uiSeparator *) uiNewControl(uiSeparatorType());
|
||||
|
||||
s->box = [[NSBox alloc] initWithFrame:NSZeroRect];
|
||||
s->box = [[NSBox alloc] initWithFrame:NSMakeRect(0, 0, separatorFrameWidth, separatorFrameHeight)];
|
||||
[s->box setBoxType:NSBoxSeparator];
|
||||
//TODO [s->box setBorderType:TODO];
|
||||
[s->box setBorderType:NSGrooveBorder];
|
||||
[s->box setTransparent:NO];
|
||||
[s->box setTitlePosition:NSNoTitle];
|
||||
|
||||
|
|
Loading…
Reference in New Issue