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)
It seems you use 64 bit Nim compiler and 32 bit MingW/GCC.
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
@Aiesha_Nazarothi: To get the height of a text line use
canvas.getTextLineHeight().
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.
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
I wrote an answer here:
[https://github.com/trustable-code/NiGui/issues/79](https://github.com/trustable-code/NiGui/issues/79)
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.
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
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
-1, I think in the main repo they get more attention.|
I like the idea and would call it `{.exposePrivate.}`, because that is what is
does in my understanding.
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
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)
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)
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
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).
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
Maybe relevant:
[https://github.com/nim-lang/Nim/issues/5086](https://github.com/nim-lang/Nim/issues/5086)
(How did this get fixed?)
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
20 matches
Mail list logo