Re: How to get & set text in clipboard ?
You could have a look at the WinAPI clipboard implementation of NiGui: [https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/windows/platform_impl.nim#L421](https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/windows/platform_impl.nim#L421)
Re: GDI-style lib for Nim.
So far NiGui does not provide functions to draw multi line texts. If you want to do this, you can use splitLines() and increase y for each line by getTextLineHeight() plus maybe some line spacing. And thanks for reporting the [black shadow bug](https://github.com/trustable-code/NiGui/issues/83), it's now fixed.
Re: GDI-style lib for Nim.
@Aiesha_Nazarothi: To get the height of a text line use canvas.getTextLineHeight().
Re: GDI-style lib for Nim.
NiGui provides getTextWidth (which regards line breaks) and getTextLineWidth (which is for one line of text). Can you please report the "text with black shadow" as GitHub issue? There shouln't be any shadow.
Re: GDI-style lib for Nim.
You could use GDI+ directly. Or the Cairo library. There are several bindings for Nim. NiGui wraps both GDI+ and Cairo. Example program: [https://github.com/trustable-code/NiGui/blob/master/examples/example_10_drawing.nim](https://github.com/trustable-code/NiGui/blob/master/examples/example_10_drawing.nim)
Re: NiGui examples?
I wrote an answer here: [https://github.com/trustable-code/NiGui/issues/79](https://github.com/trustable-code/NiGui/issues/79)
Re: Recommended GUI library?
I'm the author of NiGui. @rockcavera Please create an GitHub issue for the refresh issue you described. Maybe it's easy to fix. @marks You're right, the documentation is still a missing part.
Nimrod support in Geany editor
The mentioned PR for Geany is still not merged. It should be updated to use "Nim" instead of "Nimrod". I figured out, for syntax highlighting it's enough to have a filetype configuration file, which uses the Python parser. I have uploaded this file to [https://github.com/trustable-code/geany-nim-filetype](https://github.com/trustable-code/geany-nim-filetype)
Re: Should we get rid of style insensitivity?
I think a vote with two options is not sufficient to find out, what users really need. Maybe the rule for identifier equality should get adjusted to give users more freedom in naming things: A leading and trailing underscore should be allowed. I guess there are some users coming for example from C, C++ or Python, who are used to have such underscores as part of their naming convention and they don't want to be forced to change it.
Re: [poll] Moving all RFCs in a separate repo
-1, I think in the main repo they get more attention.|
Re: `import foo {.private.}` to allows access to private fields (eg: package-level visibility)
I like the idea and would call it `{.exposePrivate.}`, because that is what is does in my understanding.
Re: Windows WIC or GDI+
I don't know about a GDI+ module, but you could take a look at the code of NiGui to see, how it is used there: * [GDI+ binding](https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/windows/windows.nim#L472) (not complete) * [method loadFromFile()](https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/windows/platform_impl.nim#L698) using GdipCreateBitmapFromFile()
Re: Why can't the Nim VM use FFI?
I think it would be possible, e.g. with libffi. [https://en.wikipedia.org/wiki/Libffi](https://en.wikipedia.org/wiki/Libffi) [https://github.com/Araq/libffi](https://github.com/Araq/libffi)
Re: Off-subject GTK check-resized signal
My Gtk3 implementation uses the `configure-event` signal; in the handler it calls `gtk_window_get_position()` to get the new window size. [Source](https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/gtk3/platform_impl.nim#L53)
Re: A fast float to string conversion library
Nice :) btw, I don't like the libc functions, which are currently used in strutils, because it produces unexpected output for some numbers, example: formatFloat(65000.45, ffDecimal) = 65000.44970896 Run With ffDefault it's ok, but it will switch to scientific notation potentially. Oh, and with precision = -1 it also gives unexpected output: formatFloat(65000.45, ffDefault, -1) = 65000.4 Run
Re: How to call SendMessage API function with WM_GETTEXT message >
You can take a look on the WinAPI function [GetWindowText()](https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowtexta) and the [implementation of NiGui](https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/windows/platform_impl.nim#L112-L116).
Re: Pure really removed for enums?
I prefer non-pure enums with prefixed field names (and underscore as separator) because: * it's simple * names are easier to copy & paste, because you can select them by double click * by reading a field name you know the enum name * no wrong results in text search
Re: Can't install nim on Win 8.1
Maybe relevant: [https://github.com/nim-lang/Nim/issues/5086](https://github.com/nim-lang/Nim/issues/5086) (How did this get fixed?)
Re: Enums pure & namespaced by default
I think pure enums should be default because of these advantages: * more beginner friendly * the name of enum elements is simpler and easier to guess, because it doesn't need a prefix (or in other words: the prefix is always the name of the type) * maybe more intelligent auto-completion in IDEs in the future For example, I had a name collision trying to do this: type XAlign* = enum left, right, center, spread type YAlign* = enum top, bottom, center, spread