Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yglukhov/nimx
GUI library
https://github.com/yglukhov/nimx
nim ui
Last synced: about 1 month ago
JSON representation
GUI library
- Host: GitHub
- URL: https://github.com/yglukhov/nimx
- Owner: yglukhov
- License: mit
- Created: 2014-12-29T12:47:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-08-17T19:35:03.000Z (over 1 year ago)
- Last Synced: 2024-10-15T12:42:04.771Z (3 months ago)
- Topics: nim, ui
- Language: Nim
- Homepage:
- Size: 3.79 MB
- Stars: 1,090
- Watchers: 44
- Forks: 75
- Open Issues: 47
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- Awesome - Nimx - _GUI library._ (Development / Programming)
- awesome-electron-alternatives - nimx
- awesome-nim - nimx - Desktop, Mobile & Web GUI framework in Nim. (User Interface / GUI)
README
===========
nimx |travis| |nimble|
===========.. |travis| image:: https://travis-ci.org/yglukhov/nimx.svg?branch=master
:target: https://travis-ci.org/yglukhov/nimx.. |nimble| image:: https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble_js.png
:target: https://github.com/yglukhov/nimble-tagCross-platform GUI framework in `Nim `_.
`Live demo in WebGL `_
.. image:: ./doc/sample-screenshot.png
Usage
------------
.. code-block:: nim# File: main.nim
import nimx/window
import nimx/text_fieldproc startApp() =
# First create a window. Window is the root of view hierarchy.
var wnd = newWindow(newRect(40, 40, 800, 600))# Create a static text field and add it to view hierarchy
let label = newLabel(newRect(20, 20, 150, 20))
label.text = "Hello, world!"
wnd.addSubview(label)# Run the app
runApplication:
startApp()Running
------------.. code-block:: sh
nim c -r --threads:on main.nim
Supported target platforms
------------
Nimx officially supports Linux, MacOS, Windows, Android, iOS and WebAssembly (with Nim C backend and `Emscripten `_, and Emscripten-less compilation is experimental).Troubleshooting
------------
Nimx is tested only against the latest devel version of Nim compiler. Before reporting any issues please verify that your Nim is as fresh as possible.Running nimx samples
====================
.. code-block:: shgit clone https://github.com/yglukhov/nimx
cd nimx
nimble install -dy
nake # Build and run on the current platform
# or
nake js # Build and run in default web browserReference
====================
See `the docs <./doc>`_ for more information.