代码拉取完成,页面将自动刷新
Cross-platform GUI framework in Nim.
nimble install nimx
# File: main.nim
import nimx.window
import nimx.text_field
import nimx.system_logger # Required because of Nim bug (#4433)
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()
Unix:
nim c -r --noMain --threads:on main.nim
Windows:
nim c -r --threads:on main.nim
Nimx officially supports Linux, MacOS, Windows, Android, iOS, Javascript (with Nim JS backend) and Asm.js (with Nim C backend and Emscripten).
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.
cd $(nimble path nimx | tail -n 1)/test
nake # Build and run on the current platform
# or
nake js # Build and run in default web browser
TODO
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。