Added tooltips support

This commit is contained in:
Armando Rivera 2021-07-31 22:35:07 -04:00
parent 14c086d814
commit c945a6cb86
2 changed files with 5 additions and 0 deletions

View File

@ -78,3 +78,5 @@ proc Notify*(title: cstring; subtitle: cstring; text: cstring) {.cdecl, importc:
proc newSeparator*(parent: ID; x: cint; y: cint; width: cint): ID {.cdecl, importc: "createLine".}
proc link*( widget: ID, widgetIvar: cstring, target: ID, targetIvar: cstring) {.cdecl, importc:"bind".}
proc `tooltip=`*(widget: ID, tip: cstring) {.cdecl, importc: "setToolTip".}

View File

@ -165,3 +165,6 @@ void addToParent(id parent, id child) {
}
}
void setToolTip(id widget, const char *tooltip) {
[widget setToolTip: [NSString stringWithUTF8String: tooltip]];
}