2015-08-14 22:50:38 -05:00
|
|
|
// 14 august 2015
|
|
|
|
#import "uipriv_darwin.h"
|
|
|
|
|
2015-08-22 11:16:27 -05:00
|
|
|
// 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 */
|
2015-08-14 22:50:38 -05:00
|
|
|
|
|
|
|
struct uiSeparator {
|
|
|
|
uiDarwinControl c;
|
|
|
|
NSBox *box;
|
|
|
|
};
|
|
|
|
|
2016-04-25 10:54:09 -05:00
|
|
|
uiDarwinControlAllDefaults(uiSeparator, box)
|
2015-08-14 22:50:38 -05:00
|
|
|
|
|
|
|
uiSeparator *uiNewHorizontalSeparator(void)
|
|
|
|
{
|
|
|
|
uiSeparator *s;
|
|
|
|
|
2016-04-25 10:54:09 -05:00
|
|
|
uiDarwinNewControl(uiSeparator);
|
2015-08-14 22:50:38 -05:00
|
|
|
|
2015-08-22 11:16:27 -05:00
|
|
|
s->box = [[NSBox alloc] initWithFrame:NSMakeRect(0, 0, separatorFrameWidth, separatorFrameHeight)];
|
2015-08-14 22:50:38 -05:00
|
|
|
[s->box setBoxType:NSBoxSeparator];
|
2015-08-22 11:16:27 -05:00
|
|
|
[s->box setBorderType:NSGrooveBorder];
|
2015-08-14 22:50:38 -05:00
|
|
|
[s->box setTransparent:NO];
|
|
|
|
[s->box setTitlePosition:NSNoTitle];
|
|
|
|
|
|
|
|
return s;
|
|
|
|
}
|