From 82ab438219702f27e8840eca7448bbbf3710a99f Mon Sep 17 00:00:00 2001 From: Armando Rivera Date: Fri, 13 Oct 2023 12:15:06 -0400 Subject: [PATCH] Added 'setDelegate' method --- cocoa.nim | 1 + cocoa/col.nim | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cocoa.nim b/cocoa.nim index 4fc6b67..d4d6adb 100644 --- a/cocoa.nim +++ b/cocoa.nim @@ -104,6 +104,7 @@ proc clear*(widget: ID) {.cdecl, importc: "LB_Clear".} proc `item=`(widget: ID; pos: cint) {.cdecl, importc: "SetItem".} proc remove*(widget: ID; pos: cint) {.cdecl, importc: "RemoveItem".} proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bindWidget".} +proc setDelegate*(widget: ID) {.cdecl, importc: "setDelegate".} proc `tooltip=`*(widget: ID, tip: cstring) {.cdecl, importc: "setToolTip".} # TableView Functions diff --git a/cocoa/col.nim b/cocoa/col.nim index f6ee1ae..68b559f 100644 --- a/cocoa/col.nim +++ b/cocoa/col.nim @@ -79,6 +79,7 @@ proc newMenu*(Title: cstring): id {.cdecl, importc: "createMenu".} proc newMenuItem*(parent: id; caption: cstring; key: cstring; callback: ACTION) {.cdecl, importc: "createMenuItem".} proc newMenuSeparator*(parent: id) {.cdecl, importc: "createMenuSeparator".} proc newSlider*(parent: id; left: cint; top: cint; width: cint; height: cint; callback: ACTION): id {.cdecl, importc: "createSlider".} +proc setDelegate*(widget: ID) {.cdecl, importc: "setDelegate".} proc `text=`*(widget: id; txt: cstring) = widget.SetText(txt) @@ -116,4 +117,4 @@ proc value*(widget: id, value: cint) = proc value*(widget: id): cint = GetValue(widget) -# #endif \ No newline at end of file +# #endif