Anonymous user
Window creation: Difference between revisions
Added version using "gintro", the Nim high level binding for Gtk3/Gtk4.
m (→gtk2) |
(Added version using "gintro", the Nim high level binding for Gtk3/Gtk4.) |
||
Line 1,186:
=={{header|Nim}}==
=== gtk3 / gintro ===
{{libheader|gintro}}
<lang Nim>import gintro/[glib, gobject, gtk, gio]
proc activate(app: Application) =
## Activate the application.
let window = newApplicationWindow(app)
window.setTitle("Window for Rosetta")
window.setSizeRequest(640, 480)
window.showAll()
let app = newApplication(Application, "Rosetta.Window")
discard app.connect("activate", activate)
discard app.run()</lang>
=== gtk2 ===
This is example 9 from the Araq/Nim github repository (modified to include a quit button)
|