GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features.

Related tags

GUI GacUI
Overview

GacUI

GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features.

Read the LICENSE first.

  • The release of the GacUI project is put in vczh-libraries/Release.
  • DO NOT download source code from this repo if you are not intended to create pull request. This is not for end users.

Document

For Home Page: click here

For Gaclib: click here

For GacUI: click here

gaclib.net is a mirror to github pages above

Content of This Project

  • The Tutorial shows how to start using this marvelous GUI library.
  • The Demos section show you all demos using this GUI library.

Notice

Using this library requires you to use C++ source files directly in

All other files are for library development only.

Content

This GUI library provides the following features:

  • Develop your GUI using pure C++, Workflow script, XML or even JavaScript (under construction).
  • Cross-platform abilities.
    • for Windows: Just use the code here
    • for Linux: XGac repo (developing)
    • for OSX: iGac repo (developing)
    • for running in Browser using WASM: (2.0)
  • Rich control library. Container controls supports MVC and virtual list mode.
  • Control template system. You can write your own.
  • GPU acceleration.
  • XML resource supports.
    • You can use the provided GacGen.exe to generate multiple XML files with binary resources (images) into a compressed binary format.
    • This program will also generate C++ code behind for you. You can fill event handlers (but we suggest you use MVVM and Data Binding instead) in generated C++ files.
    • If you update your UI, GacGen.exe will merge your modification in C++ code and modification in XML together to generate new C++ code behind. Your update will still exist.
      • NOTE: You will see a very obvious mark USERIMPL(/* ... */) in the generated code. Here is where you want to add your code. All your modification outside of these places will be discarded on the next GacGen.exe run.
  • MVVM and Data Binding.
    • You can define interfaces that required to build your own MVVM pattern in XML and GacGen.exe will generate the C++ interface declaration for you.
    • You can also use Workflow expressions in Data Binding and statements in event handlers (instead of writing C++ code in code behind).
Comments
  • Window ClientSize 还能缩小一些

    Window ClientSize 还能缩小一些

    <Window ref.Name="self" Text="GacUI XML资源展示" ClientSize="x:740 y:480">
            <att.BoundsComposition-set PreferredMinSize="x:740 y:480" />
    </Window>
    

    还能缩小大概20像素吧 按理说启动后的就是最小大小了吧

    bug 
    opened by bizehao 16
  • 稍微看了下,有一些疑惑

    稍微看了下,有一些疑惑

    我稍微看了一下源码,并没有深入,但发现有很多重新发明的轮子,比如 FileStream, Array 这样的东东,想知道作者这样设计的意图是什么?为什么不使用标准库呢? Resource.xml 里是完全新的语法,而且不知道里面的脚本到底是啥语言?真希望能自定义脚本引擎,用上 javascript, lua 之类熟悉的东西。 现在感觉这个库的学习成本有点高啊,怕怕。

    question 
    opened by jadedrip 11
  • 请教XML写法

    请教XML写法

    轮子哥,单纯看demo没法完整掌握GacUI的XML文件的写法,而GacUI也没有相关的文档,感觉入门挺困难的,没法快速上手,不知道轮子哥有没有开发能直接生成GacUI的XML文件的编辑器之类的工具?手写太麻烦了,而且还容易出错。没有类似工具的话,请问怎么才能较快的掌握GacUI的用法?连文档都没有实在痛苦啊(可别说http://www.gaclib.net/Document.html#~/这个是文档)。

    opened by wangwenx190 9
  • x64位模式下崩溃问题

    x64位模式下崩溃问题

    32位模式下正常,64位下会崩溃. 在有动画的情况下尤为明显,一会就崩了,

    我经过排查,感觉像是画刷资源共用的问题,但是32位下没事,就解释不同了。 我把颜色随机改变,资源缓冲区里的每一个画刷都是唯一的,就不会崩溃。或者说 image 这样,也不会崩溃。

    这是堆栈信息: KernelBase.dll!00007fff8a0dd532() 未知 d2d1debug3.dll!DebugLayer::OutputGlobalErrorMessage(unsigned int,...) 未知 d2d1debug3.dll!ResourceSDK::CResourceUsageMgr<struct IUnknown *,struct ResourceSDK::NoExemptionPolicy,struct ResourceSDK::DefaultNewAndDeleteOperators,struct ResourceSDK::RentalThreadedResourceUsagePolicy,struct Reporter,class DebugTracker,class ResourceSDK::CDictionary<struct IUnknown *,class DebugTracker,struct ResourceSDK::DefaultNewAndDeleteOperators> >::ClosedHandleCheck(struct IUnknown *) 未知 d2d1debug3.dll!DebugLayer::TestResourcePreApi(struct IUnknown const *,struct DebugTracker::Storage const *,bool) 未知 d2d1debug3.dll!DebugRenderTargetGenerated::FillEllipse(struct D2D1_ELLIPSE const *,struct ID2D1Brush *) 未知

    MyGacUiTest.exe!ID2D1RenderTarget::FillEllipse(const D2D1_ELLIPSE & ellipse, ID2D1Brush * brush) 行 3137 C++ MyGacUiTest.exe!vl::presentation::elements_windows_d2d::GuiSolidBackgroundElementRenderer::Render(vl::presentation::Rect_<_int64> bounds) 行 392 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 309 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<_int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size<int64> offset) 行 325 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsHost::Render(bool forceUpdate) 行 637 C++ MyGacUiTest.exe!vl::presentation::compositions::GuiGraphicsHost::GlobalTimer() 行 560 C++ MyGacUiTest.exe!vl::presentation::windows::WindowsCallbackService::InvokeGlobalTimer() 行 49 C++ MyGacUiTest.exe!vl::presentation::windows::WindowsController::InvokeGlobalTimer() 行 1943 C++ MyGacUiTest.exe!vl::presentation::windows::GodProc(HWND * hwnd, unsigned int uMsg, unsigned int64 wParam, int64 lParam) 行 1978 C++ [外部代码] MyGacUiTest.exe!vl::presentation::windows::WindowsController::Run(vl::presentation::INativeWindow * window) 行 1863 C++ MyGacUiTest.exe!vl::presentation::controls::GuiApplication::Run(vl::presentation::controls::GuiWindow * mainWindow) 行 124 C++ MyGacUiTest.exe!GuiMain() 行 16 C++ MyGacUiTest.exe!vl::presentation::controls::GuiApplicationInitialize() 行 477 C++ MyGacUiTest.exe!GuiApplicationMain() 行 497 C++ MyGacUiTest.exe!RendererMainDirect2D() 行 781 C++ MyGacUiTest.exe!WinMainDirect2D(HINSTANCE * hInstance, void(*)() RendererMain) 行 629 C++ MyGacUiTest.exe!SetupWindowsDirect2DRenderer() 行 644 C++ MyGacUiTest.exe!WinMain(HINSTANCE * hInstance, HINSTANCE * hPrevInstance, char * lpCmdLine, int CmdShow) 行 31 C++ [外部代码]

    opened by bizehao 7
  • 对Alt键的处理问题

    对Alt键的处理问题

    如果窗口使用了Template的效果但是没有Tab就像是Demo里面Template.Window.CustomizedBorder一样时,直接按下Alt键会导致崩溃;如果有使用Tab比如Demo里面Persistant.LoadFromXml.ControlTemplate则会在Tab上显示数字标号(不过现在好像还不能当快捷键用),不会崩溃。

    ----------------Edit--------------- 此处描述不当,请见之后回复

    bug 
    opened by hyln9 6
  • DPI auto re-size and right-click support

    DPI auto re-size and right-click support

    It seems GacUI currently doesn't support DPI auto resize. For example, the Controls.DatePicker.DateAndLocale demo: qq 20150406093747

    One other thing, the textbox and the scroll bar doesn't have a right-click menu. Yes I know it is Direct2D, but I think maybe it should still have the right-click support as a native widget does?

    enhancement 
    opened by wdhwg001 6
  • 64位编译后随机崩溃

    64位编译后随机崩溃

    环境: Windows 8.1 x64 Visual Studio 2015 RC 关闭了全程序优化 Release/Debug均有同样问题

    基本上所有64位编译的程序都有问题,32位的就没有

    重现方法: 是打开程序快速随机点击操作,通常1分钟内程序就会崩溃

    比如:

    异常:

    0x00007FFACD218B9C (KernelBase.dll) (Controls.Button.CheckAndRadio.exe 中)处有未经处理的异常: 0xC0000002:  未运行请求的操作。。
    

    堆栈:

     KernelBase.dll!00007ffacd218b9c()  未知
     d2d1.dll!00007ffac643c361()    未知
     d2d1.dll!00007ffac668fe25()    未知
     d2d1.dll!00007ffac666f2b1()    未知
     d2d1.dll!00007ffac666ef7f()    未知
     d2d1.dll!00007ffac666bd51()    未知
    >Controls.Button.CheckAndRadio.exe!vl::presentation::elements_windows_d2d::GuiSolidLabelElementRenderer::Render(vl::presentation::Rect bounds) 行 11675    C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32119  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsComposition::Render(vl::presentation::Size offset) 行 32136  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsHost::Render() 行 36534  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::compositions::GuiGraphicsHost::GlobalTimer() 行 36469 C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::windows::WindowsCallbackService::InvokeGlobalTimer() 行 2686  C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::windows::GodProc(HWND__ * hwnd, unsigned int uMsg, unsigned __int64 wParam, __int64 lParam) 行 5555   C++
     [外部代码] 
     Controls.Button.CheckAndRadio.exe!vl::presentation::windows::WindowsController::Run(vl::presentation::INativeWindow * window) 行 5336 C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::controls::GuiApplication::Run(vl::presentation::controls::GuiWindow * _mainWindow) 行 155 C++
     Controls.Button.CheckAndRadio.exe!GuiMain() 行 112    C++
     Controls.Button.CheckAndRadio.exe!vl::presentation::controls::GuiApplicationInitialize() 行 437   C++
     Controls.Button.CheckAndRadio.exe!RendererMainDirect2D() 行 12997 C++
     Controls.Button.CheckAndRadio.exe!WinMainDirect2D(HINSTANCE__ * hInstance, void (void) * RendererMain) 行 235 C++
     Controls.Button.CheckAndRadio.exe!SetupWindowsDirect2DRenderer() 行 249   C++
     [外部代码]
    

    另外最小化之后占用内存快速上升,已经按照 vczh/gac#4 提供的方法解决了。

    谢谢!

    bug help wanted 
    opened by hyln9 5
  • 技术交流:请教轮子哥,如何使无边框窗口响应窗口管理器

    技术交流:请教轮子哥,如何使无边框窗口响应窗口管理器

    轮子哥,您好。我最近在尝试使用Qt制作无边框的窗口,我用setWindowFlags(Qt::Window | Qt::FramelessWindowHint)去掉了窗口边框,并且我使用Qt的事件过滤器截取了Windows事件,我在WM_NCHITTEST事件里处理了鼠标指针的变化以及实现了窗口拖动。我用DwmExtendFrameIntoClientArea(hwnd, {-1,-1,-1,-1})带回了窗口的边框阴影,可是我发现我的无边框窗口无法响应Win+←、Win+→、Win+↑以及Win+↓,也无法在拖动到桌面顶端的时候自动最大化,感觉像是无法响应“窗口管理器”(如果有这么一个东西的话)。GacUI也是自己搞的边框,用起来跟原生的边框一模一样,请问您是调用了什么API,来实现这种与“窗口管理器”的对接?

    opened by wangwenx190 4
  • x64下崩溃问题的原因找到了

    x64下崩溃问题的原因找到了

    轮子哥,在GuiTypes.h里的Color的

    vint Compare(Color color)const
    {
    	return value - color.value;
    }
    

    这个永远是大于0的数,导致比较运算符的结果不正确,我在vs下做的测试

            vuint32_t a = 100;
    	vuint32_t b = 800;
    	vint c = a - b; //4294966596
    	vint d = b - a;//700
    

    这里value是vuint32_t,应该把value换成vint32_t

    应该是这里的比较运算导致的map取值问题,进而导致资源获取的问题, 我改成这个后 就正常了。上次改的那个应该是延长了brush的生存周期,现在撤销掉也正常了 ,回退成你之前的了。

    opened by bizehao 3
  • 关于重型UI的问题咨询

    关于重型UI的问题咨询

    我们这边是做工业软件的。目前有一些界面比较特殊:就是界面上图元特别多。比如,载入一个多层的版图,一下子就要显示几万的图元。还要在这些图元上支持缩放、数据标注(颜色、线性、操作状态、附加的标签等等)、响应用户的点击选取等操作。这个时候,我们发现,我们的UI框架就跪了。最早是一个一个控件往上堆,内存大,视图卡,CPU高。后来,换其他支持大量图元的框架,内存稍微好点,缩放还是卡,操作响应还是慢。databind这种不敢用,因为数据放两份内存会更大,而且担心动态加标注会很不方便。

    这些问题我们有过一些分析,主要问题集中在下面: 1、需要呈现数据太大,传统的界面上往往要存部分业务的数据(比如,坐标信息我们是自带的,但是框架要自己管,我们还要做个映射),导致内存资源消耗较大。 2、由于ui要支持缩放,现有的ui框架几乎都清一色地需要将全部图元加入管理器才能做到,这既导致内存开销大,又会触发底层管理机制管理超大量图元时低效的问题。 3、由于图元多,遇到缩放等操作时,要绘制的东西很多。由于跨层不遮盖也需要显示等诉求,导致页面刷新时会多层绘制,绘制过程页面脏、花、慢。

    请教下,像这种场景 gacui 框架是否有办法解决?

    opened by libbylg 3
  • D2D renderer resizing window glitch

    D2D renderer resizing window glitch

    https://user-images.githubusercontent.com/773569/126599953-6481a024-f452-41bc-ac94-159e8d9cf283.mp4

    Window size needs to have a directly constraint from a label/solidlabel dpi should be larger than 100%

    bug 
    opened by vczh 3
  • Cannot run in Windows7

    Cannot run in Windows7

    I fixed the issue by skipping APIs in non-supported OS: WinNativeDpiAwareness.cpp.

    Code in the Release repo has been updated, but a new version is not made. Please download the source code from the Release repo directly, instead of downloading the latest release.

    enhancement Fixed 
    opened by vczh 2
Owner
Vczh Libraries
All coupled libraries created by vczh
Vczh Libraries
This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain

This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window and input handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as output.

Micha Mettke 13.5k Jan 8, 2023
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

omar 44.5k Jan 7, 2023
RmlUi - The HTML/CSS User Interface library evolved

RmlUi - The HTML/CSS User Interface Library Evolved RmlUi - now with added boosters taking control of the rocket, targeting your games and application

Michael R. P. Ragazzon 1.6k Jan 7, 2023
ROS_Melodic_Qt_GUI_Template is a Graphical User Interface programmed with Qt framework.

This is a GUI template for ros to control your robot and read data from sensors.

null 28 Nov 15, 2022
AnUI is a powerful Graphical User Interface framework made for people that actually care about design!

What's AuUI ** Project is not finished ** AuUI, an abbreviation for "Actual Understandable User Interface" is a graphical user interface framework to

Goat 4 Jun 17, 2022
ImTui: Immediate Mode Text-based User Interface C++ Library

ImTui is an immediate mode text-based user interface library. Supports 256 ANSI colors and mouse/keyboard input.

Georgi Gerganov 2.1k Jan 1, 2023
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI

ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th

null 95 Nov 19, 2022
Nim binding generator for The Machinery

tm-nim is a WIP binding generator for The Machinery. Tested: With vcc and tcc on Windows, and The Machinery master branch. Generate the binding Modify

Don-Duong Quach 7 Oct 22, 2022
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Pietro Gagliardi 10.4k Jan 2, 2023
Windows GUI version of the age file encryption tool (built on rage, the Rust implementation)

Windows GUI version of the age file encryption tool (built on rage, the Rust implementation)

Theron Spiegl 42 Dec 21, 2022
This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun

Dear ImGui software renderer This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun. The goal was t

Emil Ernerfeldt 214 Dec 22, 2022
AirPods desktop user experience enhancement program

AirPodsDesktop AirPods desktop user experience enhancement program

Sprite 381 Jan 5, 2023
Library for writing text-based user interfaces

Termbox for RT-Thread 中文说明文档 This repository forks from nullgemm/termbox_next Getting started Termbox's interface only consists of 12 functions: tb_in

Meco Jianting Man 5 May 25, 2022
Arcan is a powerful development framework for creating virtually anything from user interfaces

Arcan is a powerful development framework for creating virtually anything from user interfaces for specialized embedded applications all the way to full-blown standalone desktop environments.

Bjorn Stahl 1.3k Dec 26, 2022
GTK is a multi-platform toolkit for creating graphical user interfaces.

GTK — The GTK toolkit General information GTK is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets,

GNOME Github Mirror 1.1k Dec 31, 2022
A simple/fast stacking box layout library. It's useful for calculating layouts for things like 2D user interfaces.

A simple/fast stacking box layout library. It's useful for calculating layouts for things like 2D user interfaces. It compiles as C99 or C++. It's tested with gcc (mingw64), VS2015, and clang/LLVM. You only need one file to use it in your own project: layout.h.

Andrew Richards 713 Dec 28, 2022
LicenseValidationDialog is a class designed to validate license keys on the user's side.

QT-LicenseValidationDialog Basic LicenseValidationDialog is a class designed to validate license keys on the user's side. The class is designed to ver

Piotr Napierała 1 Jun 10, 2022
Fast UI Draw is a library that provides a higher performance Canvas interface.

Fast UI Draw is a library that provides a higher performance Canvas interface. It is designed so that it always draws using a GPU.

Intel Corporation 595 Dec 9, 2022
This is a complet GUI between a Raspberry device with a Slave microcontroller to set camera data acquisition

#PYDOME Python Lib for Domes features control, this package allows users to build, evaluate and make tasks based on Raspberry OS Table of Contents Ins

null 1 Nov 2, 2021