Added 'setDelegate' method

This commit is contained in:
Armando Rivera 2023-10-13 12:15:06 -04:00
parent 2ce602f403
commit 82ab438219
2 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ proc clear*(widget: ID) {.cdecl, importc: "LB_Clear".}
proc `item=`(widget: ID; pos: cint) {.cdecl, importc: "SetItem".} proc `item=`(widget: ID; pos: cint) {.cdecl, importc: "SetItem".}
proc remove*(widget: ID; pos: cint) {.cdecl, importc: "RemoveItem".} proc remove*(widget: ID; pos: cint) {.cdecl, importc: "RemoveItem".}
proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bindWidget".} 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".} proc `tooltip=`*(widget: ID, tip: cstring) {.cdecl, importc: "setToolTip".}
# TableView Functions # TableView Functions

View File

@ -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 newMenuItem*(parent: id; caption: cstring; key: cstring; callback: ACTION) {.cdecl, importc: "createMenuItem".}
proc newMenuSeparator*(parent: id) {.cdecl, importc: "createMenuSeparator".} 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 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) = proc `text=`*(widget: id; txt: cstring) =
widget.SetText(txt) widget.SetText(txt)
@ -116,4 +117,4 @@ proc value*(widget: id, value: cint) =
proc value*(widget: id): cint = proc value*(widget: id): cint =
GetValue(widget) GetValue(widget)
# #endif # #endif