Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/visualfc/atk
Another Golang Tcl/Tk binding GUI ToolKit
https://github.com/visualfc/atk
golang gui tcl tk
Last synced: 2 months ago
JSON representation
Another Golang Tcl/Tk binding GUI ToolKit
- Host: GitHub
- URL: https://github.com/visualfc/atk
- Owner: visualfc
- License: lgpl-2.1
- Created: 2019-04-09T01:11:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T22:46:08.000Z (12 months ago)
- Last Synced: 2024-10-13T00:52:40.760Z (2 months ago)
- Topics: golang, gui, tcl, tk
- Language: Go
- Homepage:
- Size: 265 KB
- Stars: 97
- Watchers: 8
- Forks: 19
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# atk
Another Golang Tcl/Tk binding GUI ToolKitgo get github.com/visualfc/atk
Go docs: https://pkg.go.dev/github.com/visualfc/atk/tk
### Install Tcl/Tk
http://www.tcl-lang.org
* MacOS X
https://www.activestate.com/activetcl/downloads
* Windows
https://www.activestate.com/activetcl/downloads
https://github.com/visualfc/tcltk_mingw* Ubuntu
$ sudo apt install tk-dev
* CentOS
$ sudo yum install tk-devel
### Demo
https://github.com/visualfc/atk_demo
### Sample
```go
package mainimport (
"github.com/visualfc/atk/tk"
)type Window struct {
*tk.Window
}func NewWindow() *Window {
mw := &Window{tk.RootWindow()}
lbl := tk.NewLabel(mw, "Hello ATK")
btn := tk.NewButton(mw, "Quit")
btn.OnCommand(func() {
tk.Quit()
})
tk.NewVPackLayout(mw).AddWidgets(lbl, tk.NewLayoutSpacer(mw, 0, true), btn)
mw.ResizeN(300, 200)
return mw
}func main() {
tk.MainLoop(func() {
mw := NewWindow()
mw.SetTitle("ATK Sample")
mw.Center(nil)
mw.ShowNormal()
})
}
```