diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-13 07:09:22 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-13 07:09:22 -0400 |
| commit | 791345fa97693016ae3786f3951083edfb752f85 (patch) | |
| tree | 20fcef24ca1a862492ece41c2d72ea9994382e9a /sysdata_darwin.m | |
| parent | 3949fb94e975a67d76342fd928fcc437af16228a (diff) | |
Finished migrating sysdata_darwin.go away from calling objc_msgSend() directly. initWithDummyFrame() is still there as other files use it.
Diffstat (limited to 'sysdata_darwin.m')
| -rw-r--r-- | sysdata_darwin.m | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sysdata_darwin.m b/sysdata_darwin.m index 75202a9..bfefe4e 100644 --- a/sysdata_darwin.m +++ b/sysdata_darwin.m @@ -80,6 +80,16 @@ void windowHide(id window) [toNSWindow(window) orderOut:window]; } +void windowSetTitle(id window, id title) +{ + [toNSWindow(window) setTitle:title]; +} + +id windowTitle(id window) +{ + return [toNSWindow(window) title]; +} + id makeButton(void) { NSButton *button; @@ -96,6 +106,16 @@ void buttonSetTargetAction(id button, id delegate) [toNSButton(button) setAction:@selector(buttonClicked:)]; } +void buttonSetText(id button, id text) +{ + [toNSButton(button) setTitle:text]; +} + +id buttonText(id button) +{ + return [toNSButton(button) title]; +} + id makeCheckbox(void) { NSButton *checkbox; @@ -125,6 +145,13 @@ id makeCombobox(BOOL editable) return combobox; } +id comboboxText(id combobox, BOOL editable) +{ + if (!editable) + return [toNSPopUpButton(combobox) titleOfSelectedItem]; + return [toNSComboBox(combobox) stringValue]; +} + void comboboxAppend(id combobox, BOOL editable, id str) { if (!editable) { @@ -193,6 +220,16 @@ id makeLineEdit(BOOL password) initWithFrame:dummyRect]; } +void lineeditSetText(id lineedit, id text) +{ + [toNSTextField(lineedit) setStringValue:text]; +} + +id lineeditText(id lineedit) +{ + return [toNSTextField(lineedit) stringValue]; +} + id makeLabel(void) { NSTextField *label; |
