2015-07-11 15:56:37 -05:00
|
|
|
// 11 june 2015
|
2015-07-11 16:02:01 -05:00
|
|
|
#include "uipriv_darwin.h"
|
2015-07-11 15:56:37 -05:00
|
|
|
|
2015-07-27 22:38:44 -05:00
|
|
|
// TODO sizing
|
|
|
|
|
2015-07-11 15:56:37 -05:00
|
|
|
struct separator {
|
|
|
|
uiSeparator s;
|
2015-07-27 22:38:44 -05:00
|
|
|
NSBox *box;
|
2015-07-11 15:56:37 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
uiDefineControlType(uiSeparator, uiTypeSeparator, struct separator)
|
|
|
|
|
|
|
|
static uintptr_t separatorHandle(uiControl *c)
|
|
|
|
{
|
|
|
|
struct separator *s = (struct separator *) c;
|
|
|
|
|
2015-07-27 22:38:44 -05:00
|
|
|
return (uintptr_t) (s->box);
|
2015-07-11 15:56:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
uiSeparator *uiNewHorizontalSeparator(void)
|
|
|
|
{
|
|
|
|
struct separator *s;
|
|
|
|
|
|
|
|
s = (struct separator *) MAKE_CONTROL_INSTANCE(uiTypeSeparator());
|
|
|
|
|
2015-07-27 22:38:44 -05:00
|
|
|
s->box = [[NSBox alloc] initWithFrame:NSZeroRect];
|
|
|
|
[s->box setBoxType:NSBoxSeparator];
|
|
|
|
[s->box setBorderType:TODO];
|
|
|
|
[s->box setTransparent:NO];
|
|
|
|
[s->box setTitlePosition:NSNoTitle];
|
|
|
|
|
|
|
|
uiDarwinMakeSingleViewControl(uiControl(s), s->box, NO);
|
2015-07-11 15:56:37 -05:00
|
|
|
|
|
|
|
uiControl(s)->Handle = separatorHandle;
|
|
|
|
|
|
|
|
return uiSeparator(s);
|
|
|
|
}
|