diff options
Diffstat (limited to 'new/entry_darwin.m')
| -rw-r--r-- | new/entry_darwin.m | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/new/entry_darwin.m b/new/entry_darwin.m index b08d53b..4a4047a 100644 --- a/new/entry_darwin.m +++ b/new/entry_darwin.m @@ -20,14 +20,14 @@ // TOOD move elsewhere // these are based on interface builder defaults; my comments in the old code weren't very good so I don't really know what talked about what, sorry :/ -void finishNewTextField(NSTextField *t, BOOL isLabel) +void finishNewTextField(NSTextField *t, BOOL isEntry) { setStandardControlFont((id) t); // THE ORDER OF THESE CALLS IS IMPORTANT; CHANGE IT AND THE BORDERS WILL DISAPPEAR [t setBordered:NO]; [t setBezelStyle:NSTextFieldSquareBezel]; - [t setBezeled:isLabel]; + [t setBezeled:isEntry]; // TODO autocorrect comment @@ -49,3 +49,20 @@ uiControl *uiNewEntry(void) return t.uiC; } + +char *uiEntryText(uiControl *c) +{ + uiNSTextField *t; + + t = (uiNSTextField *) uiControlHandle(c); + // TODO wrap all strdup calls + return strdup(fromNSString([t stringValue])); +} + +void uiEntrySetText(uiControl *c, const char *text) +{ + uiNSTextField *t; + + t = (uiNSTextField *) uiControlHandle(c); + [t setStringValue:toNSString(text)]; +} |
