ATK 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
ATK 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
ATK 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 LGPL
开发语言 Google Go 查看源码 »
操作系统 跨平台
软件类型 开源软件
所属分类 程序开发GUI开发框架
开源组织
地区 国产
投 递 者 七叶
适用人群 未知
收录时间 2019-04-09

软件简介

ATK 是 Go 语言的 Tcl/Tk 绑定图形库。

go get github.com/visualfc/atk

安装 Tcl/Tk

http://www.tcl-lang.org

  • MacOS X, Windows

https://www.activestate.com/activetcl/downloads

  • Ubuntu
$ sudo apt install tk-dev
  • CentOS
$ sudo yum install tk-devel

Demo

https://github.com/visualfc/atk_demo

Sample

package main

import (
    "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()
        mw.ShowNormal()
    })
}
展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
7 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部