Anonymous user
GUI component interaction: Difference between revisions
m
Minor changes.
m (Minor changes.) |
|||
Line 2,257:
===Gtk3 (gintro)===
{{libheader|gintro}}
This is a translation of the
<lang Nim>import random, strutils
import gintro/[glib, gobject, gtk, gio]
Line 2,282:
#---------------------------------------------------------------------------------------------------
proc onQuit(button: Button;
#---------------------------------------------------------------------------------------------------
Line 2,311:
## Activate the application.
let
let content = newBox(Orientation.vertical, 10)
Line 2,336:
content.packStart(btnQuit, true, true, 0)
let context = Context(value: 0, entry: entry)
discard btnQuit.connect("clicked", onQuit,
discard btnIncr.connect("clicked", onIncr, context)
discard btnRand.connect("clicked", onRand, context)
discard entry.connect("changed", onEntryChange, context)
#———————————————————————————————————————————————————————————————————————————————————————————————————
|