Fixed some compiler errors.
This commit is contained in:
parent
da73d003ba
commit
87e4245e34
|
@ -80,7 +80,7 @@ uiButton *uiNewButton(const char *text)
|
||||||
|
|
||||||
b = (struct button *) uiNewControl(uiTypeButton());
|
b = (struct button *) uiNewControl(uiTypeButton());
|
||||||
|
|
||||||
b->button = [[NSButton alloc] initWithFrame:NSZeroFrame];
|
b->button = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||||
[b->button setTitle:toNSString(text)];
|
[b->button setTitle:toNSString(text)];
|
||||||
[b->button setButtonType:NSMomentaryPushInButton];
|
[b->button setButtonType:NSMomentaryPushInButton];
|
||||||
[b->button setBordered:YES];
|
[b->button setBordered:YES];
|
||||||
|
|
|
@ -97,7 +97,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
|
||||||
c = (struct checkbox *) uiNewControl(uiTypeCheckbox());
|
c = (struct checkbox *) uiNewControl(uiTypeCheckbox());
|
||||||
|
|
||||||
// TODO make a macro for the below
|
// TODO make a macro for the below
|
||||||
c->checkbox = [[NSCheckbox alloc] initWithFrame:NSZeroRect];
|
c->checkbox = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||||
[c->checkbox setTitle:toNSString(text)];
|
[c->checkbox setTitle:toNSString(text)];
|
||||||
[c->checkbox setButtonType:NSSwitchButton];
|
[c->checkbox setButtonType:NSSwitchButton];
|
||||||
[c->checkbox setBordered:NO];
|
[c->checkbox setBordered:NO];
|
||||||
|
|
|
@ -37,10 +37,10 @@ static uiCombobox *finishNewCombobox(BOOL editable)
|
||||||
c->cb = [[NSComboBox alloc] initWithFrame:NSZeroRect];
|
c->cb = [[NSComboBox alloc] initWithFrame:NSZeroRect];
|
||||||
[c->cb setUsesDataSource:NO];
|
[c->cb setUsesDataSource:NO];
|
||||||
[c->cb setButtonBordered:YES];
|
[c->cb setButtonBordered:YES];
|
||||||
NSLog(@"TEST intercellSpacing %@", NSStringFromSize([c->cb intercellSpacing]);
|
NSLog(@"TEST intercellSpacing %@", NSStringFromSize([c->cb intercellSpacing]));
|
||||||
[c->cb setCompletes:NO];
|
[c->cb setCompletes:NO];
|
||||||
uiDarwinMakeSingleViewControl(uiControl(c), c->cb, YES);
|
uiDarwinMakeSingleViewControl(uiControl(c), c->cb, YES);
|
||||||
NSLog(@"TEST intercellSpacing %@", NSStringFromSize([c->cb intercellSpacing]);
|
NSLog(@"TEST intercellSpacing %@", NSStringFromSize([c->cb intercellSpacing]));
|
||||||
} else {
|
} else {
|
||||||
c->pb = [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:NO];
|
c->pb = [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:NO];
|
||||||
// TODO preferred edge
|
// TODO preferred edge
|
||||||
|
|
|
@ -123,8 +123,6 @@ uiEntry *uiNewEntry(void)
|
||||||
[e->delegate setEntry:uiEntry(e)];
|
[e->delegate setEntry:uiEntry(e)];
|
||||||
[e->delegate setOnChanged:defaultOnChanged data:NULL];
|
[e->delegate setOnChanged:defaultOnChanged data:NULL];
|
||||||
|
|
||||||
e->onChanged = defaultOnChanged;
|
|
||||||
|
|
||||||
uiControl(e)->Handle = entryHandle;
|
uiControl(e)->Handle = entryHandle;
|
||||||
|
|
||||||
uiEntry(e)->Text = entryText;
|
uiEntry(e)->Text = entryText;
|
||||||
|
|
|
@ -73,11 +73,11 @@ uiGroup *uiNewGroup(const char *text)
|
||||||
{
|
{
|
||||||
struct group *g;
|
struct group *g;
|
||||||
|
|
||||||
g = (struct group *) MAKE_CONTROL_INSTANCE(uiTypeGroup());
|
g = (struct group *) uiNewControl(uiTypeGroup());
|
||||||
|
|
||||||
g->box = [[NSBox alloc] initWithFrame:NSZeroRect];
|
g->box = [[NSBox alloc] initWithFrame:NSZeroRect];
|
||||||
[g->box setBoxType:NSBoxPrimary];
|
[g->box setBoxType:NSBoxPrimary];
|
||||||
[g->box setBorderType:TODO];
|
//TODO [g->box setBorderType:TODO];
|
||||||
[g->box setTransparent:NO];
|
[g->box setTransparent:NO];
|
||||||
[g->box setTitlePosition:NSAtTop];
|
[g->box setTitlePosition:NSAtTop];
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,15 @@ uiProgressBar *uiNewProgressBar(void)
|
||||||
{
|
{
|
||||||
struct progressbar *p;
|
struct progressbar *p;
|
||||||
|
|
||||||
p = (struct progressbar *) MAKE_CONTROL_INSTANCE(uiTypeProgressBar());
|
p = (struct progressbar *) uiNewControl(uiTypeProgressBar());
|
||||||
|
|
||||||
p->pi = [[NSProgressIndicator alloc] initWithFrame:NSZeroRect];
|
p->pi = [[NSProgressIndicator alloc] initWithFrame:NSZeroRect];
|
||||||
NSLog(@"TEST thread %d tint %d stopped %d", (int) [p->pi usesThreadedAnimation], [p->pi controlTint], (int) [p->pi displayedWhenStopped]);
|
NSLog(@"TEST thread %d tint %d stopped %d", (int) [p->pi usesThreadedAnimation], [p->pi controlTint], (int) [p->pi isDisplayedWhenStopped]);
|
||||||
[p->pi setControlSize:NSRegularControlSize];
|
[p->pi setControlSize:NSRegularControlSize];
|
||||||
[p->pi setBezeled:YES];
|
[p->pi setBezeled:YES];
|
||||||
[p->pi setStyle:NSProgressIndicatorBarStyle];
|
[p->pi setStyle:NSProgressIndicatorBarStyle];
|
||||||
[p->pi setIndeterminate:NO];
|
[p->pi setIndeterminate:NO];
|
||||||
NSLog(@"TEST thread %d tint %d stopped %d", (int) [p->pi usesThreadedAnimation], [p->pi controlTint], (int) [p->pi displayedWhenStopped]);
|
NSLog(@"TEST thread %d tint %d stopped %d", (int) [p->pi usesThreadedAnimation], [p->pi controlTint], (int) [p->pi isDisplayedWhenStopped]);
|
||||||
uiDarwinMakeSingleViewControl(uiControl(p), p->pi, NO);
|
uiDarwinMakeSingleViewControl(uiControl(p), p->pi, NO);
|
||||||
|
|
||||||
uiControl(p)->Handle = progressbarHandle;
|
uiControl(p)->Handle = progressbarHandle;
|
||||||
|
|
|
@ -21,11 +21,11 @@ uiSeparator *uiNewHorizontalSeparator(void)
|
||||||
{
|
{
|
||||||
struct separator *s;
|
struct separator *s;
|
||||||
|
|
||||||
s = (struct separator *) MAKE_CONTROL_INSTANCE(uiTypeSeparator());
|
s = (struct separator *) uiNewControl(uiTypeSeparator());
|
||||||
|
|
||||||
s->box = [[NSBox alloc] initWithFrame:NSZeroRect];
|
s->box = [[NSBox alloc] initWithFrame:NSZeroRect];
|
||||||
[s->box setBoxType:NSBoxSeparator];
|
[s->box setBoxType:NSBoxSeparator];
|
||||||
[s->box setBorderType:TODO];
|
//TODO [s->box setBorderType:TODO];
|
||||||
[s->box setTransparent:NO];
|
[s->box setTransparent:NO];
|
||||||
[s->box setTitlePosition:NSNoTitle];
|
[s->box setTitlePosition:NSNoTitle];
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7
|
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7
|
||||||
#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7
|
#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import "../ui.h"
|
#import "../out/ui.h"
|
||||||
#import "../ui_darwin.h"
|
#import "../ui_darwin.h"
|
||||||
#import "../uipriv.h"
|
#import "../uipriv.h"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ This file assumes that you have imported <Cocoa/Cocoa.h> and "ui.h" beforehand.
|
||||||
#define __UI_UI_DARWIN_H__
|
#define __UI_UI_DARWIN_H__
|
||||||
|
|
||||||
// TODO document
|
// TODO document
|
||||||
_UI_EXTERN void uiDarwinMakeSingleViewControl(uiControl *, NSView *);
|
_UI_EXTERN void uiDarwinMakeSingleViewControl(uiControl *, NSView *, BOOL);
|
||||||
|
|
||||||
// You can use this function from within your control implementations to return text strings that can be freed with uiFreeText().
|
// You can use this function from within your control implementations to return text strings that can be freed with uiFreeText().
|
||||||
_UI_EXTERN char *uiDarwinNSStringToText(NSString *);
|
_UI_EXTERN char *uiDarwinNSStringToText(NSString *);
|
||||||
|
|
Loading…
Reference in New Issue