Skip to content
GUI library
Nim Other
  1. Nim 99.8%
  2. Other 0.2%
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Fixed lib load error on some devices Mar 26, 2020
doc Fix spelling mistake (#375) Sep 24, 2019
editor Fixed warnings (#325) Jul 30, 2018
nimx Multiple selection (#423) May 23, 2020
test Fixes #416 Apr 26, 2020
.gitignore Fixing docs Jul 6, 2016
.travis.yml Workaround for travis-ci bug: 1066 Oct 3, 2016
LICENSE Changed license to MIT. Closes #158 Aug 29, 2016
README.rst Update Usage (#357) Feb 18, 2019
deployGHPages.sh Cosmetics Jul 6, 2016
nakefile.nim support of lattest SDL's gradle build system (#352) Jan 2, 2019
nimx.nimble Cosmetics Mar 2, 2020

README.rst

nimx travis nimble

Cross-platform GUI framework in Nim.

Live demo in WebGL

./doc/sample-screenshot.png

Usage

# File: main.nim
import nimx/window
import nimx/text_field

proc 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

nim c -r --threads:on main.nim

Supported target platforms

Nimx officially supports Linux, MacOS, Windows, Android, iOS, Javascript (with Nim JS backend) and Asm.js/WebAssembly (with Nim C backend and Emscripten).

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

git 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 browser

Reference

See the docs for more information.

You can’t perform that action at this time.