Golang bindings for XCGUI, Windows GUI library, DirectUI design idea.

Overview

XCGUI

version GoDoc License

项目文档   帮助文档   程序示例

介绍

English | 简体中文

DirectUI设计思想: 在窗口内没有子窗口,界面元素都是逻辑上的区域(无HWND句柄,安全,灵活), 所有UI元素都是自主开发(不受系统限制), 更加灵活的实现各种程序界面,满足不同用户的需求.

官方网站:www.xcgui.com

可视化UI设计器

使用UI设计器可以快速设计界面,节省大量代码。

uidesigner

设计器使用例子,只有这么多代码:

package main

import (
	"github.com/twgh/xcgui/app"
	"github.com/twgh/xcgui/window"
	"github.com/twgh/xcgui/xcc"
)

func main() {
	a := app.New("")
	// 添加文件搜索路径, 你运行时需要改成自己的路径,也可以使用相对路径
	a.AddFileSearchPath(`D:\GoProject\src\github.com\twgh\xcgui-example\uidesigner\res`)
	// 从zip中加载资源文件
	a.LoadResourceZip("qqmusic.zip", "resource.res", "")
	// 从zip中加载布局文件
	hWindow := a.LoadLayoutZip("qqmusic.zip", "main.xml", "", 0)
	if hWindow == 0 {
		panic("error")
	}
	// 创建窗口对象
	win := window.NewWindowByHandle(hWindow)

	// 调整布局
	win.AdjustLayout()
	// 显示窗口
	win.ShowWindow(xcc.SW_SHOW)

	a.Run()
	a.Exit()
}

获取

go get github.com/twgh/xcgui

动态链接库下载

网盘 下载地址
百度网盘 下载,提取码:wcs7
OneDrive 下载
Google Drive 下载
GIthub 下载

程序运行时需要把XCGUI.dll放到程序运行目录。

在开发时最好是放到C:\Windows\System32目录,这样就不需要频繁把dll放到不同程序的运行目录了。

简单窗口(纯代码)

SimpleWindow

package main

import (
	"github.com/twgh/xcgui/app"
	"github.com/twgh/xcgui/widget"
	"github.com/twgh/xcgui/window"
	"github.com/twgh/xcgui/xc"
	"github.com/twgh/xcgui/xcc"
)

func main() {
	// 1.初始化UI库
	a := app.New("")
	// 2.创建窗口
	win := window.NewWindow(0, 0, 466, 300, "炫彩窗口", 0, xcc.Xc_Window_Style_Default)

	// 设置窗口边框大小
	win.SetBorderSize(1, 30, 1, 1)
	// 设置窗口透明类型
	win.SetTransparentType(xcc.Window_Transparent_Shadow)
	// 设置窗口阴影
	win.SetShadowInfo(10, 255, 10, false, 0)
	// 窗口置顶
	win.SetTop()
	// 窗口居中
	win.Center()
	// 创建标签_窗口标题
	lbl_Title := widget.NewShapeText(15, 15, 56, 20, "Title", win.Handle)
	lbl_Title.SetTextColor(xc.RGB(255, 255, 255), 255)

	// 创建最小化按钮
	btn_Min := widget.NewButton(396, 10, 30, 30, "-", win.Handle)
	btn_Min.SetTextColor(xc.RGB(255, 255, 255), 255)
	btn_Min.SetType(xcc.Button_Type_Min)
	btn_Min.EnableBkTransparent(true)
	// 创建结束按钮
	btn_Close := widget.NewButton(426, 10, 30, 30, "X", win.Handle)
	btn_Close.SetTextColor(xc.RGB(255, 255, 255), 255)
	btn_Close.SetType(xcc.Button_Type_Close)
	btn_Close.EnableBkTransparent(true)

	// 3.显示窗口
	win.ShowWindow(xcc.SW_SHOW)
	// 4.运行程序
	a.Run()
	// 5.释放UI库
	a.Exit()
}

常量

xcc包里都是常量,像这样使用:xcc.Xc_Window_Style_Default

需要用到xcc包常量的参数注释都是类似这样的,复制Xc_Window_Style_xcc包里搜索即可看到相关常量注释:5eX6pD.jpg

命令介绍

xc包里的函数都是xcgui.dll里原本的函数,有一千多个函数,可以直接使用,封装好的类都在其他包里。

在某些情况下,把xc包里的原生函数与封装好的类混合起来使用会更加方便。

封装进度

这些类都是基于xc包里的一千多个函数封装的。

中文名称 包名 类名 是否封装完毕 文档
程序 app App 文档
窗口 window Window 文档
框架窗口 window FrameWindow 文档
模态窗口 window ModalWindow 文档
形状对象 widget Shape 文档
圆形形状对象 widget ShapeEllipse 文档
形状对象GIF widget ShapeGif 文档
组框形状对象 widget ShapeGroupBox 文档
直线形状对象 widget ShapeLine 文档
形状对象图片 widget ShapePicture 文档
矩形形状对象 widget ShapeRect 文档
形状对象文本 widget ShapeText 文档
表格 widget Table 文档
按钮 widget Button 文档
下拉组合框 widget ComboBox 文档
编辑框(常规, 富文本, 聊天气泡) widget Edit 文档
代码编辑框 widget Editor 文档
基础元素 widget Element 文档
列表 widget List 文档
列表框 widget ListBox 文档
弹出菜单 widget Menu 文档
进度条 widget ProgressBar 文档
静态文本连接按钮 widget TextLink 文档
布局元素 widget LayoutEle 文档
布局框架 widget LayoutFrame 文档
列表视图 widget ListView 文档
菜单条 widget MenuBar 文档
Pane元素 widget Pane 文档
滚动条 widget ScrollBar 文档
滚动视图 widget ScrollView 文档
滑动条元素 widget SliderBar 文档
标签栏元素 widget TabBar 文档
工具条 widget ToolBar 文档
列表树元素 widget Tree 文档
日期时间 widget DateTime 文档
月历卡片 widget MonthCal 文档
数据适配器-列表视元素 adapter AdapterListView 文档
数据适配器-单列Map-列表头(listHeader) adapter AdapterMap 文档
数据适配器-XList-XListBox adapter AdapterTable 文档
数据适配器-树元素 adapter AdapterTree 文档
背景管理器 bkmanager BkManager 文档
字体 fontx FontX 文档
图片操作 image Image 文档
列表项模板 listitemtemplate ListItemTemplate 文档
节点 listitemtemplate Node 文档
图形绘制 draw Draw 文档
XCGUI所有函数 xc 文档
XCGUI常量 xcc 文档
缓动 ease 文档
资源操作 res 文档
Comments
  • fatal error: too many callback functions

    fatal error: too many callback functions

    不停的调用XC_CallUiThread会报fatal error: too many callback functions错误

    这两个帖子好像也提到了超过2000次后会出问题 https://stackoverflow.com/questions/66864829/golang-fatal-error-too-many-callback-functions https://github.com/golang/go/issues/1912

    复现代码

    package main
    
    import (
    	"fmt"
    	"github.com/twgh/xcgui/app"
    	"github.com/twgh/xcgui/widget"
    	"github.com/twgh/xcgui/window"
    	"github.com/twgh/xcgui/xc"
    	"github.com/twgh/xcgui/xcc"
    	"time"
    )
    
    func main() {
    
    	a := app.New("")
    
    	win := window.NewWindow(0, 0, 466, 300, "炫彩窗口", 0, xcc.Xc_Window_Style_Default)
    
    	logEdit := widget.NewEdit(100, 100, 100, 100, win.Handle)
    
    	btn_test := widget.NewButton(250, 150, 50, 50, "点击", win.Handle)
    	btn_test.Event_BnClick(func(pbHandled *bool) int {
    		*pbHandled = true
    		go func() {
    			// 不断的调用会报错
    			for ;; {
    				xc.XC_CallUiThread(func(data int) int {
    					timeStyle := logEdit.AddStyleEx("微软雅黑",10, 0, xc.RGB(255, 255, 255), true)
    						logEdit.AddTextEx(fmt.Sprintf("%s: ", time.Now().Format("2006-01-02 15:04:05")), timeStyle)
    					return 0
    				}, 1)
    				time.Sleep(500 * time.Microsecond)
    			}
    		}()
    		return 0
    	})
    	// 3.显示窗口
    	win.ShowWindow(xcc.SW_SHOW)
    	// 4.运行程序
    	a.Run()
    	// 5.释放UI库
    	a.Exit()
    }
    
    
    问答 
    opened by wengooooo 4
  • list无法添加列文本

    list无法添加列文本

    list无法添加列文本

    复现的代码

    package main
    
    import (
    	"fmt"
    	"github.com/twgh/xcgui/app"
    	"github.com/twgh/xcgui/widget"
    	"github.com/twgh/xcgui/window"
    	"github.com/twgh/xcgui/xcc"
    )
    
    func main() {
    
    	a := app.New("")
    
    	win := window.NewWindow(0, 0, 466, 300, "炫彩窗口", 0, xcc.Xc_Window_Style_Default)
    
    	list := widget.NewList(50, 50, 300, 300, win.Handle)
    	list.CreateAdapterHeader()
    	list.CreateAdapter()
    
    	list.AddColumnText(50, "test1", "aaa") //没有显示文本出来
    	list.AddColumnText(100, "test2", "bbb") //没有显示文本出来
    	list.AddColumnText(100, "test3", "ccc") //没有显示文本出来
    
    	for i:=0; i < 10; i++ {
    		index := list.AddItemText(fmt.Sprintf("item-%d", i))
    		list.SetItemText(index, 1, fmt.Sprintf("subitem-%d", i))
    		list.SetItemText(index, 2, fmt.Sprintf("subitem-%d", i))
    	}
    
    	win.ShowWindow(xcc.SW_SHOW)
    
    	a.Run()
    
    	a.Exit()
    }
    
    
    问答 
    opened by wengooooo 3
  • [BUG] panic: Failed to find XAnima_SetCallBack procedure in xcgui.dll: The specified procedure could not be found.

    [BUG] panic: Failed to find XAnima_SetCallBack procedure in xcgui.dll: The specified procedure could not be found.

    an := ani.NewAnima(w.Handle, 1) an.Move(100, 500, 0, 1, xcc.Ease_Flag_Linear, false) an.SetCallBack(anCallback) an.Run(w.Handle)

    when i try to set callback for animation, get below panic.

    panic: Failed to find XAnima_SetCallBack procedure in xcgui.dll: The specified procedure could not be found.

    any help please?

    opened by sdxstar 2
  • 处理调试时UTF16ToString会出现异常的问题

    处理调试时UTF16ToString会出现异常的问题

    当Go语言在调试模式的时候,形状文本的GetText函数会抛异常,Release模式下则不会,经过分析发现异常时函数执行的流程如下: xc.XShapeText_GetText -> common.UintPtrToString(r) -> syscall.UTF16ToString(([]uint16)(unsafe.Pointer(&ptr))) -> s = s[0:i]。 问题在于最后一句代码,s变量此时的容量为1,因此需要对函数进行修改。

    opened by fjqisba 2
  • lauyoutframe 设置隐藏 UI线程没及时隐藏和显示

    lauyoutframe 设置隐藏 UI线程没及时隐藏和显示

    func main() {
    	a := app.New(true)
            a.LoadResource("resource.res")
    	//a.LoadResourceZip("xcgui.zip", "resource.res", "")
    	// 从zip中加载布局文件
    	hWindow := a.LoadLayout("main.xml", 0, 0)
    
    	if hWindow == 0 {
    		panic("error")
    	}
    	//隐藏对应的id
    	laylist := widget.NewLayoutFrameByName("list")
    
    	//主线程ui
    	go func() {
    		a.CallUiThread(func(data int) int {
    			laylist.Show(false)
    			return 0
    		}, 0)
    	}()
    
    	// 创建窗口对象
    	win := window.NewWindowByHandle(hWindow)
    
    	//通过name获取对象句柄
    	btn := widget.NewButtonByName("btn")
    	//添加绑定事件
    	btn.Event_BnClick(func(pbHandled *bool) int {
    		go func() {
    			a.CallUiThread(func(data int) int {
    				laylist.Show(false)
    				win.AdjustLayout()
    
    				return 0
    			}, 0)
    		}()
    
    		return btn1(win.GetHWND())
    	})
    	// 调整布局
    	win.AdjustLayout()
    	// 显示窗口
    	win.ShowWindow(xcc.SW_SHOW)
    	a = s
    	w = hWindow
    	a.SetPaintFrequency(10)
    	a.Run()
    	a.Exit()
    }
    

    绑定事件点击按钮,触发的事件显示layoutframe,窗口的layoutframe没有及时显示,滚动或者缩放才会变化

    image

    opened by emund1101 2
  • [BUG] failed to GetSelectAll in ListView

    [BUG] failed to GetSelectAll in ListView

    failed to GetSelectAll in ListView

    func (l *ListView) GetSelectAll(pArray int, nArraySize int) int {
    	return xc.XListView_GetSelectAll(l.Handle, pArray, nArraySize)
    }
    

    I think the 1st arg should be a pointer to an array but not an int.

    opened by sdxstar 1
  • 代码编辑框提示错误

    代码编辑框提示错误

    错误:panic: Failed to find XEditor_SetStyleFunction procedure in xcgui.dll: The specified procedure could not be found.

    备注: 自带的代码编辑框的demo, 出错. 把 3.3.3的dll复制过来又可以. 是否这个函数被删除了?

    1

    enhancement 
    opened by nuan1989 1
  • Gif图片无法显示出来

    Gif图片无法显示出来

    package main
    
    import (
    	_ "embed"
    	"github.com/twgh/xcgui/app"
    	"github.com/twgh/xcgui/widget"
    	"github.com/twgh/xcgui/window"
    	"github.com/twgh/xcgui/xc"
    	"github.com/twgh/xcgui/xcc"
    )
    
    
    //go:embed 2.gif
    var img1 []byte
    
    func main() {
    	a := app.New(true)
    	w := window.NewWindow(0, 0, 415, 296, "", 0, xcc.Window_Style_Default)
    
    	// 加载图片从内存
    	hImg := xc.XImage_LoadMemory(img1)
    
    	shapePic := widget.NewShapeGif(8, 30, 400, 260, w.Handle)
    
    	shapePic.SetImage(hImg)
    
    	w.ShowWindow(xcc.SW_SHOW)
    	a.Run()
    	a.Exit()
    }
    
    
    问答 
    opened by wengooooo 1
  • Does xcgui also compile for Linux and MacOSX

    Does xcgui also compile for Linux and MacOSX

    Hello,

    I like what I have seen in your Xcgui github site but need something that also compile across platforms for Linux and Mac OSX as well as Windows.

    Additionally, I am looking to see if you have any examples that show a type of Spreadsheet and also maybe embedding 3D graphics in a window frame as well.

    Any information on any of this would be greatly appreciated. Thanks

    opened by lonnietc 1
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 0
Releases(v1.3.372)
  • v1.3.372(Dec 26, 2022)

  • v1.3.371(Nov 25, 2022)

    一、修复问题

    // 修复缺少一个参数的问题
    xc.XC_LoadLayoutEx
    xc.XC_LoadLayoutZipEx
    xc.XC_LoadLayoutZipMemEx
    xc.XC_LoadLayoutFromStringWEx
    

    二、增加函数

    (widget.Edit) GetTextEx()
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.370(Nov 22, 2022)

    一、新增函数

    // 这些加载布局文件的函数, 支持设定name前缀.
    // 那么name属性值就变为: 前缀 + name, 这样布局文件就可复用, 避免了name冲突.
    xc.XC_LoadLayoutEx
    xc.XC_LoadLayoutZipEx
    xc.XC_LoadLayoutZipMemEx
    xc.XC_LoadLayoutFromStringEx
    xc.XC_LoadLayoutFromStringWEx
    
    xc.XEdit_InsertChatBegin
    xc.XDraw_GetFont
    

    二、修改函数

    // 删除Enable后面多余的m
    xc.XList_EnablemTemplateReuse
    xc.XListBox_EnablemTemplateReuse
    xc.XListView_EnablemTemplateReuse
    xc.XTree_EnablemTemplateReuse
    

    三、结构体修改

    xcc.Menu_DrawItem_ 增加成员: NShortcutKeyWidth // 右侧快捷键占位宽度
    

    四、增加事件

    Event_TOOLTIP_POPUP // 元素_工具提示弹出事件
    

    五、xcgui.dll 3.3.7.0

    xcgui-3.3.7.0-x32.dll
    md5: B693C443C0C19EB586EF01BBE02C3534
    xcgui-3.3.7.0-x64.dll
    md5: 20F55EF5F0EBB6CFFE83A9DFE52F04E2
    
    Source code(tar.gz)
    Source code(zip)
    xcgui-3.3.7.0-x32.dll(1.98 MB)
    xcgui-3.3.7.0-x64.dll(2.48 MB)
  • v1.3.360(Aug 31, 2022)

    增加函数:

    xc.XC_CallUT    // 简化版调用界面线程, 回调函数没有参数也没有返回值
    
    xc.XEdit_GetText_Temp
    xc.XEdit_GetTextRow_Temp
    xc.XEdit_GetSelectText_Temp
    
    xc.XList_GetItemTemplate
    xc.XList_GetItemTemplateHeader
    xc.XList_RefreshDataHeader
    
    xc.XTemp_List_InsertNode
    xc.XTemp_List_DeleteNode
    xc.XTemp_List_GetCount
    xc.XTemp_List_MoveColumn
    
    wapi.RegisterHotKey
    wapi.UnregisterHotKey
    wapi.GetMessageW
    wapi.TranslateMessage
    wapi.DispatchMessageW
    wapi.PostQuitMessage
    wapi.SendMessageW
    wapi.PostMessageW
    wapi.GetLastError
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.352(Jul 2, 2022)

    一、增加函数和接口

    xc.UiThreader			这是一个接口,用于在界面线程操作UI
    xc.XC_CallUiThreadEx		炫彩_调用界面线程Ex,不受2000个回调的限制
    xc.XC_CallUiThreader		炫彩_调用界面线程,接口版,不受2000个回调的限制
    xc.WriteDll			写出dll到系统临时目录
    xc.GetVer			获取xcgui.dll的版本号
    xc.PathExists			判断文件或目录是否存在
    wapi.GetCursorPos		取鼠标光标在屏幕上的坐标
    

    二、修改包名和函数

    listitemtemplate 改为 tmpl
    
    tmpl.NewListItemTemplate 改为 New
    tmpl.NewListItemTemplateByHandle 改为 NewByHandle
    tmpl.NewListItemTemplate_Load 改为 NewByXML
    tmpl.NewListItemTemplate_LoadZip 改为 NewByZip
    tmpl.NewListItemTemplate_LoadZipMem 改为 NewByZipMem
    tmpl.NewListItemTemplate_LoadFromString 改为 NewByString
    

    三、增加常量

    键盘按键相关常量
    

    四、对象的创建方法名称优化

    旧函数并没有删除,只是被标记为废弃,旧项目还能用。

    • window.NewWinodw等创建普通窗口的方法去除了后面的Window单词。
    • bkmanager.NewBkManager等创建背景管理器的方法去除了后面的BkManager单词。
    • Font.NewFont等创建炫彩字体的方法去除了后面的Font单词。
    • bkobj.NewBkObjByHandle等创建BkObj的方法去除了后面的BkObj单词。
    • drawx.NewDraw等创建图形绘制对象的方法去除了后面的Draw单词。
    • imagex.NewImage等创建图片操作对象的方法去除了后面的Image单词。
    • svg.NewSvg等创建Svg操作对象的方法去除了后面的Svg单词。
    Source code(tar.gz)
    Source code(zip)
  • v1.3.351(Jun 21, 2022)

  • v1.3.350(Jun 19, 2022)

    一、 增加函数:

    XImage_SetScaleSize
    XEditor_SetAutoMatchMode
    XListView_SetDragRectColor
    XListBox_SetDragRectColor
    XList_SetDragRectColor
    XSvg_LoadZipMem
    XFont_CreateFromZip
    XFont_CreateFromZipMem
    

    二、 增加参数:

    XList_CreateAdapter
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.340(May 26, 2022)

    一、 增加函数:

    XEdit_SetRowSpace
    XEdit_SetBackFont
    XEdit_ReleaseStyle
    XEdit_ModifyStyle
    XEdit_SetSpaceSize
    XEdit_SetCharSpaceSize
    XEdit_GetSelectTextLength
    XEdit_SetSelectTextStyle
    XEdit_SetCurPosEx
    XEdit_GetCurPosEx
    XEdit_MoveEnd
    
    XEditor_GetExpandState
    XEditor_SetExpandState
    XEditor_GetIndentation
    XEidtor_IsEmptyRow
    
    XList_SetItemHeight
    XList_GetItemHeight
    
    XAdListView_Group_GetText
    XAdListView_Group_GetTextEx
    XAdListView_Group_GetImage
    XAdListView_Group_GetImageEx
    XAdListView_Item_GetText
    XAdListView_Item_GetImage
    
    XListView_Group_GetText
    XListView_Group_GetTextEx
    XListView_Group_GetImage
    XListView_Group_GetImageEx
    XListView_Item_GetText
    XListView_Item_GetImage
    
    XDraw_ImageMaskRect
    XDraw_ImageMaskEllipse
    
    XDateTime_Popup
    XMonthCal_SetTextColor
    XPane_IsGroupActivate
    XTemp_Clone
    XFrameWnd_GetDragFloatWndTopFlag
    

    二、 修改函数:

    XEdit_InsertTextUser 改为 XEdit_AddTextUser
    XEdit_PositionToInfo 改为 XEdit_PosToRowCol
    XEdit_InfoToPosition 改为 XEdit_RowColToPos
    

    三、 修改函数参数:

    XEdit_SetCurPos
    XPane_ShowPane
    XPane_HidePane
    XC_GetTextShowRect
    

    四、windows系统api都移动到wapi包里

    增加剪贴版读写函数

    GetClipboardText
    SetClipboardText
    

    增加浏览文件夹相关函数

    SHBrowseForFolderW
    SHGetPathFromIDListW
    

    增加打开/保存文件对话框函数

    GetOpenFileNameW
    GetSaveFileNameW
    

    增加打开选择颜色界面函数

    ChooseColorW
    

    五、可更改xcgui.dll的路径

    在app.New()之前调用:

    xc.SetXcguiPath(`C:\Users\Administrator\Desktop\XCGUI.dll`)
    

    六、增加了一些便捷方法

    a.ShowAndRun
    window.NewWindowByLayout
    window.NewWindowByLayoutZip
    window.NewWindowByLayoutZipMem
    window.NewWindowByLayoutStringW
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.333(Mar 2, 2022)

    1. 封装一些常用的shell32.dlluser32.dll中的函数.
    2. 对常量进行分类, 调用常量时IDE的智能提示会更加准确了.
    3. 修复几个错误的常量值.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.332(Feb 15, 2022)

    1. 去除nCount参数: XDraw_DrawText XDraw_DrawTextF XDraw_DrawTextUnderline XDraw_DrawTextUnderlineF

    2. 修复所有结构体中错误的字段类型

    Source code(tar.gz)
    Source code(zip)
  • v1.3.331(Jan 14, 2022)

  • v1.3.330(Jan 13, 2022)

    v1.3.330封装自XCGUI官方3.3.3版本.

    1. 增加函数:
    	XBkM_GetStateTextColor();
    	XBkM_GetObject();
    	XList_SetSplitLineColor();
    	XListBox_SetSplitLineColor();
    	XTree_SetSplitLineColor();
    	XDraw_D2D_Clear();
    	XMenu_SetItemWidth();
    	DragQueryFileW();
    	DragQueryPoint();
    	DragFinish();
    	XBkObj_SetMargin();
    	XBkObj_SetAlign();
    	XBkObj_SetImage();
    	XBkObj_SetRotate();
    	XBkObj_SetFillColor();
    	XBkObj_SetBorderWidth();
    	XBkObj_SetBorderColor();
    	XBkObj_SetRectRoundAngle();
    	XBkObj_EnableFill();
    	XBkObj_EnableBorder();
    	XBkObj_SetText();
    	XBkObj_SetFont();
    	XBkObj_SetTextAlign();
    	XBkObj_GetMargin();
    	XBkObj_GetAlign();
    	XBkObj_GetImage();
    	XBkObj_GetRotate();
    	XBkObj_GetFillColor();
    	XBkObj_GetBorderColor();
    	XBkObj_GetBorderWidth();
    	XBkObj_GetRectRoundAngle();
    	XBkObj_IsFill();
    	XBkObj_IsBorder();
    	XBkObj_GetText();
    	XBkObj_GetFont();
    	XBkObj_GetTextAlign();
    
    2. 函数增加参数:
    	增加ID参数:
    	XBkM_AddBorder();
    	XBkM_AddFill();
    	XBkM_AddImage();
    
    3. 增加常量:
    	BkObject_Align_Flag_
    	List_DrawItemBk_Flag_Line
    	List_DrawItemBk_Flag_LineV
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.320(Dec 30, 2021)

    v1.3.320封装自XCGUI官方3.3.2版本.

    1. 增加函数:
    	XAnima_DelayEx();
    	XAnimaMove_SetFlag();
    	XWnd_SetBkInfo();
    	XWnd_SetCaptionMargin();
    	XWnd_IsDragBorder();
    	XWnd_IsDragWindow();
    	XWnd_IsDragCaption();
    	XBkM_SetInfo();
    	XEle_SetBkInfo();
    
    2. 增加事件:
    	XWM_DOCK_POPUP
    	XWM_FLOATWND_DRAG
    
    3. 增加常量:
    	Animation_Move_X
    	Animation_Move_Y
    
    4. 修改函数:
    	增加参数: hAttachWnd // 附加窗口.
    	XC_LoadLayout();
    	XC_LoadLayoutZip();
    	XC_LoadLayoutZipMem();
    	XC_LoadLayoutFromString();
    	XC_LoadLayoutFromStringUtf8();
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.310(Dec 24, 2021)

  • v1.3.31-1(Dec 22, 2021)

    v1.3.31-1封装自XCGUI官方3.3.1版本. 1. 更改函数: XEle_Move() ==> XEle_SetPosition(); XEle_MoveLogic() ==> XEle_SetPositionLogic(); XWnd_Move() ==> XWnd_SetPosition(); XSvg_GetOffset() ==> XSvg_GetPosition(); XSvg_SetOffset() ==> XSvg_SetPosition(); XShape_Move() ==> XShape_SetPosition(); XWnd_CreateEx() 更改参数顺序; XModalWnd_CreateEx() 更改参数顺序; XFrameWnd_CreateEx() 更改参数顺序; XC_Alert() 更改参数顺序; XC_MessageBox() 更改参数顺序; XMsg_Create() 更改参数顺序; XMsg_CreateEx() 更改参数顺序; XSvg_LoadString() 移除长度参数; XImage_LoadSvgString() 移除长度参数; 涉及内存加载的函数,切片指针参数改为直接传切片,移除长度参数;

    3. 增加函数:
    	XEase_Ex();
    	XMsg_CreateEx();
    
    	XEle_GetAlpha();
    	XEle_GetPosition();
    	XEle_SetSize();
    	XEle_GetSize();
    
    	XSvg_SetAlpha();
    	XSvg_GetAlpha();
    	XSvg_SetUserFillColor();
    	XSvg_SetUserStrokeColor();
    	XSvg_GetUserFillColor();
    	XSvg_GetUserStrokeColor();
    	XSvg_SetRotateAngle();
    	XSvg_GetRotateAngle();
    	XSvg_SetRotate();
    	XSvg_GetRotate();
    	XSvg_Show();
    	XSvg_LoadStringW();
    	XSvg_LoadStringUtf8();
    	XSvg_SetPositionF();
    	xSvg_GetPositionF();
    
    	XShape_GetPosition();
    	XShape_GetSize();
    	XShape_GetSize();
    	XShape_SetAlpha();
    	XShape_GetAlpha();
    
    	XImage_LoadSvgStringW();
    	XImage_LoadSvgStringUtf8();
    
    4. 增加动画特效相关函数:
    	XAnima_Run();
    	XAnima_Release();
    	XAnima_ReleaseEx();
    	XAnima_Create();
    	XAnima_Move();
    	XAnima_MoveEx();
    	XAnima_Rotate();
    	XAnima_RotateEx();
    	XAnima_Scale();
    	XAnima_ScaleSize();
    	XAnima_Alpha();
    	XAnima_AlphaEx();
    	XAnima_Color();
    	XAnima_ColorEx();
    	XAnima_LayoutWidth();
    	XAnima_LayoutSize();
    	XAnima_Delay();
    	XAnima_Show();
    	XAnimaGroup_Create();
    	XAnimaGroup_AddItem();
    	XAnimaItem_EnableCompleteRelease();
    	XAnimaRotate_SetCenter();
    	XAnimaScale_SetPosition();
    	XAnima_GetObjectUI();
    	XAnima_EnableAutoDestroy();
    	XAnima_DestroyObjectUI();
    	XAnima_SetCallBack();
    	XAnima_SetUserData();
    	XAnima_GetUserData();
    	XAnima_Stop();
    	XAnima_Start();
    	XAnima_Pause();
    	XAnimaItem_SetCallback();
    	XAnimaItem_SetUserData();
    	XAnimaItem_GetUserData();
    	XAnimaItem_EnableAutoDestroy();
    
    5.增加通知消息相关函数:
    	XNotifyMsg_Popup();
    	XNotifyMsg_PopupEx();
    	XNotifyMsg_WindowPopup();
    	XNotifyMsg_WindowPopupEx();
    	XNotifyMsg_SetDuration();
    	XNotifyMsg_SetCaptionHeight();
    	XNotifyMsg_SetWidth();
    	XNotifyMsg_SetSpace();
    	XNotifyMsg_SetBorderSize();
    	XNotifyMsg_SetParentMargin();
    
    6. 常量修改
    	XC_AdjustLayout_No ==> AdjustLayout_No
    	XC_AdjustLayout_All ==> AdjustLayout_All
    	XC_AdjustLayout_Self ==> AdjustLayout_Self
    	Ease_In ==> Ease_Type_In
    	Ease_Out ==> Ease_Type_Out
    	Ease_InOut ==> Ease_Type_InOut
    	增加 Ease_Flag_ 相关常量
    	增加 NotifyMsg_Skin_ 相关常量
    	增加 Position_Flag_ 相关常量
    
    Source code(tar.gz)
    Source code(zip)
  • v1.3.20-2(Nov 29, 2021)

  • v1.3.20-1(Nov 23, 2021)

    v1.3.20-1封装于XCGUI官方3.2.0版本. 增加Svg类. 增加函数: XC_LoadStyleFromStringW(); XC_ShowSvgFrame(); XImage_LoadSvg(); XImage_LoadSvgFile(); XImage_LoadSvgString(); XImage_GetSvg(); XSvg_LoadFile(); XSvg_LoadString(); XSvg_LoadZip(); XSvg_LoadRes(); XSvg_SetSize(); XSvg_GetSize(); XSvg_GetWidth(); XSvg_GetHeight(); XSvg_SetOffset(); XSvg_GetOffset(); XSvg_GetViewBox(); XSvg_EnableAutoDestroy(); XSvg_AddRef(); XSvg_Release(); XSvg_GetRefCount(); XSvg_Destroy(); XDraw_DrawSvgSrc(); XDraw_DrawSvg(); XDraw_DrawSvgEx(); XDraw_DrawSvgSize(); XWnd_AddBkBorder(); XWnd_AddBkFill(); XWnd_AddBkImage(); XWnd_GetBkInfoCount(); XWnd_ClearBkInfo(); Font_Info_Name(); UintPtrToString();

    Source code(tar.gz)
    Source code(zip)
  • v1.3.12-2(Nov 10, 2021)

  • v1.3.12-1(Nov 4, 2021)

    v1.3.12-1封装于XCGUI官方3.1.2版本. 从这个版本号中能看出XCGUI官方的版本号.

    2021-11-04

    1. 更改部分类继承关系.

    2021-11-02

    1. 增加函数. XFont_CreateFromRes(); XC_IsEnableD2D(); XMsg_Create();
    2. 修改函数. XC_MessageBox(); //优化参数 XWnd_Attach(); //增加参数XCStyle XModalWnd_Attach(); //增加参数XCStyle XFrameWnd_Attach(); //增加参数XCStyle

    2021-11-01

    1. 增加函数. XDraw_SetTextRenderingHint(); XFont_CreateFromMem(); XComboBox_PopupDropList(); XComboBox_SetItemTemplate();

    2021-10-22

    1. 常量修改. (1) 去掉窗口样式常量前的Xc_ (2) 增加窗口样式常量: window_style_icon = 64, ///<图标 window_style_title = 128, ///<标题 window_style_btn_min = 256, ///<控制按钮-最小化 window_style_btn_max = 512, ///<控制按钮-最大化 window_style_btn_close = 1024,///<控制按钮-关闭 window_style_simple = 47 window_style_modal_simple=7 (3) 修改窗口样式常量值: window_style_modal = 1223 window_style_default = 2031 (4) 增加D2D文本渲染模式相关常量: XC_DWRITE_RENDERING_MODE_

    2. 增加函数. XWnd_SetIcon(); XWnd_SetTitle(); XWnd_SetTitleColor(); XWnd_GetButton(); XWnd_GetIcon(); XWnd_GetTitle(); XWnd_GetTitleColor(); XC_GetD2dFactory(); XC_GetWicFactory(); XC_GetDWriteFactory(); XC_SetD2dTextRenderingMode(); XDraw_GetD2dRenderTarget(); XDraw_SetD2dTextRenderingMode();

    3. 修改函数. (1) 增加参数: XImage_LoadResAdaptive(); XImage_LoadRes(); (2) 去掉重复的拉伸属性参数bStretch: XImage_LoadFile(); XImage_LoadZip(); XImage_LoadZipMem(); XImage_LoadMemory(); XImage_LoadMemoryRect();

    2021-10-07

    1. 增加D2D支持. XInitXCGUI(true);// 参数为true启用D2D.

    2. 图形绘制接口(Draw)优化, 增加参数为浮点型的函数.

    3. 增加函数. XWnd_GetCaretInfo(); ABGR(); ABGR2();

    4. 修改函数. XWnd_SetCaretPos() XFont_Create2() 改为 XFont_CreateEx() XFont_CreateEx() 改为 XFont_CreateLOGFONTW() XEle_GetContentSize()

    5. 删除函数. XListBox_AddItemBkBorder() XListBox_AddItemBkFill() XListBox_AddItemBkImage() XListBox_GetItemBkInfoCount() XListBox_ClearItemBkInfo()

      XList_AddItemBkBorder() XList_AddItemBkFill() XList_AddItemBkImage() XList_GetItemBkInfoCount() XList_ClearItemBkInfo()

      XTree_AddItemBkBorder() XTree_AddItemBkFill() XTree_AddItemBkImage() XTree_GetItemBkInfoCount() XTree_ClearItemBkInfo()

      XListView_AddItemBkBorder() XListView_AddItemBkFill() XListView_AddItemBkImage() XListView_GetItemBkInfoCout() XListView_ClearItemBkInfo()

      XWnd_SetCaretPosEx() XWnd_SetCaretSize() XFont_Create3() XFont_Create2()

    2021-09-08

    1. 增加函数. XObj_SetTypeEx(); XWnd_Show(); XWidget_SetID(); XWidget_GetID(); XWidget_SetUID(); XWidget_GetUID(); XWidget_SetName(); XWidget_GetName(); XProgBar_EnableStretch(); XProgBar_EnableShowText();

    2. 修改函数. (1) 增加参数:(nState int) XEle_AddBkBorder(); XEle_AddBkFill(); XEle_AddBkImage(); (2) 删除函数: 因为两端大小可以通过设置边和内填充实现 XProgBar_SetSpaceTwo(); XSliderBar_SetSpaceTwo(); (3) 移除函数: 移除的部分函数提升到父级模块 XBtn_AddBkBorder(); XBtn_AddBkFill(); XBtn_AddBkImage(); XBtn_ClearBkInfo(); XBtn_GetBkInfoCount(); XBtn_GetStyle(); XBtn_GetType(); XBtn_SetStyle(); XBtn_SetType(); XEle_GetHWINDOW(); XEle_GetHWND(); XEle_GetParent(); XEle_GetParentEle(); XEle_GetType(); XEle_IsShow(); XEle_Show(); XSView_GetBorderSize(); XSView_SetBorderSize(); XComboBox_AddBkBorder(); XComboBox_AddBkFill(); XComboBox_AddBkImage(); XComboBox_ClearBkInfo(); XComboboX_GetBkInfoCount(); XShape_GetHWINDOW(); XShape_GetParent(); XShape_GetParentEle(); XEle_GetID(); XEle_GetName(); XEle_GetUID(); XEle_SetID(); XEle_SetName(); XEle_SetUID(); XShape_GetID(); XShape_GetName(); XShape_GetUID(); XShape_SetID(); XShape_SetName(); XShape_SetUID(); (4)修改函数名 XProgBar_SetHorizon() 改为 XProgBar_EnableHorizon() XSBar_SetHorizon() 改为 XSBar_EnableHorizon() XSliderBar_SetHorizon() 改为 XSliderBar_EnableHorizon()

    3. 类FontX改名为Font, 包名随之更改.

    4. 对所有注释进行适当换行, 参数注释看起来更加明了.

    Source code(tar.gz)
    Source code(zip)
  • v0.0.6(Sep 18, 2021)

  • v0.0.5(Sep 15, 2021)

  • v0.0.4(Sep 9, 2021)

  • v0.0.3(Sep 8, 2021)

  • v0.0.2(Sep 7, 2021)

  • v0.0.1(Sep 6, 2021)

Windows GUI library for Go (Golang). Comes with a graphical UI designer.

Version 2 Please go to Version 2 of this library for the latest version. Windows GUI Library This is a pure Go library to create native Windows GUIs.

null 159 Jan 1, 2023
Cross platform GUI in Go based on Material Design

About Fyne is an easy to use UI toolkit and app API written in Go. It is designed to build applications that run on desktop and mobile devices with a

Fyne.io 19.1k Jan 3, 2023
Common library for Go GUI apps on Windows

winc Common library for Go GUI apps on Windows. It is for Windows OS only. This makes library smaller than some other UI libraries for Go.

Tad Vizbaras 142 Dec 12, 2022
This project provides Go bindings for nuklear.h — a small ANSI C GUI library.

Nuklear Package nk provides Go bindings for nuklear.h — a small ANSI C gui library. See github.com/vurtun/nuklear. All the binding code has automatica

null 1.5k Jan 1, 2023
A Windows GUI toolkit for the Go Programming Language

About Walk Walk is a "Windows Application Library Kit" for the Go Programming Language. Its primarily useful for Desktop GUI development, but there is

Alexander Neumann 6.3k Dec 30, 2022
Windows GUI framework for Go.

gform is an easy to use Windows GUI toolkit for Go It provides two approaches to create UI. 1. Pure code. gform.Init() mainWindow := gform.NewForm(ni

Allen Dang 278 Jan 1, 2023
Windows API and GUI in idiomatic Go.

Windigo Win32 API and GUI in idiomatic Go. Overview The UI library is divided in the following packages: Package Description ui High-level UI wrappers

Rodrigo 224 Dec 27, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

ExampleTrayGUI An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functi

Grant Moore 51 Dec 3, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

ExampleTrayGUI An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functi

Grant Moore 51 Dec 3, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functional build process. This repository is intended as a quick reference to help others start similar projects using the referenced libraries and will not be actively maintained.

Grant Moore 51 Dec 3, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

ExampleTrayGUI An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functi

Owen Moore 51 Dec 3, 2022
W32find - Find parent windows and their children windows using win32api.

w32find Package w32find provides a set of interface to win32 APIs that can be used to find windows and their controls. Install go get -v github.com/mo

MoonChant 0 Jan 5, 2022
Cross-platform Go/Golang GUI library.

中文 | English GoVCL Cross-platform Golang GUI library, The core binding is liblcl, a common cross-platform GUI library created by Lazarus. GoVCL is a n

不在乎y 1.7k Dec 30, 2022
Platform-native GUI library for Go.

ui: platform-native GUI library for Go This is a library that aims to provide simple GUI software development in Go. It is based on my libui, a simple

Pietro Gagliardi 8.2k Jan 9, 2023
Cross platform rapid GUI framework for golang based on Dear ImGui.

giu Cross platform rapid GUI framework for golang based on Dear ImGui and the great golang binding imgui-go. Any contribution (features, widgets, tuto

Allen Dang 1.6k Dec 28, 2022
Idiomatic Golang GUI using Lorca

Dali Summary Dali is a pure Golang library built on lorca in order to provide Go developers a way to create GUI-based applications using idiomatic Go.

Matthew Peters 8 Jul 11, 2022
Neovim GUI written in Golang

Neovim GUI written in Golang, using a Golang qt backend (https://github.com/ther

Asa Katida 0 Dec 29, 2021
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.8k Dec 28, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.8k Jan 1, 2023