Re: How to get & set text in clipboard ?

2020-06-22 Thread Trustable
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: hello world issues

2019-12-28 Thread Trustable
It seems you use 64 bit Nim compiler and 32 bit MingW/GCC.

Re: GDI-style lib for Nim.

2019-12-17 Thread Trustable
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

Re: GDI-style lib for Nim.

2019-12-16 Thread Trustable
@Aiesha_Nazarothi: To get the height of a text line use canvas.getTextLineHeight().

Re: GDI-style lib for Nim.

2019-12-16 Thread Trustable
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.

2019-12-14 Thread Trustable
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

Re: NiGui examples?

2019-12-10 Thread Trustable
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?

2019-12-09 Thread Trustable
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

2019-02-05 Thread Trustable
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

Re: Should we get rid of style insensitivity?

2018-11-19 Thread Trustable
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

Re: [poll] Moving all RFCs in a separate repo

2018-10-15 Thread Trustable
-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)

2018-10-10 Thread Trustable
I like the idea and would call it `{.exposePrivate.}`, because that is what is does in my understanding.

Re: Windows WIC or GDI+

2018-10-02 Thread Trustable
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://githu

Re: Why can't the Nim VM use FFI?

2018-09-28 Thread Trustable
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

2018-09-26 Thread Trustable
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

2018-09-25 Thread Trustable
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

Re: How to call SendMessage API function with WM_GETTEXT message >

2018-09-20 Thread Trustable
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?

2018-09-10 Thread Trustable
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

2017-05-17 Thread Trustable
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

2017-03-07 Thread Trustable
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