https://github.com/retsyo/FLTK_nim/
As all my released projects, it needs more works to finish. I do hope someone, who knows nimlang well, can join or give suggestions
import fltk_main
proc ButtonClick (button: ptr FL_WIDGET, arg: pointer):cint {.cdecl.} =
Fl_WidgetCopyLabel(button, "do it again")
var Win = Fl_WindowNew(320, 200, "What a shiny Window :-)")
var Btn = Fl_ButtonNew(10, 10, 120, 32, "click me")
Fl_WidgetSetCallback(Btn, ButtonClick)
Fl_WindowShow(Win)
Fl_Run()
p.s. In case someone asks,
# why not to use
1. [FreeBasic[(http://freebasic.net/)? because I need to handle many text in my work, but I hate to write such in any BASIC
2. [nfltk](https://github.com/Skrylar/nfltk). because I can't compile it in my MSYS2+MingW64 on Windows 7
3. wxWidgets? because I can't compile it in my MSYS2+MingW32 on Windows 7
3. QT? because I don't know how to compile it in my MSYS2+MingW64/32 on Windows 7
4. [ui](https://github.com/nim-lang/ui)? because I needs widgets to write spreedsheet app
5. web engine and HTML/js? I don't know how to do that. But I do find http://tabulator.info is pretty
6. Python + QT/wxWidgets? Yes I do use them. But I find that some app built with py2exe/pyinstaller does not run on any Windows version.
7. 2 space for indentation? Well, this project is opensourced, please give you effort to it
# why the EXE file is big?
I don't know
# how to do static link?
I don't know how to do that in nimlang and FreeBasic. Do we need to supply another binding?
BTW, `static link` is allowed by FLTK, and you do not need to opensource your code.
# why do you always test/bind blaah blaah libraries
In fact, I don't mean to do that but I can't find a ready-to-use binding.
# License
I choose [FLTK's lincense](https://www.fltk.org/COPYING.php). But a note in your appliaction such as "FLTK_nim is used" is appreciated.
I do hope someone, who knows nimlang well, can join or give suggestions
Here's a suggestion: don't use upper first letter for proc and variable names :P
The style is the last thing to consider.
The first thing is to make a full and corrected binding with all examples written in nim without any problem, so I have to keep the original lower/upper case in code in order to refer to the original header files( there are both C and FreeBasic) and examples( there is only FreeBasic code for the FLTK C).
FreeBasic ignores the lower/upper case.