You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
nim-cocoa/src/cocoa/NSButton.nim

20 lines
487 B

{.compile: "widgets/button.m".}
import NSFunctions
proc newButton*(parent: ID; caption: cstring; left: cint; top: cint; width: cint; height: cint; `func`: ACTION): ID {.cdecl, importc: "createButton".}
## Creates new Button object
##
## Example:
##
## .. code-block::nim
## btn1 = newButton(mainWindow, "Open", width-100, 20, 90, 24, btnClicked)
##
##
## Callback must be in the form:
##
## .. code-block::nim
## proc buttonCB(sender: ID) {.cdecl.} =
## <..code...>
##